LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to synchronise a for loop in time domain

Hi everyone,
I'm running a for loop which executes some complex code, and due to some reason everytime the loop runs it takes different time...like sometimes it executes in 0.91s sometimes in 0.93s sometimes in 0.89 s. I want to synchronise the loop so that it can execute after every fixed interval of time say after every 1s(1000ms). Is there any pallete in Labview which can make this..any  delay which starts everytime loop starts and waits till prespecified period of time.
Looking for help,
Regards
0 Kudos
Message 1 of 5
(2,946 Views)
There is the timed loop in the structures/time structures pallette.  It is the one that has the blue box around it.  It is a while loop and not a for loop.  But if you put compare the index value of the loop with your desired loop count, you can tell the loop when to end.

Message Edited by Ravens Fan on 06-07-2007 11:17 PM

0 Kudos
Message 2 of 5
(2,932 Views)
Yes, place a "wait next ms multiple" in your loop and wire a 1000 to it.
 
(btw, how are you measuring your loop time?)
0 Kudos
Message 3 of 5
(2,927 Views)
I want to synchronise my loop time and trying to develop a stopwatch kind of thing...which triggers once I press a Boolean control and stops on other boolean condition in resolution of ms...Can you give any hint, how to achieve it?
0 Kudos
Message 4 of 5
(2,925 Views)
0 Kudos
Message 5 of 5
(2,911 Views)