LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

link between multiple subvi

I am programming an application to control two differents instruments. My applications has to be modular, so I created multiple subvi. I have problem when I passed the parameters between the differents subvi. Because I have a lot of controls and indicator, I use cluster to pass them between my subvi. But, I have a problem because when I do changes in a cluster, I have to modify all the subvi than include this cluster. I was wondering if there was a better way to pass indicator and control between subvi.

Thank you
0 Kudos
Message 1 of 5
(2,390 Views)
Hi,
Make your cluster a type def. A type def control will be updated automatically wherever it is placed in your application. Have a look at the help menu under type definitions on how to create one.
Hope this helps.
0 Kudos
Message 2 of 5
(2,386 Views)
Ok, but if I add a control in a control cluster, I still need to modify all the subvi that have a link with this cluster. Is this possible to not duplicate the cluster in each subvi to link them together.

thanks
0 Kudos
Message 3 of 5
(2,383 Views)
Initially, you will need to replace all the control clusters in your app with the type def control cluster (using All functions - select a vi..'). No way around this (i think).
Then, if you wish to add a control to the typedef, right click on the type def, select 'Open type def', add the control to the cluster then Save. This will update all the clusters in your app.
Message 4 of 5
(2,377 Views)
Hi ouelle:

David is absolutely right, I just wanted to add that you should be sure that you have Auto Update Type Def selected for your control or indicator. You can select this by right clicking the control or constant that is the type def.

Emilie S.
National Instrument
Applications Engineer
0 Kudos
Message 5 of 5
(2,362 Views)