LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

while loop execution order

I have a lot of while loops in one LabView VI. LabView processes this loops "simultanously", that means a bit of one loop then a bit of the next loop, and so on ...
I need that LabView processes one special loop completly, before it passes to the next loop.
How can I make this?
I use LabView 6.0
0 Kudos
Message 1 of 13
(5,716 Views)
The best way to do this is by sequencing by wire !
Simply wire the boolean out (from the end condition) to all the while loops that should execute after this first while. You don't have to wire them to the inside of theses loops the border is sufficient.
greetings from the Netherlands
0 Kudos
Message 2 of 13
(5,716 Views)
Thanks for your answer, but it is not that easy because all my whileloops have the same end condition.
And all I want is that Labview is executing ALL the steps in one of this loops before it passes to the next loop.
But labview is executing 2 or 3 steps in one loop, then a few steps in another loop, then maybe passing back to the first loop (or maybe to another loop) and executing 1 or 2 steps more,...
0 Kudos
Message 3 of 13
(5,716 Views)
In this situation I would remove all the while loops and place one big while around all the contents of the previous while loops.
greetings from the Netherlands
0 Kudos
Message 5 of 13
(5,716 Views)
I can't, because I have different wait periods in the different while loops.
0 Kudos
Message 6 of 13
(5,716 Views)
The only conclusion is that your design is wrong.
If you send it I may look at it.
greetings from the Netherlands
0 Kudos
Message 7 of 13
(5,716 Views)
you just have to wire a constant (for example) from one loop to another on.
So, the second loop will wait the first ends before beginning...
Look at my Vi.


--
Jerome LANGE
Strasbourg
andromed@club-internet.fr


"albert geven" a ?crit dans le message news:
5065000000050000006C880000-1023576873000@exchange.ni.com...
> The best way to do this is by sequencing by wire !
> Simply wire the boolean out (from the end condition) to all the while
> loops that should execute after this first while. You don't have to
> wire them to the inside of theses loops the border is sufficient.



[Attachment Loop.vi, see below]
0 Kudos
Message 4 of 13
(5,716 Views)
Guni,

This is exactly what Rendevous were created for. Put a Wait at Rendevous as the first thing in each loop and they will all start at the same time so that each while loop will have the same number of iterations when the program ends. Look at the Rendevous shipping example as a starting point.

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 8 of 13
(5,716 Views)
Thank you Randy for your answer, but I suspect that I can't solve my problem with a rendevous.
Maybe I didn't explain my problem correctly, so please have a look at the attached Loop-example VI.

When you run the VI with the Highlight - Button ON, you'll see that Labview DOES NOT execute the VI in the following manner:
One complete loop of Loop A (or turn or passage or however this is called in English), then one complete loop of Loop B, then one complete loop of Loop C, ...

Instead it is like this that Labview is executing some steps of Loop A, then maybe one or two steps of Loop B, then maybe a step of loop C or jumping back to process another little step of Loop A, ...

But I need Labview to process one complete loop of for example Loop A before exe
cuting steps of the other loops.

I hope mi problem is now a little bit clearer.
0 Kudos
Message 9 of 13
(5,716 Views)
Sorry Randy, I forgot the Loop Example VI.
Here it is.
0 Kudos
Message 10 of 13
(5,716 Views)