LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LED's and buttons

Hey all. I'm fairly new to Labview. I'm wondering if there is anyway I can connect two bolean buttons to one LED control and depending on what button is pressed, I would like the LED to display a certain color. For example, if I pressed button one, I would want the LED to light up with a green color. If I pressed button 2 I would like the LED to light up with a Red color. How would I do this?

0 Kudos
Message 1 of 6
(3,491 Views)

No, you cannot connect two controls to a single indicator.

What if both buttons are false? What if both are true? What have you tried? What about a radio button?

0 Kudos
Message 2 of 6
(3,467 Views)

Hey thanks for the reply! I'm going to try to put them into a case structure and then maybe I can change the color through the right click properties. Let me see if I can get it.

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

Given two buttons, you can have four different positions (on/on, on/off, off/on, off/off). Since you have not defined what color should be displayed if both buttons are on or off, I suggest you use a radiobutton control. This ensures that exactly one button is ON at any given time.For the color indicator, just use the output of the radiobutton control to index into an array of colors.

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

Got it! Thanks!

0 Kudos
Message 5 of 6
(3,406 Views)

@Help_Me_ wrote:

Hey all. I'm fairly new to Labview. I'm wondering if there is anyway I can connect two bolean buttons to one LED control and depending on what button is pressed, I would like the LED to display a certain color. For example, if I pressed button one, I would want the LED to light up with a green color. If I pressed button 2 I would like the LED to light up with a Red color. How would I do this?


If you back out to the main LabVIEW forum page, you'll see some links to some good LabVIEW learning stuff.  I know there are other, even better links, but I don't have them on this computer.  😞

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 6
(3,378 Views)