LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Switch on particular LED

Hi,
I have 30 LEDs, labelled L0 to L29. When the user runs the code, it waits for an input from user. This, I have done using a 'while' loop. Now after the user enters the number, it should light up the particular LED for certain amount of time (this is given by user in the front panel) and then go low. The loop continues and waits for next number (between 0 and 29). My problem is how to relate the input number to that particular LED?

Any help/pointers welcome.

Thanks!
Jeguna
0 Kudos
Message 1 of 4
(2,855 Views)
I am assuming you are controlling LED indicators on your front panel and not real live LEDs. You could use the event structure to trigger on when your input number has changed. Use a case statement to send a TRUE to the LED you want to light up, Case 0 lights L0, Case 1 lights L1, and so on. Wire your time on value to the Timeout case, and in the Timeout case wire a FALSE to all indicators. See attached vi.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 4
(2,853 Views)
Hi Bob,
Thanks for the reply. Unfortunately, I am unable to open your file as my version is 7.0 and the file is in 7.1. Any ideas?

Thanks
Jeguna
0 Kudos
Message 3 of 4
(2,848 Views)
Here's a slightly different approach (LabVIEW 7.0). Instead of having to deal with 30 individual LEDs, I would use an array of 30 LEDs.

If a new number is entered before the timeout in this particular implementation, the LED will switch immediately to the new position.

This is just one of many possibilities.
0 Kudos
Message 4 of 4
(2,840 Views)