From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

mutually exclusive button / keypad

I try to design a LabView front panel with a set of arrow keys to control a motor.

Let say I got an up arrow and a down arrow.  I want to have an exclusive state

for those keys (both up and down cannot be pressed at the same time, like a radio

 button).

 

I managed to achieve this behavior using a state machine (see attachement). 

This work, but I wonder if there is a better way to do it.

 

Any other suggestion.

Download All
0 Kudos
Message 1 of 7
(3,065 Views)

Hi,

 

You can customise the radio button to what you need.

Create a radio button control with four options
Right click on the border and select Advanced -> Customise

Select the radio button, right click on it and replace with a command button

Repeat for the remaining 3 selections.

 

Hope this helps

 

David

 

Edit: You can do this for the first data button replacement. After any button you add will be a command button.

Message Edited by David Crawford on 03-02-2010 02:17 PM
Message 2 of 7
(3,051 Views)

Yes if you follow the description from David you can make your own as I did. OK I went perhaps somewhat nuts regarding the internal controls 😉 Just some hint if you do not want the frame select the classic display type radio button. You find this in the classic menu. Also remove the frame as the last edit. As it is hard to add buttons if the "frame" is selected to be transparent

Edit: Thanks David

Message Edited by Coq Rouge on 03-02-2010 03:32 PM


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 3 of 7
(3,040 Views)

I'm not sure of the behavior you want your system to have. With the VI you posted the system is always ON in the up/down axis and ON in the left-right axis. Is it want you want? With radio buttons I don't think you can have movement simultaneously in the up/down and in the left-right direction.

 

Ben64

0 Kudos
Message 4 of 7
(3,037 Views)

Pssst, wrong code!

 

 :smileyvery-happy:

Message 5 of 7
(3,032 Views)

Attached is an example of mutually exclusive buttons with a neutral position (an axis can be off). the example is using the event structure.

 

 

Ben64

0 Kudos
Message 6 of 7
(3,024 Views)

 

I used the solution from David as an alternative.  I used two

radio buttons with an hidden entry to set both buttons to the off position.

 

This way, the logic doesn't need to be in the vi itself.

 

Thanks.

 

For reference, I attach the new solution.

0 Kudos
Message 7 of 7
(2,979 Views)