Wait Until Done

LabVIEW 2018 SoftMotion Module

Edition Date: March 2018

Part Number: 371093W-01

»View Product Info
Download Help (Windows Only)

Owning Palette: SoftMotion Module

Ensures that a synchronous operation completes successfully. Details

/images/reference/en-XX/help/371093W-01/cmclrn.gif motion handle is the SoftMotion interface object refnum.
/images/reference/en-XX/help/371093W-01/cmclrn.gif timeout specifies the timeout value, in seconds, for the operation. If the operation has not ended by completing, aborting, or returning an error in the specified time the timed out? parameter is set to TRUE and SoftMotion returns an error. Setting timeout to –1 (default) disables this feature.
error in describes error conditions that occur before this VI or function runs. This input provides standard error in functionality.
/images/reference/en-XX/help/371093W-01/imclrn.gif motion handle out is the SoftMotion interface object refnum.
/images/reference/en-XX/help/371093W-01/ibool.gif timed out? returns TRUE when the current operation execution time exceeds the specified timeout value.
error out contains error information. This output provides standard error out functionality.


Use the Wait Until Done VI to ensure that a synchronous operation completes successfully. Unlike the Wait Until Done method, the Wait Until Done VI uses an adaptive polling method in which the VI starts polling at the rate equal to the specified Poll Rate property (10 ms by default). The interface receives the default poll rate from the resource that it is configured with. During execution, the VI uses the following equation to determine the poll rate for the next iteration:

nextPollRate = MAX(timeToCallReadStatus * 2 * 0.1 + currentPollRate * 0.9, specifiedPollRate)

Calculating the poll rate in this way ensures that SoftMotion achieves an appropriate poll rate within 10 scan periods that matches the system response. On a real-time target this prevents the system from consuming all the time if the poll rate is set to a very fast level, and on Windows systems it prevents the processor from continually sending packets requesting status faster than a response can be returned.

National Instruments recommends using the Wait Until Done VI rather than the Wait Until Done method in all applications to prevent locking up a LabVIEW thread until the method completes execution. Refer to Multitasking, Multithreading, and Multiprocessing for more information about LabVIEW memory and performance management.

Each SoftMotion interface class/move mode has different requirements for an operation to be considered done. When you use this VI with SoftMotion Express VIs, the done requirements are listed in the Block Diagram Outputs table for each VI. When you use this VI with SoftMotion Properties and Methods refer to the Read Status method for a description of the behavior of the Done output for each SoftMotion interface class.


Not Helpful