01-19-2012 05:19 AM
Hello,
I have a cluster of checkboxes and I want them to be exclusive an to change the visible objects of my vi when I change their state. To keep my code clear I decided to create a subvi that implements this functionality. My subvi recives an array of references to the objects from which I want to change the visibility, an array of references to the checkboxes (to be able change it's values to make them exclusive when one of the checkboxes change it's state), and an array of the values of the checkboxes in the last iteration (to be able to detect which one has change to true and set to false the other ones).
The problem that I have is that when I use a property node to get the actual values of the checkboxes in the subvi (to compare them to their previus state and detect changes) I obtain a variant type and not a boolean. I've tried to set the mechanical action of the booleans references used as input in the subvi as switch but this doesn't seem to work. I understand that is cause the subvi can't know type of booleans that will recieve and asume the worst case....
Is there a way to do what I want?
I hope I've explained myself... Thanks in advance!
Solved! Go to Solution.
01-19-2012 08:12 AM - edited 01-19-2012 08:16 AM
There are a few ways to deal with this, but it would help to see your code. Are you sending a reference of the Cluster into a VI, or individual references of the checkboxes? It sound like you are not using a strict reference. The workaround, since you know the datatype, is to use Variant to Data and change the variant to a boolean, but this shouldn't be necessary. Again, post some code so we can be more help.
edit: It sounds like you are trying to hard code Radio Buttons. You do know that LabVIEW has Radio Buttons now, right?
01-19-2012 09:47 AM
I didn't know the existance of radio buttons either, I'm just begining with labview and I don't know lots of its features.
Thanks!!!