Table Of Contents

Wait (Milliseconds) (G Dataflow)

Last Modified: January 12, 2018

Causes the diagram or subdiagram to wait a specified number of milliseconds before completing execution.

Programming Patterns

milliseconds to wait

Number of milliseconds to wait.

Wiring a value of 0 to this input forces the current thread to yield control of the CPU.

Maximum Input Before Timer Wrap Around

If the wait time you specify is greater than the maximum allowed for the Counter size of the Wait node, the expected program wait time will wrap around and start again from zero. You can configure the Counter size of the node in the Item tab.


millisecond timer value

Value of the operating system's millisecond timer after the wait.

Timer Accuracy

The accuracy of the timer varies across operating systems. If the operating system takes more time to process a request than the time specified by the input, the actual wait time is longer than the time specified by the input.

When to Use Wait Until Next Multiple instead of Wait

If you need to ensure that an operation waits at least the specified time before completing execution, you can use either a Wait node or a Wait Until Next Multiple node. However, for functions that feedback an output as an input and require consistent timing between iterations to achieve equilibrium, such as a PID node in a loop, use a Wait Until Next Multiple node. Compared to Wait nodes, Wait Until Next Multiple nodes provide more periodic spacing between iterations because even if one iteration finishes late, the following iteration still executes on the multiple of the Wait Until Next Multiple input.

Thread Availability During Wait Time

When an active execution system thread in a program reaches a Wait node in the millisecond configuration, the node execution is rescheduled cooperatively and the temporarily available thread can be used by other currently-executing code until the wait time expires.

When you use the microsecond or tick configuration of this node, the thread which encounters the Wait node is blocked until the wait time expires.

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices

Web Server: Supported in VIs that run in a web application

Recently Viewed Topics