LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

More compact way than control ref to modify properties from main front panel?

I am conditionally changing the "visible" property on about 10 indicators in a cluster on the front panel. The main vi block diagram is crowded so I'm doing the work in a sub vi. Unfortunately, I found out that passing the elements of a cluster into the sub vi, requires 10 control reference numbers and therefore inputs going into the sub vi. Is there a way to pass the property information into the sub vi by using an array (maybe the property "control[]" or "objects[]" of the cluster)? One array input with one property node is much less crowded than 10 control ref nodes with 10 sub vi inputs.
0 Kudos
Message 1 of 7
(3,096 Views)
Hi Jeff,

you should pass the controls[]array, which is the array of references of all the items inside the cluster, to the sub-vi and change the properties inside it.
I attach an example that shows how to do it, hope it is helpful.

Alberto
0 Kudos
Message 2 of 7
(3,096 Views)
Alberto,
I'm using labview 6.0. The example is in labview 6.1. Can you send me a version compiled for labview 6.0.

Thanks,

Jeff
0 Kudos
Message 3 of 7
(3,096 Views)
0 Kudos
Message 4 of 7
(3,096 Views)
Alberto,

Thanks for the program. It loaded.
However, I have another question related to turning off the visible property on the VI. The program is running very slow at this point because some cluster indicators can be seen disapearing before others
Any suggestions on speeding this process up?
0 Kudos
Message 5 of 7
(3,096 Views)
Hi Jeff,
you can optimize the process by placing the Controls[] propery inside the case structure.
See my example modified, this is also more logical.
Let me know if this solves your problem,

Alberto
0 Kudos
Message 6 of 7
(3,096 Views)
> Any suggestions on speeding this process up?

Try setting the Panel->Defer Panel Updates to TRUE, then set the cluster
properties, then set the Panel->Defer back to FALSE.

Greg McKaskle
0 Kudos
Message 7 of 7
(3,096 Views)