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 win LV
an i have fundamental question:
what decides abut order in which LV executes loop
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 wuestions from me
thanks a lot
orzech
0 Kudos
Message 1 of 7
(2,653 Views)
if you need them to execute in a certain order, you can put then in a 'sequence' loop.

pat
0 Kudos
Message 2 of 7
(2,653 Views)
In article <50650000000500000055340000-993342863000@exchange.ni.com>,
x@no.email says...
> if you need them to execute in a certain order, you can put then in a
> 'sequence' loop.
ok, but i still don't know if there's any rule about executing loops
orzech
0 Kudos
Message 5 of 7
(2,653 Views)
The rule is that unless you specifically use some sort of dataflow (preferably a wire instead of a sequence) the loops execute in parallel and there is no way to know which loop will start first.
0 Kudos
Message 7 of 7
(2,653 Views)
The best way to order execution in LabVIEW is with "sequencing by wire" not a sequence !
Sequencing by wire for while loops can be done by connecting any output to the next while border. If no output is available you can connect the stop condition to the next while. The great feature of not using sequences is that the program can be viewed without having to click through sequence frames. But if you use sequences, never use more than one or two sequence locals. These make any program almost unreadable.
greetings from the Netherlands
0 Kudos
Message 3 of 7
(2,653 Views)
hi,

all inserted loops of one VI will run in parallel mode inside the same
thread. You can't directly define which order they will start but use
sequences to run them one by one.

hope that helps
Henrik

schrieb in im Newsbeitrag:
MPG.15ae6d44ab9a33c8989680@news.vogel.pl...
> hi
> i can say i'm starting win LV
> an i have fundamental question:
> what decides abut order in which LV executes loop
> 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 wuestions from me
> thanks a lot
> orzech
0 Kudos
Message 4 of 7
(2,653 Views)
Only data dependancies determine execution order. If there is a wire going from one loop to another, the first loop must complete before the second one starts.

If there are no wires between them, the loops all execute at the same time (or at least, they might).

You can not assume anything about execution order if there is no data dependancy. Even if it works on one machine, it may not work on another machine, or even when you run it a while later on the same machine.

If there is no data dependancy, you can 'create' one by putting a constant value (for example a TRUE boolean) in one loop, and then wire it to the second loop.
0 Kudos
Message 6 of 7
(2,653 Views)