05-24-2007 09:08 AM
05-24-2007 09:14 AM
Sequentially or in parallel?
You can place all vi in a toplevel vi and control their order through data flow (or sequence structure if all else fails). You can also launch the vi by reference and let them run in their own thread (see examles finder).
If you plan to run multiple programs(Vis) in parallel make sure any shared Vi are reentrany and that you dont access the same resources from multiple locations.
Paul
05-24-2007 09:15 AM - edited 05-24-2007 09:15 AM
Presumably these VIs are meant to be running at the same time as the main VI? Then you can just use the VI Server to launch the VIs. This is referred to as running VIs dynamically. There are examples that ship with LabVIEW that show you how to load and run a VI dynamically.
EDIT: Sorry for the double answer. Posted at the same time, causing a cross-post.
Message Edited by smercurio_fc on 05-24-2007 09:16 AM
05-25-2007 02:13 AM
All the VIs must run in parallel. I have a main VI which need the launch of other VI added to my project to run correctly. So they must start at the same time (when I launch the main).
Thanks
julien M
05-25-2007 08:44 AM
Just Place all the VI including MAIN on a new top level ("Launcher"). There are a couple things to be warned about.
1. No parallel vi share critical resources without considering effects.
2. All subvis shares in paralles are reentrant.
3. All race conditions and deadlocks are evaluated and handled (Assuming shared resources)
4. How so signal a shutdown (I hate seing an exit labview for a lazy escape). Consider having an input signal/message to all parallel vi to know when to safely terminate the subvis.
There are a few other things to consider but these are the main gotchas in concurrent LV programming.
Paul
05-25-2007 08:58 AM
Ok. I try to do that.
Thank you very much Paul.
Julien
05-25-2007 09:28 AM
Excuse me again paul, If you have a simple application running with LabVIEW 8.2, and using a top level to lauch VIs, that would help me much. I'm a beginner with LabVIEW, and I do not understand how to use the top levels.
thanks for your attention.
julien
05-25-2007 11:49 AM
Its as simple as placing all vi on the block diagram including the main vi. then run this VI. all subvi will now run and this new toplevel vi will not terminate until all subvi end. If the order of launce is important or the ability to stop all vis when one stops then a more complex approach is needed. Such as dynamic vi or message passing/ synchronization techniques.
Paul
06-06-2013 10:01 PM
Are there any tricks to showing all 3 VIs panels at the same time? How do you recommend doing this - by invoke nodes or by simply configuraing show panel on execute?