Wait Until Done
- Updated2023-02-17
- 3 minute(s) read
Wait Until Done
Pauses execution of your program until the dynamic data operation is completed or the node returns a timeout error.
The Wait Until Donenode periodically checks the operation status and returns control to the calling program if the operation completes successfully or if an error occurs (including a timeout error).
Use this node for finite data operations that you expect to complete within a certain time.
Inputs/Outputs

session in
Instrument session obtained from the Initialize Acquisition Sessionnode, the Initialize Generation Sessionnode, or the Initialize External Calibrationnode.

maximum time (ms)
The time, in milliseconds, allotted for the node to complete before NI-HSDIO returns a timeout error.
If you set the value to -1, the node never times out. If you set this parameter to 0, the node returns immediately with up to the number of samples specified in samples to read.
Setting a value of 0 can be useful to manually poll for hardware errors after a data operation has been initiated. If no other error has occurred and the data operation is still not complete, the node returns a timeout error.
When setting a value of -1, be careful not to use this value during a continuous operation, as it never returns unless a hardware error occurs. Perform a manual device reset from Measurement & Automation Explorer if you cannot exit this state or use the niHSDIO Reset or niHSDIO Reset Devicenode from the other session of the device.

error in
Error conditions that occur before this node runs.
The node responds to this input according to standard error behavior.
Default value: No error

session out
Handle that identifies the session in all subsequent node calls.
The session out parameter is obtained from the Initialize Acquisition Sessionnode or the Initialize Generation Sessionnode.

error out
Error information.
The node produces this output according to standard error behavior.