LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cluster to array to cluster, and still keeping labels?

I'm trying to pass a whole bunch of control references to a subVI to do the GUI handling. I'd like to do it with a cluster, because then I can get the reference by name, using Unbundle by Name. However, this means I have to update the front panel on the subVI everytime I add or change something I'm trying to pass. An array gets around this problem, but then I can't pass names along so I have to keep going back to the main VI diagram to figure out the index of the element I'm trying to access.

It would be nice to pass a cluster into a subVI without having to update the front panel of the subVI, and still be able to use Unbundle by Name. This is especially useful if there are multiple subVIs acce
ssing the control references.
0 Kudos
Message 1 of 2
(2,363 Views)
I am a little confused over your usage of control references. I thought at first you were speaking of control/indicator reference but realized you were probably talking about wiring a control/indicator to a corrosponding control in a sub-vi and would manipulate the values and pass it back out to be updated on your calling VI. One way to avoid the name maintenance of the cluster is to make it a typedef (customize control). This will reflect changes to field names and types for all users of the typdef. Strict typedef will also work but may be too restrictive for your usage.

The other way is to use a reference to the cluster and manipulate it completely programatically. This is more work but may have other advanantages.

Stu
0 Kudos
Message 2 of 2
(2,363 Views)