This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Difference Between the DAQmx Wait Until Done VI and Daqmx Is Task Done VI

Updated Jul 19, 2024

Reported In

Driver

  • NI-DAQmx

Issue Details

What is the difference between DAQmx Wait Until Done.vi and DAQmx Is Task Done.vi?

Solution

  • DAQmx Wait Until Done.vi blocks execution until the generation or acquisition is complete.
    • For finite operations, the VI completes only when the final sample is generated or acquired or an error occurs.
    • For continuous operations, the VI will never complete and will return an error when the timeout value is reached.
In general, this VI is used with finite generation tasks, as shown below, to keep the program from stopping or clearing the task until all samples have been generated.
  • DAQmx Is Task Done.vi indicates whether a task has completed execution. This VI will only return the current status of the task at the moment it is called, and therefore must be polled to find when the task is complete. A task is complete based upon the same criteria as above. This function is often used for continuous generation tasks, as shown below, to poll the status of the task for error-checking purposes. Another advantage of using this function is that it is non-blocking and allows for other code to execute within the loop.

Additional Information

For more information on these VIs, please see the DAQmx Help file, which can be access through the Windows start menu under National Instruments » NI-DAQmx » NI-DAQmx Help.