Buffering

NI-DAQmx Key Concepts

Buffering

A buffer is a temporary storage in computer memory for acquired or to-be-generated samples. Typically this storage is allocated from your computer's memory and is also called the task buffer. For input operations, a data transfer mechanism transfers samples from your device into the buffer where they wait for a call to the Read function/VI to copy the samples to your application. For output operations, the Write function/VI copies samples into the buffer where they wait for the data transfer mechanism to transfer them to your device.

When Is a Buffer Created?

If you use the Timing function/VI and set the sample mode to finite or continuous, NI-DAQmx creates a buffer. If you set sample mode to hardware timed single point, NI-DAQmx does not create a buffer.

If you set the Data Transfer Mechanism to Programmed I/O or set the buffer size to zero by using either the Input or Output Buffer Config function/VIs, NI-DAQmx does not create a buffer (even if you also used the Timing function/VI). A data transfer mechanism of programmed I/O means there is no buffer.

See Also

How Is Buffer Size Determined?

Reference Triggering Impact on Buffers

Continuous Acquisition and Generation with Finite Buffer Size

Controlling Where in the Buffer to Read Samples

Read Status Attributes/Properties and Buffers

Controlling Where in the Buffer to Write Samples

Write Status Attributes/Properties and Buffers