Wait Until Next ms Multiple Function

Owning Palette: Timing VIs and Functions

Requires: Base Development System

Waits until the value of the millisecond timer becomes a multiple of the specified millisecond multiple. Use this function to synchronize activities. You can call this function in a loop to control the loop execution rate. However, it is possible that the first loop period might be short. Wiring a value of 0 to the milliseconds multiple input forces the current thread to yield control of the CPU.

This function makes asynchronous system calls, but the nodes themselves function synchronously. Therefore, it does not complete execution until the specified time has elapsed.

Details  

 Add to the block diagram  Find on the palette
millisecond multiple is the input that specifies how many milliseconds lapse when the VI runs. Wiring a value of 0 to this parameter forces the current thread to yield control of the CPU.
millisecond timer value returns the value of the millisecond timer after the wait.

Wait Until Next ms Multiple Details

When LabVIEW calls a VI for example, if millisecond multiple is 10 ms and millisecond timer value is 112 ms, the VI waits 8 more milliseconds until the millisecond timer value is 120 ms, a multiple of 10.