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.
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.
03-02-2010 08:00 AM
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.
03-02-2010 08:14 AM - edited 03-02-2010 08:17 AM
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.
03-02-2010 08:24 AM - edited 03-02-2010 08:32 AM
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
03-02-2010 08:27 AM
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
03-02-2010 08:29 AM
03-02-2010 08:34 AM
03-02-2010 12:18 PM
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.