Chapter 2 Function Reference — DIG_DB_HalfReady
NI-DAQ FRM for PC Compatibles 2-160
©
National Instruments Corporation
DIG_DB_HalfReady
Format
status = DIG_DB_HalfReady (deviceNumber, group, halfReady)
Purpose
Checks whether the next half buffer of data is available during a double-buffered digital block
operation. You can use
DIG_DB_HalfReady to avoid the waiting period that can occur
because
DIG_DB_Transfer waits until NI-DAQ can transfer the data before returning.
Parameters
Input
Output
Parameter Discussion
group is the group to be configured.
Range: 1 or 2.
halfReady indicates whether the next half buffer of data is available. When halfReady equals
one, you can use
DIG_DB_Transfer to read or write the data immediately. When halfReady
equals zero, the data is not yet available.
Note
C Programmers—halfReady is a pass-by-reference parameter.
Using This Function
Double-buffered digital block functions cyclically input or output digital data to or from a
buffer. The buffer is divided into two equal halves so that NI-DAQ can save or write data
from one half while block operations use the other half. For input, this mechanism makes it
necessary to alternately save both halves of the buffer so that NI-DAQ does not overwrite
data in the buffer before saving the data. For output, the mechanism makes it necessary to
alternately write to both halves of the buffer so that NI-DAQ does not output old data. Use
DIG_DB_Transfer to save or write the data NI-DAQ is inputting or outputting the data. This
Name Type Description
deviceNumber i16 assigned by configuration utility
group i16 group
Name Type Description
halfReady i16 whether the next half of data is available