User manual
Chapter 4 NI-DAQ Double Buffering
NI-DAQ User Manual for PC Compatibles 4-10 ni.com
Double Buffer Configuration Functions
The Double Buffer Configuration functions enable and disable double
buffering for input and output operations, and you can select
double-buffering options if any are available.
The configuration functions are as follows:
•
DAQ_DB_Config
•
WFM_DB_Config
•
DIG_DB_Config
•
GPCTR_Change_Parameter
For analog input operations, call
DAQ_DB_Config
prior to calling
DAQ_Start
,ora
SCAN_Start
to enable or disable double buffering.
For waveform operations, call
WFM_DB_Config
prior to calling
WFM_Load
to enable or disable double buffering.
For digital block input and output operations, call
DIG_DB_Config
prior
to calling
DIG_Block_In
,or
DIG_Block_Out
to enable or disable double
buffering.
For counter operations, before calling
GPCTR_Control to
start your
counter, call
GPCTR_Change_Parameter
to enable or disable continuous
buffering (with
ND_Double)
. Counters transfer their data continuously,
not in half buffers.
Double Buffer Transfer Functions
After a double-buffered operation begins, the Double Buffer Transfer
functions transfer data to or from a circular buffer. The direction of the
transfer depends on the direction of the double-buffered operations. Along
with copying data, the Double Buffer Transfer functions also check for
possible errors during the transfer.
For input operations,
DB_Transfer
copies data from alternating halves
of the circular input buffer to the transfer buffer. For output operations,
DB_Transfer
copies data from the buffer passed to the function to
alternating halves of the circular output buffer. The function might
return an overwrite before a copy warning or an overwrite error
(overWriteError) if a problem occurs during the transfer.
Note
Waveform transfer functions do not detect overwrite before copy or overwrite errors.










