LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I put a time delay between specific events in a while loop?

How can I put a time delay between specific events within the same while loop? I'm already using the "wait" command to control the overall loop iteration speed. But I want to time the individual events as well.
0 Kudos
Message 1 of 5
(2,983 Views)
Hi Jesse,

You can use a flat sequence. In each box you can put your individual events and attached wait.
Don't forget to reduce your total loop time of the time you added in the individual sequences.

Doc-Doc
Doc-Doc
http://www.machinevision.ch
http://visionindustrielle.ch
Please take time to rate this answer
0 Kudos
Message 2 of 5
(2,983 Views)
Thanks Doc! A few more questions, though. Should I put the flat structures inside my larger while loop? And when you say "attached wait" you mean put a wait command in the flat box, correct?
0 Kudos
Message 3 of 5
(2,983 Views)
You could also use a state machine with a delay state and a state for each of your events then just iterate through the states as needed.... if you need an example i can wire up something real quick if you need...

Dan
0 Kudos
Message 4 of 5
(2,983 Views)
What are you referring to when you say specific events in a while loop? I'm assuming that you're not referring to event structures but are rather referring to specific tasks which are to be carried out, as have Doc-Doc and Dan. When there are several tasks to be performed I often compartmentalize those tasks into subvis. By doing this you can readily add a wait timer in the subvi to give results similar to Doc-Docs suggestion without having the diagram cover three screens.
0 Kudos
Message 5 of 5
(2,983 Views)