01-12-2015 03:30 PM
Hello,
I am confused about the following issue: In the attached Test Cluster of Boolean Controls Functionality.vi, I have a cluster of bolean controls, some disabled and grayed out, some enabled. If I click on one of the two enabled boolean controls, and then on the other, I want the boolean control selected first to reset to False. The indicator Update Cluster shows the desired behavior. What confuses me, is that the New Value does not update accordingly. Once I have clicked on both booleans at least once, the New Value stays [TRUE,TRUE] at all times, and the event structure no longer executes.
I already have a workaround, as shown in the Test Cluster of Boolean Controls Functionality Workaround.vi, but this does not look "nice", as it is more complicated than necessary. Does anybody know why the New Value does not update as expected? Please advise. Thank you.
Best regards,
Peter
Solved! Go to Solution.
01-12-2015 03:54 PM - edited 01-12-2015 04:38 PM
Seems very convoluted! Are you trying to do a "radiobutton" style control where only zero or one can be true at any given time? There are much easier ways!
01-12-2015 04:07 PM
Here is a simple solution.
Of course you could use a radiobutton container instead of a cluster for even simpler code. Try it!
01-12-2015 04:52 PM
Thank you for your reply. Your proposed solution is elegant and works. (In my application I actually need to retrieve the label text of the control being selected.) It is still counterintuitive to me, though, why in my example the Cluster of Boolean Controls is not updated.
01-12-2015 05:41 PM
It does update. After you click the new boolean, the old one is still true (in addition to the new one!) and that's the "new value" from the event terminal that you are reading. If you want the "new value" to reflect the updated cluster, connect it in parallel to the "updated cluster" control.
01-13-2015 02:03 PM
Thank you for your reply. And sorry for not expressing myself clearly. I realize that the New Value indicator caused some confusion.
What I meant is why the NewVal terminal of the event structure does not update to the value shown in the updated cluster, after the value has been written to the local variable "Cluster of Boolean Controls". I would expect that when the event executes the next time, it will show the updated value in the NewVal terminal.
01-13-2015 02:37 PM
pbuerki wrote:What I meant is why the NewVal terminal of the event structure does not update to the value shown in the updated cluster, after the value has been written to the local variable "Cluster of Boolean Controls". I would expect that when the event executes the next time, it will show the updated value in the NewVal terminal.
Because when the event fires again, another button has obviously been pressed so...
01-13-2015 03:01 PM - edited 01-13-2015 03:10 PM
Thank you so much for your time.
Peter
01-13-2015 05:46 PM
@pbuerki wrote:
(In my application I actually need to retrieve the label text of the control being selected.)
Here's one way to get the label with little additional code.