When Does the DAQmx Write VI Finish Execution?

Updated Jun 28, 2018

Reported In


  • LabVIEW


  • NI-DAQmx

Issue Details

I am designing an application using DAQmx to send single bits using programmed digital I/O. This needs to have reliable timing. Therefore I need to know what has actually happened when the DAQmx Write VI returns control to LabVIEW. Is it either of these two alternatives?
  1. The request has been sent to the DAQ board and the output has already happened.
  2. The request has been sent to the DAQ board (and it is unknown if the output has already happened or if it will happen later on).


Using the DAQmx Write VI to write samples, the behavior will depend on how you specify the task timing:
  1. If the task uses on-demand timing, this VI returns only after the samples have been transferred to the device and after the device's output operation has completed. On-demand is the default timing type if you do not use the DAQmx Timing VI.
  2. If the task uses any timing type other than on-demand, the DAQmx Write VI returns immediately and does not wait for the device to generate all samples. Before stopping the task your application must determine if the task is done to ensure that the device generated all samples.

Additional Information

The described behavior is the same throughout the DAQmx API.

Both the DAQmx Wait Until Done VI and the DAQmx Is Task Done VI can be used to determine if a non-retriggerable generation has finished.