LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delay a loop

i would like to ask..how to delay a loop?
i mean..i would like a for loop, wait 3 seconds before it start to run
every time it is called. but dont mean that, i would like the looping
time is 3 seconds, just the time delay at the begining...

how to do that?
i have already used the wait until millisecond to control the looping
time..
hows the different?

thanks ~~~
0 Kudos
Message 1 of 3
(2,846 Views)
Crystal wrote:
> i would like to ask..how to delay a loop?
> i mean..i would like a for loop, wait 3 seconds before it start to run
> every time it is called. but dont mean that, i would like the looping
> time is 3 seconds, just the time delay at the begining...
>
> how to do that?
> i have already used the wait until millisecond to control the looping
> time..
> hows the different?
>
> thanks ~~~

To delay a loop just once before it starts put a "Wait(ms)" outside the
loop, wire the "millisecond timer value output" to the anywhere on the
loop's border. Now the loop can't executue until the timer has executed
because the loop is waiting for it's new input to be ready.

The next problem is getting the timer to start when you want it to and
not when the pogram is f
irst run. This requires that we have some data
flow to trigger the timer. To do this put a single sequence around the
timer and connect the wire which is acting as a dataflow source to
anywhere on the frame of the sequence. Now the timer can't trigger until
the dataflow reaches the sequence and the loop can't execute until
the timer has finished.

The other way is to use a two frame sequence with the wait in the first
frame and the loop in the second. It probably depends if that would make
your diagram easier to understand or not 🙂

Regards,

Dave R.
0 Kudos
Message 2 of 3
(2,846 Views)
Thanks a lot!
i can do that now, really thanks for yr great help!!!
😆
0 Kudos
Message 3 of 3
(2,846 Views)