LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass control references to subVI using Invoke Method

Hi guys,

 

Can I use <Control Value Set invoke method> to pass some control references to a sub VI, then use the <Run VI invoke method> to run the sub VI with the previously passed data?  The control refnums are for some frontpanel controls in the Main VI.

I was able to pass other data but the refnum didn’t work.

 

Thanks

0 Kudos
Message 1 of 4
(3,711 Views)

Hi there, There are a couple examples that use the same method. Check them here:

 

- Set Control Values and Trigger UI Events in Another VI        

- Set Values and Properties of Controls in a SubVI

- Save and retrieve front panel control values

Alejandro C. | National Instruments
0 Kudos
Message 2 of 4
(3,682 Views)

THe code included in this Nugget uses the method you are attempting but rather than a ref to a clontrol it uses a ref to an occurnece. THe ideas should be the same.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 4
(3,672 Views)

In later versions of LabVIEW (2011 and later) passing the values directly to the con pane with an Asynchronous Call by reference node is prefered to the control val set / Run VI method.  If you have 2011 look for the ACBR examples under New for 2011


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 4
(3,663 Views)