08-11-2013 02:52 AM
Hello
I am trying to make a latch boolean in my code. I want to make it so that once an indicator is true, it will stay true for the duration of the run. I also want it to restart the boolean latch to false everytime the program is ran. Is there a way to do this?
Thanks!
Midna
08-11-2013 04:38 AM
You can try changing the Mechanical Action of boolean... Select Switch when released behaviour...!!
08-11-2013 08:37 AM
I don't think you can do that for indicators in the block diagram?
I know you can if it is a control in the front panel but not in block diagram?
I tried right clicking on the indicator boolean but the mechanical action is disabled(transparent) and not an option.
Is there another way?
What I want to do is create a boolean latch within my code.
xxxMidna
08-11-2013 08:55 AM - edited 08-11-2013 08:59 AM
You need to be careful with terminology. The term "latch action" has a special meaning in LabVIEW and is used for controls.
However, you can easily achieve your desired effect using a shift register or feedback node. Here is one possible solution. SImply incorporate the logic shown before wiring to the indicator.