LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Catch button press for multiple buttons

Solved!
Go to solution

Hello.

I am  currently making a VI in which I have mutiple boolean buttons associated in multiple groups (over 100 buttons distributed on 4 groups). What I want is that when a button belonging to a group is pressed the other buttons in the same group go to an off state. I have already achieved this through an Event Structure. I create a case for each button press and inside it I run a for loop through each of the references of the whole group. This for loop writes a FALSE value for all the other buttons on the same group. 

 

However, with this method I still have to create an event case for each of the different buttons and copy their respective for loops inside the case. The idea that I have is to create some sort of Event Structure that detects ANY button press on my VI and through the node  "CtrlRef" of the event structure obtain the reference of the button that was recently pressed so that I can set all other controls except for that one to FALSE.

 

Any help would be appreciated.

Greetings,

Luis.

0 Kudos
Message 1 of 4
(4,323 Views)
Solution
Accepted by topic author luisgepeto

Thank you I already solved my problem.

The solution is in the image.

 

0 Kudos
Message 2 of 4
(4,319 Views)

Sounds like you got a solution. Have you considered using a radio button for each of those 25 booleans instead?

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 3 of 4
(4,313 Views)

Due to the application requeriments I need to make a boolean selector. 

Thanks anyway.

0 Kudos
Message 4 of 4
(4,311 Views)