LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I run several VIs simultaneously?

All the VIs are programmed with global variables, but I don´t know how to run them simultaneously from one principal VI, and obtained the data calculated in each VI at the moment and not when the corresponding VI finishes. Do I explain myself? This is the specific problem, I have several VIs, each one containing a State Machine, but I want to have a principal VI, to function as a HMI, so it calls all the VIs and also obtained the data calculated on the states, but, the problem is that if I attached the state machine as a subVI, I only obtained the last result, but I want all the process results as they are calculated, not at last.

Thank you for your attention
0 Kudos
Message 1 of 3
(2,694 Views)
Hi cristag,
use the "Open VI Reference" function to load all your vi, which shall run in parallel. Then you can use the "global" variables (better queues or notifier, ...), to get the data. Smiley Happy

Hope it helps.
Mike
0 Kudos
Message 2 of 3
(2,668 Views)

cristag, mike is correct, you can use vi server.  However a very easy way to do this is to simply take advantage of LabVIEW's Parallel nature.  Call the sub vi's in parallel to your main loop.  Chose whatever data communication mechanism you like,  globals are ok but know the caveats, queues or notifires are good too.  Shared variables also work well and can be better than Queues or Notifiers if you are using LabVIEW real time. 



Message Edited by StevenA on 06-24-2008 03:35 PM

Message Edited by StevenA on 06-24-2008 03:36 PM
SteveA
CLD

-------------------------------------
FPGA/RT/PDA/TP/DSC
-------------------------------------
0 Kudos
Message 3 of 3
(2,661 Views)