Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Wait (ms) Function

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Owning Palette: Timing VIs and Functions

Requires: Base Development System

Waits the specified number of milliseconds and returns the value of the millisecond timer. Wiring a value of 0 to the milliseconds to wait 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  

milliseconds to wait specifies how many milliseconds to wait. This function does not wait for longer than 0x7ffffff or 2,147,483,647 ms. To wait for a longer period, execute the function twice. 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 (ms) Details

When LabVIEW calls a VI for example, if millisecond timer value is 112 ms and milliseconds to wait is 10 ms, the VI finishes when millisecond timer value equals 122 ms.

Use the Wait For Front Panel Activity function to eliminate the need for continually polling the front panel to determine if the value of a front panel object changes.

Timer resolution is system dependent and might be less accurate than one millisecond, depending on your platform. Use the Wait Until Next ms Multiple function to improve resolution.

Note  The Wait (ms) function behaves differently on Windows and the LabVIEW Real-Time Module. (Windows) The Wait (ms) function waits up to the value specified in the milliseconds to wait input. (Real-Time Module) The Wait (ms) function waits at least the value specified in the milliseconds to wait input. The Wait (ms) function has a margin of error of plus or minus one millisecond.

 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit