Showing results for 
Search instead for 
Did you mean: 

Is it possible to make a D-latch or other logic in LabVIEW?

I'm trying to implement some state-machine type controls. We are outputting specific voltages at a given time, and need to see if a device triggers only in response to those outputs. Thus, while the output is high we want to check for triggers, and ignore all others.
So...are there any logic devices beyond basic gates in LabVIEW? I tried creating a RS-latch from NANDs, but it complains that there is a circular loop when Q and Q' are fed back to the opposite NAND gate input.
Any ideas?
0 Kudos
Message 1 of 3
Yes, you can make any kind of logic in LV. Some would say even illogic. To implement a latch or any other logic with memory you can use a while loop with a shift register. If the shift register is uninitialized (nothing wired to the left terrminal from outside the loop), it will retain the previous value. You can use case statements to control when various pieces of the logic execute. It would not be difficult to construct a flip-flop which could be type D or JK or T depending upon the value of and input selector.

0 Kudos
Message 2 of 3
You can take a look at this old post that contains an example.
0 Kudos
Message 3 of 3