LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Runing at the same time two routines sidebyside in single VI

I want to run two routines side by side in a single VI at the same time....how can i do this..???
 
0 Kudos
Message 1 of 7
(2,832 Views)
Put them in separate while loops.
0 Kudos
Message 2 of 7
(2,822 Views)
But they wil be running one after another, the thing i want to perform is to run two while loops at one time...
0 Kudos
Message 3 of 7
(2,777 Views)
The only way that they will run one after another is if you have data from one loop wired to the other loop. If there is no wire between them, they run in parallel.
0 Kudos
Message 4 of 7
(2,772 Views)
Is there any way of putting the things as ...
Two while loops are executing in parallel, with connections, one loop executes and the other waits for a value from the first while loop to arrive, it executes that value and now again waits for the value from first loop to arrive, another thing to add is that when the first loop gives a value to the second loop, the second loop should accept that value at once and start executing the loop with that value.
0 Kudos
Message 5 of 7
(2,753 Views)

Hi Sharjil

The Producer Consumer Desing Pattern is what you are looking for.

Search the forums for this term and you will find various threads.

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 6 of 7
(2,746 Views)
Hi Sharjil,
The producer/consumer pattern is exactly correct.  You can view a template for how this can be done by opening LabVIEW to the "Getting Started" splash screen.  You then click on "more" in the New Files section.  Go to VI>>From Template>>Frameworks>>Design Patterns>>Producer/Consumer Design Pattern (Data).  You can use this template with its queues to send data between two loops that are running in parallel.  For more information on this architecture, check out
 
Thanks and good luck!
reggier
0 Kudos
Message 7 of 7
(2,725 Views)