From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

passing control refnum from subVI to main VI

Hi,

 

I have a control box with the property nodes (values) wired to case structure, but this is a subvi.

 

I want to wire to the property node from main VI, the user will control the drop down value from main vi and send it to the subvi and display the information from my txt file. Is there any way to do it using control refnum?

0 Kudos
Message 1 of 7
(3,056 Views)

KISS, Keep It Simple Silly. 🙂

 

Why complicate things with the control ref? Send the string.

You dont explain what you want to do, but how you hope to do it. Unless there's a specific reason for using control ref it's rarely needed.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 7
(3,038 Views)

Also, if you can post the VI it's easier to understand what's the problem.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 7
(3,038 Views)

Yes, you can.

 

You have linked the property node directly to a control.

 

What you need to do is to right click the terminal and select Create > Reference.

 

Then under the Application Palette select the Property or Invoke node.

 

You can put this in the subvi and wire it up like a normal subvi.

 

 

Kenny

0 Kudos
Message 4 of 7
(3,031 Views)

i attached the subVI (quite messy). 

 

i plan to have the user to input the machine model through combo box, goes through a lookup and find the respective text file and display the config details on my main VI. But the problem is I could not link the property node (values) to my main VI for the user to control 

0 Kudos
Message 5 of 7
(3,022 Views)

I've clean it up some and made some small changes. As it is now, it's a pure sub-vi to which you feed the selection made in a combo box (which should be in the main vi) and among other things you get your filelist out which you can set the strings[] property with.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 7
(2,994 Views)

thanks so much. I will edit more on my main VI.

0 Kudos
Message 7 of 7
(2,955 Views)