LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Initialization of LEDs prior to running second test.

Solved!
Go to solution
I'm am a novice Labview programmer using LV 8.6.  I have an appication where I have many LEDs to indicate pass or fail throughout my application in different Case numbers. After running the test those tests that passed are indicated on the front panel with a green lighted LED. Those tests that failed are lighted with a red LED. Is there an easy way to initialize all the LEDs back to their off state prior to running the test a second time without reloading the application?
0 Kudos
Message 1 of 6
(3,808 Views)
Use local variables for your booleans. Connect a false constant to them and put that either after all of your code or in an event structure. It depends if you want a button to reset them from the front panel, then the next test to begin, or if you want to reset them programmatically before the test excutes again.
Message Edited by for(imstuck) on 02-27-2009 09:33 AM
0 Kudos
Message 2 of 6
(3,803 Views)
Solution
Accepted by topic author chuck72352
Heres a quick example. First the boolean values are changed to true, then they are reset to false. Does this help?
Message 3 of 6
(3,796 Views)

Your solution works great!

0 Kudos
Message 4 of 6
(3,788 Views)

I would suggest using invoke nodes "reinitialize to default" instead.  Using local variables can be messy and can cause race conditions.

 

 invoke node example


Message Edited by vt92 on 02-27-2009 10:06 AM
>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 5 of 6
(3,778 Views)

I'll give it a try as soon as I get familiar with invoke nodes.

 

Thanks!

0 Kudos
Message 6 of 6
(3,771 Views)