LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sub vi refnum

Solved!
Go to solution

I have the attached VI that reads a file and generates a table of devices.  Code that is not shown then updates the table with measurement data.  There are several different files of devices so I would like to convert this into a sub VI. When I do this, I get the file and page start inputs and also the page1 output table.  I also get a table input which is a refnum.  What do I need to put in the main VI in order to be able to display page1 on the main front panel?  The refnum help files are not very clear on how to do this.

0 Kudos
Message 1 of 3
(1,375 Views)
Solution
Accepted by topic author chillem

Hi chillem,

 

That refnum is reference to your front panel object. You are using implicit property nodes to edit your table during the execution and you can do that, only in the same VI. At the moment you create a subvi, LabVIEW changes those property nodes to explicit linked and gives you a reference to the object (your table Page 1) which you can then drive into the subvi. If you just select everything except the controls and indicators (inputs and outputs) on your block diagram and click on Create SubVI, LabVIEW will do everything instead of you and it will work for you out of the box.

Ajskrim_0-1634713778942.png

More on the Explicitly vs Implicitly linked property nodes here:

Difference Between Implicitly and Explicitly Linked Property Node

 

Hope this helps.

_______________________________________________________________

-Patrik
CLA || CTA
If it helps - Kudo it, if it answers - Mark As Solution
Message 2 of 3
(1,336 Views)

Thanks a lot.  This is very useful.  I often make sub VIs directly from a labview source but occasionally I take old code into a new project without putting the old code into the new project and then making a sub VI.

0 Kudos
Message 3 of 3
(1,273 Views)