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: 

Merging of VI

How to merge a new VI into an existing VI. Well i want to introduce a view into my existing VI in which i am using a Stacked sequence, I want place my New VI in one of the frame of my existing VI. Can anyone tell how many ways i can do this.?

0 Kudos
Message 1 of 5
(2,060 Views)

Hi,

 

In the development environment you just have to drag and drop, or paste, or use the "add a vi" from the pallet to put one VI inside another. 

 

Put the VI onto the block diagram, open the sequence to the frame you want, then drag the VI into that frame.

 

Mark

-------
Mark Ramsdale
-------
0 Kudos
Message 2 of 5
(2,056 Views)

Thanks for your reply sir. I am new to labview. I just started learning it. As you told me to drag the whole VI into a frame. I want let you know that i my new VI code really big so i cannot drag it so is there any better way to do this. Some one told that you can add a VI by going into the tools option and etc. Can you tell how to do this.

 

And i want to know that, i have a VI with multiple Frame overlapped on each other To make the VI small. SO know i want to see all the frames differently displayed on the screen. How can i do this

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

First, since you are just learning LabVIEW, learn to code without the stacked sequence structure. It considered by many to very bad style. Use a state machine.

 

Second, if you want the block diagram of the second VI on the block diagram of the first, dragging it to the block diagram of the first is as good a way as anything. If it's large, make it smaller. All code should fit on a single screen. If you want to call the second VI as a subVI, just drag the icon of the second VI to the block diagram of the first.

 

 

 

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

Hi,

 

Ok,  I was thinking you could add your VI as a SubVI.   Is there a reason you can't do this?

 

If you just *want* to have your code from one VI in another VI, and it is too big, then you can try the "clean up diagram" button (or sweeper) in the tool bar. 

 

You can add one VI as a SubVI by dragging the icon of the first into the seconds' block diagram, or by dragging the file from explorer onto the block diagram.  This is adding a VI. 

 

To be clear, there is adding a VI which gives you one square icon, and there is adding the code from a VI which gives you all the code icons and wire and stuff.  I suggest you just add the one VI as a SubVI to the second VI.

 

****

 

 

If you mean you want to get rid of stacked frames, you can right click the stacked frame and "replcae" with a flat sequence to see all the frames at once.

-------
Mark Ramsdale
-------
0 Kudos
Message 5 of 5
(2,044 Views)