LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple instances of the same VI

I have a main VI. The main VI consists of a FOR loop. For each element of the for loop, the user needs to input a serial number. I am using a Sub-VI that pops up and prompts the user for the input. The user needs to enter the serial number and hit OK. Whet I need to happen is that till the user does not finish entering the serial number and hit OK the pop-up window should wait, but at the same time the execution of the main loop should not stop. the main loop should continue with its operation. Also, when the ethe pop-up window for the loop number 1 is waiting for the user input, is it possible to use the same VI to create a new pop-up window for loop no. 2?
 
 
0 Kudos
Message 1 of 6
(3,285 Views)
Hi,
You should separate your operations into two loops. Anytime you have a pop-up which waits for an input, the loop will stop. So you will need to have your input loop, and your main loop, with data tranferred through queues or Local Variables or other such methods.
To have multiple instances of the same vi, you need to create a vi template. To do this, make your pop-up vi, save as vit. Then you can call it in your program using the invoke node method. I have attached an example on how to do this.
Hope this helps.
0 Kudos
Message 2 of 6
(3,274 Views)
Thank you very much for the reply. It helps but I also wanted to know if it is possible to open multiple windows(front panels) using the same VI, one after the other.
0 Kudos
Message 3 of 6
(3,270 Views)
Im not really clear on what you are asking. Do you want to open multiple windows of your pop-up subvi at the same time from your main vi or open multilple copies of your main vi or something else? Can you explain a bit further on what you are trying to achieve? Thanks
 
0 Kudos
Message 4 of 6
(3,265 Views)

EEE_Student,

 

Here is a link to another discussion forum post with an example of a way to do this. Ignore most of the post and read just the last paragraph and take a look at the example. I think it will help you out. Good luck!

 

Tyler S

0 Kudos
Message 5 of 6
(3,241 Views)

From the standpoint of a good user interface design it's typically not a goo thing to have multiple widows popping up one after another. If you have a process that requires the entry of multiple items, it's better (i.e. easier to use) to create a dialog box VI that does it all at once.

What exactly is it that you are trying to accomplish?

Mike...

 


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 6
(3,238 Views)