From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting a local variable to VI Server Reference programatically?

Hi forum,

 

I want to convert a local variable to VI Server Reference programatically. Is that possible?

 

i.e. a have a list of local variables and I want to read the label of the variable so the CSV file (s/w not shown) has the correct headings linked to the local variable.

 

Dave

 

 

0 Kudos
Message 1 of 5
(3,003 Views)

The attached vi will get all the objects on the block diagram, and if an object is a Local Variable, it will save the label text to a string array.

 

IT is saved in LV 2014.

 

Local Variable Ref.png

Kenny

0 Kudos
Message 2 of 5
(2,967 Views)

I agree with this format, however it seems that you must use the Control Name property instead of the Label Text property. It looks like local variable always have a default, unchangeable label that is the same as the name of the VI they are running in.

0 Kudos
Message 3 of 5
(2,941 Views)

Thanks for the feedback.

 

I had planned on making the code in my picture a VI. Would the attributes of the local variables be passed into the embedded VI or would I just see it's value?

 

 

0 Kudos
Message 4 of 5
(2,904 Views)

I meant to say SubVI. 🙂

0 Kudos
Message 5 of 5
(2,898 Views)