LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using an array of references to boolean controls as an input of a subvi to modify propierties from the passed controls.....

Solved!
Go to solution

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!

0 Kudos
Message 1 of 3
(2,401 Views)
Solution
Accepted by marccj

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?

Richard






0 Kudos
Message 2 of 3
(2,390 Views)
Lots of thanks, I didn't know that there were strict and soft references. That completly fix my problem!

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!!!

 

0 Kudos
Message 3 of 3
(2,375 Views)