DAQmx Buffer Size Allocation for Finite or Continuous Acquisition

Updated Oct 4, 2025

Reported In

Driver

  • NI-DAQmx

Issue Details

  • How does DAQmx allocate buffers?
  • How large is my acquisition buffer?
  • How do I make my buffer size larger?

Solution

With NI-DAQmx, memory allocation for input/output tasks is typically handled automatically for you in the DAQmx Timing Function (for LabView, see DAQmx Timing (VI) - NI).

 

Input Tasks:

 

  • If the acquisition is finite (sample mode on DAQmx Timing function is set to Finite Samples), NI-DAQmx allocates a buffer equal in size to the value of samples per channel. 
  • If the acquisition is continuous (sample mode on the DAQmx Timing function is set to Continuous Samples), NI-DAQmx allocates a buffer equal in size to the value of the samples per channel attribute/property, unless that value is less than the value listed in the following table. If the value of the samples per channel attribute/property is less than the value in the table, NI-DAQmx uses the value in the table. 

 

Sample RateBuffer Size
No rate specified10 kS
0-100 S/s1 kS
101-10,000 S/s10 kS
10,001-1,000,000 S/s100 kS
>1,000,000 S/s1 MS
 

Note: You can override the default buffer size by calling the DAQmx Configure Input Buffer VI.

 

Output Tasks

 
For an output task, the amount of data you write before starting a generation determines the size of the buffer. The first call to a Multiple Samples version of the Write function/VI creates a buffer and determines its size. 
 

You also can use the Output Buffer Config function/VI to create an output buffer. If you use this function/VI, you must use it before writing any data.

 

The samples per channel attribute/property on the Timing function/VI does not determine the buffer size for output. Instead it is the total number of samples to generate. If n is your buffer size, setting samples per channel to 3×n generates the data in the buffer exactly three times. To generate the data exactly once, set samples per channel to n.

 

Additional Information

This information can all be found in the NI-DAQmx Help documentation. In Windows, you can find this documentation by going to Start»Programs»National Instruments»NI-DAQmx Documentation. In the help file, this specific information is located in the Buffering section under Key NI-DAQmx Concepts. Along with this topic, many other common questions and problems can be answered through the information in this help file.