Table Of Contents

Wait (Microseconds) (G Dataflow)

Last Modified: January 12, 2018

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

Programming Patterns
connector_pane_image
datatype_icon

microseconds to wait

Number of microseconds to wait.

Wiring a value of 0 to this input forces the execution system to check for other available code to execute.

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 wraps around and starts again from zero. You can configure the Counter size of the node in the Item tab.

Highest Timer Resolution

The highest timer resolution for this node is one millisecond. Microsecond or tick values are rounded to the nearest millisecond value.

datatype_icon

microsecond timer value

Value of the operating system's microsecond 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 that the input specifies, the actual wait time is longer than the time that the input specifies.

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 have 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 is used by any 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: All devices (only within an optimized FPGA VI)

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


Recently Viewed Topics