LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

value dependent boolean to retain its sense when values would change boolean

I am trying to create a program that has a boolean that is dependent on a value, and that boolean is connected to a case structure that is nested in another case structure, which is nested in a while loop. The boolean is true until the measurement is less than a certain value. Once it is less than that value, I want the boolean to remain false, but the measurement is such that it will change so that the boolean would become true again. Is there anything I can do to keep the boolean false once it becomes false?
0 Kudos
Message 1 of 3
(2,583 Views)
Add a shift register to your While loop.
Wire a True boolean constant (from outside the loop) to the input (left-hand) shift register.
Add an AND gate to the While loop.
Wire the input shift register to one input of the AND gate.
Wire your Pass/Fail test to the other side of the AND gate.
Wire the output of the AND gate to two places:
1. The boolean you want to go False and stay False.
2. The output (right-hand) shift register.
The boolean will default to True until your Pass/Fail test fails. From then on, it will be ANDed with False, so it will always be False.
Message 2 of 3
(2,583 Views)
You may need to add some inverters to the diagram as I described it above depending on whether you want to show failures or passes.
See the attached LabView 6.1 example.
0 Kudos
Message 3 of 3
(2,583 Views)