LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW 2023 Q3 Radio Button issue

Solved!
Go to solution

When using the radio button control connected to a case structure, the radio button will not select the correct case or any case. It will work correctly with highlight execution on. This was tried with LabView 2024 also and the results were the same. Note we tried it on two different computers, with two different LabVIEW Pro Licenses, same results.  Any ideas how to fix this?  Is it a bug?

0 Kudos
Message 1 of 6
(140 Views)

Further testing revealed the actual case selection is occurring but the Block panel doesn't indicate the case statement changed according to the case label.  I attached another VI with LED indicators.  The LED indicators show the radio selection occurred but the case structure does not.

radio button_2.vi ‏7 KB
(Virus scan in progress.)
0 Kudos
Message 2 of 6
(126 Views)

Your case structure is empty and it would be silly if the diagram would switch cases during run (unless you do highlighting, of course). The processor has better things to do!

 

You can e.g. test as follows to prove that the case switches correctly based on input.

 

altenbach_0-1740165594788.png

 

0 Kudos
Message 3 of 6
(121 Views)

It was set up to see if the case structure switched.  I did add another example with LEDs to indicate which case was selected.  My question was why the case structure doesn't visually update with the Radio Buttons, but when I build other VIs with an Enum it does.  It just seemed like odd behavior that the case structure did not visually update, but it actually will work as it should.  When the LED indicators correctly light up with the radio button selection but the case structure still did not visually update except when highlight execution is on.

 

Also your comment on "The processor has better things to do!" is a bit ridiculous since very little CPU power is required for the example VI.  Though the case structure was empty the VI still switched cases but not visually, which would have happened with an Enum.  It just seemed like unusual behavior.

0 Kudos
Message 4 of 6
(90 Views)
Solution
Accepted by topic author jo_mo

@jo_mo wrote:

Also your comment on "The processor has better things to do!" is a bit ridiculous since very little CPU power is required for the example VI.  Though the case structure was empty the VI still switched cases but not visually, which would have happened with an Enum.  It just seemed like unusual behavior.


I definitely don't expect it to change because it is pointless to constantly redraw the diagram cases where it probably needs to switch to the UI thread and redraw potentially huge case structure contents.

 

LabVIEW is typically very smart to understand what should, or should not be done. I don't know why you say the behavior is different with an enum, in my casual testing it is the same (i.e. no switching of the visible case).

0 Kudos
Message 5 of 6
(81 Views)

Thank you for your replies 🙂   I ran another test with an Enum and found you were correct.  I think because I usually put an indicator to show the status on the front panel is why I thought it switched, but what you said makes sense, about it was pointless to constantly redraw the diagram cases.  Thank you again for your help!  It is much appreciated!  

0 Kudos
Message 6 of 6
(69 Views)