LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Order of occurance within a loop

Hi,
I need to execute two commands in a loop. After the first command is executed the system must wait for about 30 seconds before the next is carried out. In what order with LV execute the elements within a loop? I am not sure if the program is executing the two commands first and then waiting.
Any hints / suggestions?
Thanks
0 Kudos
Message 1 of 4
(2,750 Views)
Try creating data dependency between your tasks. This will force an order. This is typically done by wiring between objects. If you don't have any terminals to wire to such as the error in or error out place a single frame sequence structure around the code and just wire to the side of the sequence structure. This will force the order you are looking for. Hope this helps.
BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 2 of 4
(2,750 Views)
Thanks a lot, I like the "putting a sequence frame" around the group idea. I should be able to work that in.
0 Kudos
Message 3 of 4
(2,750 Views)
If the execution order is important, you must use data dependencies to force
the order. Otherwise, LabVIEW will determine the execution order using its
own algorithm. If the sub-vi's or functions you are using do not provide an
easy method for using data dependencies, such as wiring together error
terminals, you can use film sequence structures. You can also use single
frame sequence structures with data out of one structure wired to the frame
of a subsequent structure.

"Gyro" wrote in message
news:50650000000800000016C20000-1077587809000@exchange.ni.com...
> Hi,
> I need to execute two commands in a loop. After the first command is
> executed the system must wait for about 30 seconds before the next is
> carried out. In what order with LV execute the ele
ments within a loop?
> I am not sure if the program is executing the two commands first and
> then waiting.
> Any hints / suggestions?
> Thanks
0 Kudos
Message 4 of 4
(2,750 Views)