LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to open multiple vis at a time

I'm having one main vi. In that my own menu is running.By clicking the menu i want to open and run different vis at a time.But i can to able run only one at a time.Anybody help me please.Its like opening many child windows from MDIwindow in VB
Message 1 of 21
(4,803 Views)
It's probably the effect of data flow controlled execution that is preventing you from launching more than one at a time; if you are just calling them by having them on the diagram or through a call by reference node then the loop in which the call is made will wait until the called VI has finished its run. If new VIs are to be called in that same loop...nothing will happen when you try to call them.

The solution is to call the VIs using an invoke node and set wait until done to false (see attached picture).
0 Kudos
Message 2 of 21
(4,803 Views)
The another possiblities is you insert the VI *(that you want to run when you run your main VI) in your main VI block diagram. The another thing you have to do is when you save the VI*(that you want to run when you run your main VI), you have to change the VI properties.Under
*****************
>File
>>VI properties
>>>Window Apperance
>>>>choose "top level application"
or you can do by customize vi
>> you must select
1. Show front panel when called
and CLose afterwared if originally closed
***************************
hope that will work too..
I attach two files for you.

Saw Naing Aye..
Download All
0 Kudos
Message 3 of 21
(4,803 Views)
my vis all are having while loop.any way i attached my appln for your reference.
Download All
0 Kudos
Message 4 of 21
(4,803 Views)
I did the same thing.BUt I want to open many vis like the first one to be opened like 2,3, from main vi
0 Kudos
Message 5 of 21
(4,803 Views)
Too many VIs missing to make a good example of the ones you sent, however I have made an example for you; download the attached llb file and open the main.vi in it...run it and you will see two VIs pop up, they are the "children" which produce data. Move the sliders in the child windows and you will see the values reflected on the front panel of main...

Use the type of global shown in the example, it's called a functional global...Rebuild it to hold whatever data you want to share among the VIs. Using functional globals are much better than using ordinary globals (as described in the text I referred you to in the first answer).

A few comments about the example; here the fundtional global just holds the last value, it does not buffer the valu
es. If you wanted to ensure that what was displayed on the panel of main.vi you would e.g. make the global a a circular buffer.

Controlling where on the screen the children pops up would be preferable; in that case you would read the position of main prior to opening the children...and set the position of the children so that they fit nicely at one of the sides of the main window...

Here the children monitor the front panel of main.vi and close if that panel is no longer open...a more general approach would be e.g. to use notification and perhaps also rendevouz to synchronize the exit...

Mads
0 Kudos
Message 6 of 21
(4,803 Views)
extracts these VIs to NI's default directory

Open "main_call_vis.vi", run it and you'd see.

regards
ian
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 7 of 21
(4,645 Views)
I did something like this once. You can use the VI server functions to save a copy of a VI in memory. You can then give each instance a new name, allowing them to co-exist in memory simultaneously. Calling these new VIs through the VI server (And not waiting for completion) allows them to run simultaneously.
Example : Saving VI x.vi as x-1.vi, x-2.vi and x-3.vi allows four versions of basically the same VI to be running at the same time.

You need to watch how the data is then transferred though, as this approach is no longer controlled by data dependency.

Cheers

Shane
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 8 of 21
(4,803 Views)
Actually i'm using different vis.Not the same vi to be opened at the same time.
0 Kudos
Message 9 of 21
(4,803 Views)
Did you download the example I sent earlier today? It should be the solution you need...
0 Kudos
Message 10 of 21
(4,803 Views)