02-21-2025 12:42 PM
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?
Solved! Go to Solution.
02-21-2025 01:12 PM
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.
02-21-2025 01:18 PM - edited 02-21-2025 01:20 PM
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.
02-21-2025 04:25 PM
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.
02-21-2025 04:45 PM
@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).
02-21-2025 04:59 PM
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!