User manual

Chapter 3 Software Overview
© National Instruments Corporation 3-65 NI-DAQ User Manual for PC Compatibles
The first step is to call
DIG_Prt_Config
, with which you configure
the individual digital ports for input or output and enable handshaking.
If handshaking is disabled, do not check the port status (step 2 of
Figure 3-21). If handshaking is enabled, call
DIG_PRT_Status
to
determine if an output port is ready to output a new data point, or if an input
port has latched new data.
The third step is to input or output the data point. Call
DIG_In_Prt
to read
data from an input port. Call
DIG_Out_Prt
to write data to an output port.
The final step is to loop back if more data is to be input or output. These
four steps form the basis of a simple digital port I/O application.
Digital Line I/O Applications
Digital line I/O applications are similar to digital port I/O applications,
except that digital line I/O applications input or output data on a bit-by-bit
basis rather than by port. The digital line I/O can only transfer data in
no-handshaking mode.