User manual
Chapter 4 NI-DAQ Double Buffering
© National Instruments Corporation 4-3 NI-DAQ User Manual for PC Compatibles
Figure 4-1 illustrates a series of sequential data transfers.
Figure 4-1. Double-Buffered Input with Sequential Data Transfers
The double-buffered input operation begins when the DAQ device starts
writing data into the first half of the circular buffer (Figure 4-1a). After the
device begins writing to the second half of the circular buffer, NI-DAQ can
copy the data from the first half into the transfer buffer (Figure 4-1b). You
can then store the data in the transfer block to disk or process it according
to your application needs. After the input device has filled the second half
of the circular buffer, the device returns to the first half of the buffer and
overwrites the old data. NI-DAQ can now copy the second half of the
circular buffer to the transfer buffer (Figure 4-1c). The data in the transfer
buffer is again available for use by your application. The process can
be repeated endlessly to produce a continuous stream of data to your
application. Notice that Figure 4-1d is equivalent to the step in Figure 4-1b
and is the start of a two-step cycle.
Incoming
Device Data
Circular Buffer
Transfer Buffer
Empty Buffer
Untransferred Data Transferred Data
a. b.
c. d.










