LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

add sub VI

hey all,

 

I am new to LabView and I have a very stupid question but I just can't find the answer.

 

I have managed to interface with an optical spectrum analyzer: write, read, make it dynamic as I need. 

 

I did it with a VI called main and many other VI which I use as sub VI by copping their block diagram and do "create subVI". now that everything is working properly I want to wrap it in a more organized way.

 

so my question is - how do I add  a subVI? I know how to create one from functions in the block diagram - but lets say I accedently delete it - how can I add it back without coping its block diagram and create a subVI again? and how can I rename it instead of the default number?

 

thanks, Avishay

 

0 Kudos
Message 1 of 5
(2,317 Views)
Message 2 of 5
(2,304 Views)

Make sure you save your subVIs somewhere on your disk.  Then right-click on your block diagram and select "Select a VI...":

 

subvi.JPG

 

This will bring up a file browsing window, and then you can navigate to where the VI is saved and select it.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
0 Kudos
Message 3 of 5
(2,290 Views)

First of all, you should be using a project to organize your code.  Then it is as simple as dragging the VI you want from the project explorer onto your block diagram.

 

You could also drag the VI file from Windows Explorer onto your block diagram.  The Select VI palette item is the other common way.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 5
(2,279 Views)

Drag from Explorer, project environment, other vi or if you have the vi open, you can drag it's icon to another VI to use it as sub-vi.

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 5
(2,267 Views)