LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

controlling radio buttons with an event structure

Solved!
Go to solution

Hello,

 

I am trying to get an equal event in an event strucutre as I programmed ago on year. But now I can't find it.

I have radio buttons on my frontpanel. These I added previously to my event structure as you can see in the Blockdiagram.PNG with "Radio Buttons.Projekt-Button":Value Change. But now I wanted to do the same again by adding a new case to the structure and I am not able to select a certain element of the radio buttons. I can only choose the radio buttons as the whole group like you can see in the Blockdiagram.PNG.

 

Does anyone has a suggestion for me, how to get the same again?

 

Best regards,

 

Soleil20

Download All
0 Kudos
Message 1 of 5
(2,683 Views)

Hi Soleil,

 

"Radiobuttons" act as just one control regardless of the number of the buttons in it: it's datatype is an enum!

 

So you can only have one ValueChange event. To know which button has been pressed you need to evaluate the current value of your radiobutton…

 

Edit:

Well, you might create a reference for each button in the radiobutton. Then you can register events for each single button, but I still think using the event for the radiobutton itself is easier…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,679 Views)

Hi GerdW,

 

I know this fact. But I am sure, that I was able to select "Radio Buttons.Projekt-Button" of adding an event case. And now, as you can see, I only get the whole Enum.

 

Best regards,

Soleil20

0 Kudos
Message 3 of 5
(2,675 Views)

Hi Soleil,

 

did you use a cluster of several buttons before?

With a cluster you can create events for cluster elements! (Also the syntax is like in your image "Cluster label", point, "Cluster element name"…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(2,667 Views)
Solution
Accepted by topic author Soleil20

Hi Gerd,

 

thanks that you helped me. I found the solution.
First I had several buttons like you mentioned. For these buttons I added event cases. Then I found the radio buttons and chose to get them into the radio buttons cluster. And the event case automatically changed from "element":"value change" to "radio button" "point" "element" : "value change".

 

Best regards,

 

Soleil 20

0 Kudos
Message 5 of 5
(2,665 Views)