User manual
Chapter 3 Software Overview
© National Instruments Corporation 3-31 NI-DAQ User Manual for PC Compatibles
However, if the information provided by
DAQ_Check
is not sufficient,
DAQ_Monitor
or the double-buffered functions might be a better choice.
With
DAQ_Monitor
, not only can you monitor the data acquisition
process, but you can also retrieve a portion of the acquired data. With the
double-buffered functions, you can retrieve half of the data buffer at a time.
Double-buffered functions are very useful when your application has a
real-time strip chart displaying the incoming data.
Building Block 4: Cleaning up
The purpose of this building block is to stop the data acquisition and
free any system resources (such as DMA channels) used for the data
acquisition.
DAQ_Clear
is the only function needed for this building block
and is automatically called by the check functions described in the previous
building block when the data acquisition is complete. Therefore, you can
eliminate this last building block if your application continuously calls the
previously described check functions until the data acquisition is complete.
Note DAQ_Clear
does not alter the device configurations made by building block 1.
Double-Buffered Data Acquisition
The double-buffered (
DAQ_DB
) data acquisition functions return data from
an ongoing data acquisition without interrupting the acquisition. These
functions use a double, or circular, buffering scheme that permits half
buffers of data to be retrieved and processed as the data becomes available.
By using a circular buffer, you can collect an unlimited amount of data
without needing an unlimited amount of memory. Double-buffered data
acquisition is useful for applications such as streaming data to disk and
real-time data display.
Initiating double-buffered data acquisition requires some simple changes
to the first and third basic building blocks, Configuration and Checking,
respectively.
In building block 1, turn on double-buffered mode data acquisition through
the
DAQ_DB_Config
call. After the double-buffered mode is enabled, all
subsequent data acquisitions are in double-buffered mode.
In building block 3, different checking functions are needed. Figure 3-10
shows a simple way to monitor the data acquisition in progress and to
retrieve data when they are available.
For further details on double-buffered data acquisition, consult Chapter 4,
NI-DAQ Double Buffering.










