05-26-2021 05:36 AM
Hello Everyone,
If I Run 5 Sub Vi In Parallel and another Condition Same 5 Sub Vi In Series. Wait Time is 100ms
How Time execution Work in Series and Parallel Operation?
Thank you.
Series
parallel
Solved! Go to Solution.
05-26-2021 06:31 AM - edited 05-26-2021 06:34 AM
Hi rupesh,
ever heard of the basic THINK DATAFLOW! mantra of LabVIEW?
The loop will iterate when all its content has been executed! (DATAFLOW!)
So it will iterate when all subVIs are executed AND the parallel running 100ms wait is finished.
Executing your subVIs will take longer to execute in series (one after the other) than in parallel. Depending of the code inside those subVIs executing them in series may even take longer than your 100ms wait (which may also happen when executed in parallel)…
05-26-2021 07:50 AM - edited 05-26-2021 07:56 AM
As GerdW said your loop will not run faster than the loop timer (100 ms in your example). If you want to decrease the time then make the loop timer smaller. Additionally, if that is 5 copies of the same subvi as it appears then you must set the subvi to run reentrant in order to run in parallel. If the subvi is at the default non-reentrant then each copy of the subvi has to complete before another copy can execute.
Edited to add: I made the assumption that you had tested both loops and were coming up with identical 100 ms timing, which you should if the code in the subvis run fast enough to complete 5 times in 100 ms.
05-26-2021 03:07 PM
There is not enough information to really answer anything:
05-26-2021 11:46 PM
Hi GredW,
Thank for Reply.
My Quires is ,How WAIT time is Working? when Code Executed ,For Below Sub Vi
Its Wait 100ms For All 5 Sub Vi or it will Divide for 5 Sub Vi ?
Thank you.
05-26-2021 11:54 PM
It has nothing to do with how many subVI's there are.
It is its own parallel path. The loop won't finish and iterate again until all code inside is done. If 1 or 100 subVI's go really fast, faster than 100 milliseconds, the the Wait will hold up the loop because it won't finish until the 100 milliseconds have passed.
If those subVI's take a long enough time, either running together or in series, or some combination where it takes more than 100 msecs for them to finish, then the wait function will finish first after 100 msec, but the loop iteration won't finish until all that other code has also finished.
05-27-2021 12:35 AM
Hello Sir,
Its very Nice To Explained. It Was Clear Concept, For Me.
Thank you In Advanced.