LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time delays

Ok this question may seem really dumb but for some reason my time delays do not seem to be doing anything. Am I missing something here? Do they only work in loops? I have mine inside a flat sequence which is inside a for loop. Why wont it work? Do I need to connect anything besides the time I want it to delay? I am using a Wait(ms) icon, what is going on?
0 Kudos
Message 1 of 5
(3,237 Views)
Usually you just wire the number of mx to the input of the Wait ms VI and go from there.  Maybe if you submitteed a screenshot or your VI we could take a look at it and see if something else is going on.

Have you tried using the Highlight Execution to see if you are acutally going to the frame that has the wait ms in it??

Kenny
Kenny

0 Kudos
Message 2 of 5
(3,219 Views)

I have never found an instance where time delays don't delay 😉

Remember that the inputs is in milliseconds, not seconds, so to get a 1 second delay you would wire a 1000 to it.

If you still have problems, please attach your code. 🙂

0 Kudos
Message 3 of 5
(3,217 Views)
I know it does go into it because my equipment reacts to the flat sequence, but the is no delay.
0 Kudos
Message 4 of 5
(3,214 Views)
The delay will only execute if that particular case is active (Signal Generator=1). Is it?
 
Within that case structure, you cannot predict what starts executing first, the 5000ms delay or the VISA stuff. Most likely they will start virtually simultaneously and the total time spent in that case structure will be the larger of (1) Time to execute the VISA stuff and (2) 5000ms.
 
Notice that the flat sequence around it does not do anything, you can delete it without change in functionality. Execution order is entirely determined by dataflow alone.
 
Notice also that your "Numeric 8" increment operation has no data dependency, and will thus complete probably way before anything else in each iteration of the big loop. (You might want to use a shift register instead of local variables here, see: this example for a comparison)
0 Kudos
Message 5 of 5
(3,184 Views)