LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

concurrent vi

I have one VI with its own user interface, by pressing a button on it I run another VI with its user interface, now I want operate on both user interface.
How can I do this?

Thank you,
Massimo Ponte.
0 Kudos
Message 1 of 6
(3,269 Views)
Hi !
You can use and to run second.vi from first.vi. However enable you to open front panel of second.vi
Simple calling second.vi as subvi disable you manage first.vi until the second.vi dosen't finish execution.
See attached sample.
Regards.
Romek.
0 Kudos
Message 2 of 6
(3,268 Views)
Use a VI server in your first VI to run your second VI. Then you can use either front panel.
See the LabView 6.1 examples attached. Open and run VI1.vi (not VI2.vi). VI1.vi has a button to run VI2.

Here's how to do the example does.
The Application Control palette has most of the stuff you'll need.
1. Call Open VI Reference with its input set to the path of the second VI. Wire the reference output to each of the nodes below before setting the property or method.
2. Use a Property Node: Properties >> Front Panel Window >> Open.
3. Use an Invoke Node: Method >> Run VI. Set Wait until done False.
4. Put this stuff in a case wired to a button on your front panel.
Download All
0 Kudos
Message 3 of 6
(3,268 Views)
This is a interesting example. I am just wondering how does the first vi knows the second vi finished. since the wait until done on second vi is already set to false.
 
thanks
0 Kudos
Message 4 of 6
(3,159 Views)
The example doesn't know. If you want this information, you can use the VI property Execution:State. It will return Bad, Idle, Run top level, or Running.
0 Kudos
Message 5 of 6
(3,147 Views)


@tigerB wrote:
This is a interesting example. I am just wondering how does the first vi knows the second vi finished. since the wait until done on second vi is already set to false.
 
thanks


It doesn't automatically. This is the purpose as well as the absolute requirement to have two VIs run asynchronous. If you want to know if the 2nd VI has terminated you will need to use some sort of signaling mechanisme that is specifically triggered by the 2nd VI on exit and monitored by the first one. This could be as simple as a global boolean or more sophisticated through notifiers.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 6 of 6
(3,145 Views)