LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

save as subVI

Hi,
I'm trying to create a subVI, and am not quite sure how.
 
I have the program written, but I'm not sure how to save it.
 
How can I save the program so that I can open it in another (LabVIEW) program as just an icon with inputs and outputs?
And then how would I find it to put in another program?
I have LabVIEW 7.1 by the way.
 
Thanks,
Cory
Cory K
0 Kudos
Message 1 of 6
(7,720 Views)

You just have to save it. There is nothing special about a subVI. It is just a VI that is called by another.

In order to have inputs and outputs, you have to connect controls/terminals to the connector pane. In order to insert your VI in another, you can drag the subVI's icon to a block diagram or from a block diagram, from the functions palette - Select a VI.

All of this is explained in the online help. Search for 'Connector Pane' and 'subVIs'. You should also look at http://www.ni.com/academic/lv_training/how_learn_lv.htm for free resources to learn LabVIEW basics.

0 Kudos
Message 2 of 6
(7,715 Views)
You would save it as an regular vi but in your specified location. I personally save my sub-vi inot a llb libreay, This keeps all the VI in a single area.
 
Before you save the VI, you need to right click on the icon on the upper right hand side. There you can modify the icon and select the input and output associated with the VI. Once you do it, you just use the VI and connect the various I/O.
0 Kudos
Message 3 of 6
(7,710 Views)
I would not recommend using LLBs unless you absolutely have to. LLBs were invented back when there were filename length restrictions. LLBs are sometimes used for transport and/or distribution, though one can argue that ZIP files would work just as well. The problem with LLBs is that if one VI in the LLB gets corrupted, the entire LLB is corrupted since it's a single file.
Message 4 of 6
(7,694 Views)
Cory,

The LabVIEW 7.1 help file of interest is found in LabVIEW >> Help >> Search the LabVIEW Bookshelf... >> LabVIEW User's Manual >> Chapter 7: Creating VIs and SubVIs.  As you move forward, I'd like to stress the utility of the Error Clusters in SubVIs.  Place the Error In and Error Out clusters from the Front Panel >> All Controls >> Array & Cluster >> Error In 3D.ctl and Error Out 3D.ctl.



By including the Error In and Error Out clusters as the first and last elements of your SubVI respectively, you can enforce program flow and error handling in your SubVI's code.




Message Edited by Pie56694 on 06-10-2008 11:47 AM
Download All
0 Kudos
Message 5 of 6
(7,659 Views)
DOH! 
I don't know how many times I have looked in that menu and not noticed the error in/out clusters.  I have always just right clicked on the in/out of sub VI to create them Smiley Very Happy Smiley Surprised Smiley Sad


Message Edited by lmtis on 06-10-2008 12:20 PM
Jim

LV 2020
0 Kudos
Message 6 of 6
(7,651 Views)