LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to add a timed pause to a loop?

I am quite new to labview, this is my first week using it, but what I want to do is add a timed pause to a loop.  I have a 2D scan vi that moves in x and y, resets and repeats as many times as specified, what I'd like to have it do is move in x and y, pause for say 5 seconds, then reset to restart the loop.  any help?

RJ
0 Kudos
Message 1 of 4
(2,324 Views)

Hi RJ,

i think you should use a state machine architecture. Use one state to scan the array and another to wait 5 seconds. There are shipped examples how this works.

Hope it helps.
Mike



Message Edited by MikeS81 on 06-25-2008 04:53 PM
0 Kudos
Message 2 of 4
(2,322 Views)
The short answer: Insert a Time Delay function, found in the Timing palette. Be sure to wire the error clusters so that you can skip the wait if your scanning generates an error.



The long answer: The state machine architecture will require you to recode your implementation, but ultimately give you a more robust architecture. You will need to have a wait state, as mentioned. Whether or not this wait state should wait the full 5 seconds or wait a short amount of time and you come back to it until the full 5 seconds are up depends on the rest of your application and how sensitive you are to something happening within those 5 seconds.


Message Edited by smercurio_fc on 06-25-2008 10:21 AM
Message 3 of 4
(2,314 Views)
cheers!
0 Kudos
Message 4 of 4
(2,285 Views)