Solution
Memory allocation is typically handled automatically by DAQmx. However, You can manually override NI-DAQmx's choice of buffer size by calling the DAQmx Configure Input Buffer VI (or DAQmx Configure Output Buffer VI for output operations) found on the functions palette under
Measurement I/O»DAQmx - Data Acquisition»DAQmx Advanced Task Options. This VI overrides the automatic buffer allocation that NI-DAQmx performs. The DAQmx Configure Input Buffer VI allocates the acquisition buffer based on its input parameter
buffer size, which is specified in terms of the number of samples the buffer can hold for each channel in the task.
The snippet below shows a common way of adding the DAQmx Configure Input Buffer VI into a DAQmx task code. The buffer needs to be manually overridden before the task starts so it is common to place it after the virtual channel is configured but before the task starts.