LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Logic variable that that only changes value once

I need a logic variable that is initially false to change to true when a certain event happens (e.g., temperature reaches a threshold) and to remain true even when the output of the comparison changes back to false. Is there a simple way to do this? Simpler that the vi I've attached?
Thanks. Kevin
0 Kudos
Message 1 of 3
(2,592 Views)
Try using a local variable within a Case Structure to "set" the boolean value to either True or False.

Steps:

Right-click the boolean icon.
Select Create => Local Variable.

Do not attach a wire to your bolean icon because it will be set by the value of the local variable. Do wire the local variable.

You can even initialize the boolean by creating an invoke node and setting it's method to "Reinit To Dflt"

Hope this is what you were looking for.

JLV
Message 2 of 3
(2,592 Views)
Great. That works very nicely. It cleans up the block diagram considerably. By using the local varable and the "Reinit To Dflt", I was able to eliminate the shift register, the AND, and the connection to the STOP boolean.
Thanks. Kevin
0 Kudos
Message 3 of 3
(2,592 Views)