LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case structure back and forth from LED

Hello, I'm trying to make a case structure switch back and forth everytime a boolean LED indicator goes off. I want case one to start when a button is pushed, switch to case two when an LED indicator goes on, then switch back to case one when that same LED goes on again, then case two the next time the light goes on, and so on. The LED is set to go on every ten seconds. So far i have the case structure in a while loop but im not sure how to get them to switch back and forth using this one LED. Any suggestions?

0 Kudos
Message 1 of 5
(3,419 Views)

Hi libby,

 

connect the case structure selector input with your LED indicator!

 

And please attach your VI the next time…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(3,409 Views)

The condition from your case structure can probably simply come from the same source that is setting the Boolean LED Indicator.  What is this source?



0 Kudos
Message 3 of 5
(3,404 Views)

the source is an elapsed time inside of a seperate while loop, the LED is set to go on every ten seconds.

0 Kudos
Message 4 of 5
(3,398 Views)

Then you have two asynchronous parallel loops, and you want one of them to receive information (Boolean) from the other in order to determine its state.

 

If the loop with the elapsed time contains nothing but elapsed time, then consider moving it to the first loop.

 

Otherwise, you should use a form of synchronization communication, such as a Notifier or User Event, to send data from your loop with the elapsed time to your loop with the case structure.



0 Kudos
Message 5 of 5
(3,392 Views)