LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A row of buttons where only one button can be pressed at a time.

I am trying to recreate a control panel that is a row of buttons where only one button can be pressed at a time.

 

Pressing any one button clears any other that was on.

 

I have seen this done before, in fact I have done this myself, but for the life of me I can not remeber how I did it without some stupid Rube Goldburge vi... 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 1 of 11
(6,169 Views)
Use the Radio Buttons control.
Message 2 of 11
(6,164 Views)
An alternative and less elegant solution would be to have logic in your code that would enable/disable the buttons programmatically. The logic in your code would determine which button should be active and enable that one. All others would then be disabled.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 11
(6,153 Views)
Use an event structure that detects which button was pressed then programmatically sets all the other buttons to False.
0 Kudos
Message 4 of 11
(6,144 Views)

Thanks for all of your suggestions.

 

Mark Yedinak's less elegant solution was the direction I was aiming for as i already have the booleans in my program.

 

I would like to see some examples of thte other soutions.

 

The radio buttons seems like the easiest approch but it is a control and I need booleans. I guess a case structure full of local variables to set and reset the booleans to go along with this would work.

 

I have never used an event structure so I do not even know how to use one for any purpose.Smiley Sad

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 11
(6,128 Views)

Here is a link to an example I previously posted.  You can ignore the the blinking part, as a bonus I threw in code to only allow a single true element in the array.

 

http://forums.ni.com/ni/board/message?board.id=170&message.id=438296#M438296

0 Kudos
Message 6 of 11
(6,123 Views)

Darin.K wrote:

Here is a link to an example I previously posted.  You can ignore the the blinking part, as a bonus I threw in code to only allow a single true element in the array.

 

http://forums.ni.com/ni/board/message?board.id=170&message.id=438296#M438296


 

That's really cool, but I do not understand how to modify it for my needs.

 

I tried removing the blinking part but that broke the event thing...

Message Edited by RTSLVU on 10-06-2009 09:59 AM
========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 11
(6,114 Views)
Before you remove the timed loop, move the stop button terminal to the 'Stop Value Changed' event case.  You don't need to wire it to anything, I just like to put it there to make sure it is read.
0 Kudos
Message 8 of 11
(6,103 Views)
Why not just use the radio buttons like Dennis suggested.



Joe.
"NOTHING IS EVER EASY"
Message 9 of 11
(6,068 Views)

RTSLVU,

 

Here is a pretty simple way to get booleans from Radio Buttons control.  This would work really well with an Event Structure.

 

Radio Button to Boolean_BD.png

Message 10 of 11
(6,066 Views)