LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Clearing LEDs

Hello,
 
I am using a flat structure sequence to implement a test sequence.  I want to have a number of LEDs that indicate whether a particular part of the test sequence has yielded a pass or fail.
 
See screenshot for a very simplified version of what I want to do.
 
This works fine the first time the program is run.  However, the LEDs stay "on" when the program has completed, so the next time it is run it is impossible to tell whether they have been illuminated that time round, or whether they simply remain illuminated from the previous time.
 
Is there a way of turning all LEDs off in one go, even if they exist in a previous frame of the flat structure?
 
Thanks,
Dan
 
0 Kudos
Message 1 of 4
(2,685 Views)
Use a local or property node to set the value to false in the first of the falt sequence cases. Then you always know that the test starts with the LED set to false.

Regards,
André (CLA, CLED)
0 Kudos
Message 2 of 4
(2,677 Views)
Alternatively, if you don't need to set values before the VI starts executing, you can use an Invoke Node (wired to a reference to the Current VI) and the "Reinit All" method to restore all controls and indicators to their default state.
0 Kudos
Message 3 of 4
(2,642 Views)

DanB83,

You might also want to rethink your use of a flat sequence structure (any type of sequence structure). Execution order is better determined by dataflow and if you a number of steps to do, a state machine makes much more sense. A state machine gives you the flexibility to alter the order of the tests you perform and also branch if needed to handle an error or terminate the tests without having to run through every sequence. 

Message 4 of 4
(2,626 Views)