LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to run two sub vi simultaneously??

i need to run two sub vi simultaneously in one main vi, becasue it is a must the two sub vi run exactly at the same time, but now i find that if i put they in one diagram ,in fact they are not exactly run at the same time. if you see in high light mode Just like the attached simple example code.  any one can help me to handle this to run the two subvi exactly at  the same time ? how to do it ? thanks so much.
0 Kudos
Message 1 of 5
(3,695 Views)
You are correct, they will not run at exactly the same time.  What is it you are actually trying to do?  What platform are you developing on? What version of LabVIEW? What processor does your target system have? This information is vital in order for us to assist you.  In a nutshell, unless you are running a real-time OS, then the OS you are running is not deterministic.  When you say "at the same time", what are you actually referring to? As a note, when executing parrallel operations in LabVIEW, the execution order may or may not be the same with the highlight bubble on as it is when it is running without highlight execution.  It is highly unlikely that you will be able to just run two sub-vis at the exact same nS.  If you are using DAQ boards, you accomplish this through triggering.  Please give a detailed description of what you are doing, and what you see the road blocks being.
Thanks

Paul
Message 2 of 5
(3,684 Views)
i use one DAQ card and need to start one AO and one AI simultaneously. Because the AO will trigger other PCBA 's output , so i need AI to get the output (donnot miss any data). I  build two sub vis for AO and AI  ,so need that .how to do ?
0 Kudos
Message 3 of 5
(3,677 Views)
Hi
   maybe, this can help, even if it is for CVI, LabVIEW operations are similar.

   Anyway, the idea is to set the trigger of both tasks on the same signal. 

   Hope it helps.... have a nice day!

graziano
0 Kudos
Message 4 of 5
(3,671 Views)
Look in the shipping examples under Hardware Input and Output>DAQmx>Synchronization>Multi-Function.
0 Kudos
Message 5 of 5
(3,653 Views)