LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

a little hepl for green one ;o)

hi
i can say i'm starting in LV
an i have fundamental question:
what decides abut order in which LV executes loops?
example:
i have 3 while loops on one panel
which one will be executed first and how to change the order?

be sure there will be more questions from me
thanks a lot
orzech
0 Kudos
Message 1 of 4
(2,871 Views)
Each while loop executes at some time after the point where all the inputs wired to it are ready, and before any of the outputs wired to it are ready.
(The same can be said for case structures, for loops, event structures, sub-VI's.. etc.)
If none of the while loops have wiring between them, LabVIEW determines its own order... A program written this way is incorrect unless it matters not which while loop executes first, such as if none of the while loops depend on anything happening in the others.

If you need to force the while loops to execute in a certain order, you can force the order of execution by wiring something between them, even if that item does not matter.. (for example, you could just wire a constant to an indicator...all the way through all the wh
ile loops)...
Error cluster wires often provide a convenient alternative for this artificial dependancy...
Message 2 of 4
(2,871 Views)
(also... use the highlight execution button in debugging mode (the yellow light bulb on the block diagram... then you can follow the execution flow visually)

Good luck!
0 Kudos
Message 3 of 4
(2,871 Views)
Maybe you can use Sequence for these 3 while loops.

Bill.
0 Kudos
Message 4 of 4
(2,871 Views)