LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Turn OFF LEDs in case structure

Solved!
Go to solution

Hi,

 

I was wondering if someone could help me solve a small issue in a test bench software I am trying to develop. I have attached a section of my code in which the problem is visible. I have a case structure that is triggered by a 'Push Button'. I want the TEST RUNNING LED to stay ON until the end of the execution of the case structure (True condition) and turn off once it is completed. But the LED fails to turn off and remains ON. Is there anything I can do in the False condition to turn the LED off when the code isn't running. Please note that to run the program you will need to 'Run Continuously'. I want the LED to turn off once the 'Result' is obtained so that the operator of the software can know he is free to run the next test. But now when the 'Start Test 2' is executed after 'Start Test', the LED remains ON.

 

It might be a simple solution which I may be unfamiliar with, but forgive me, I'm a new Labview user and I couldn't find a solution to this online.

 

Thank you.

 

Regards,
DPac

0 Kudos
Message 1 of 15
(6,783 Views)
Solution
Accepted by topic author DPac

Hi DPac,

 

simple solution as requested:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 15
(6,777 Views)

I can't see your code, but from what you explained, Property Node sounds like solution to your problem. Just create a property node for LED and make the value property flase outside of the case stucture.



------------------------------------------------------------------------------------------------------
Kudos are (always) welcome for the good post. 🙂
0 Kudos
Message 3 of 15
(6,772 Views)

GerdW has the solution you want.  But you really should not design VIs that have to use the Run Contiuously.  While loop with an Event Structure would serve you much better.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 15
(6,762 Views)

Hi GerdW,

 

I'll try out what you have suggested and see if I can get it to work.

Cheers

DPac

0 Kudos
Message 5 of 15
(6,733 Views)

Hi crossrulz,

 

Cheers for your suggestion mate, I'll change it to a while loop.

 

Regards,
DPac

0 Kudos
Message 6 of 15
(6,728 Views)

Thanks GerdW, your solution worked!

0 Kudos
Message 7 of 15
(6,727 Views)

hello can u send me the VI how to turn off the LED when it is in false case and turn on when it is in true case. thankyou. your help are much appreciated

0 Kudos
Message 8 of 15
(6,354 Views)

Seems I accidently deleted that picture…

LED_test_BD.png

The test code is also located inside the TRUE case…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 15
(6,350 Views)

THANKS. youre awesome.

0 Kudos
Message 10 of 15
(6,317 Views)