User manual
Chapter 4 NI-DAQ Double Buffering
NI-DAQ User Manual for PC Compatibles 4-12 ni.com
The HalfReady functions are as follows:
•
DAQ_DB_HalfReady
•
WFM_DB_HalfReady
•
DIG_DB_HalfReady
•
GPCTR_Read_Buffer
For analog input operations, call
DAQ_DB_HalfReady
,after
starting a double-buffered analog acquisition but prior to calling
DAQ_DB_Transfer
, to check the transfer status of the operation.
For analog output problems, call
WFM_DB_HalfReady
,after
starting a double-buffered waveform generation but prior to calling
WFM_DB_Transfer
, to check the transfer status of the operation.
For digital block input and output operations, call
DIG_DB_HalfReady
,
after starting a double-buffered digital operation but prior to calling
DIG_DB_Transfer
, to check the transfer status of the operation.
For counter operations, call
GPCTR_Read_Buffer
after calling
GPCTR_Control
with a timeOut of 0, to check the transfer status of the
operation. Counters actually transfer their data in a continuous manner,
not a double-buffered manner.
Conclusion
Double buffering is a data acquisition software technique for continuously
inputting or outputting large amounts of data with limited available system
memory. However, double buffering might not be practical for high-speed
input or output applications. The throughput of a double-buffered
operation is typically limited by the ability of the CPU to process the data
within a given period of time. Specifically, data must be processed by the
application at least as fast as the rate at which the device is writing or
reading data. For many applications, this requirement depends on the
speed and efficiency of the computer system and programming language.










