4 dio functions – ADLINK cPCI-9116 User Manual
Page 66
 
56
• C++ Library
6.4 DIO
functions
6.4.1 _9116_DI
@ Description
This function is used to read data from the digital input port. There are 8 
digital input channels on the cPCI_9116. All 8 channels can be 
accessed using this function. 
@ Syntax
C/C++ (DOS)
int _9116_DI (I16 card_number, unsigned int far *data )
@ Argument
card_number:
the card number of the cPCI-9116 to be initialized, 
totally 4 cards can be initialized, valid card 
numbers are CARD_1, CARD_2, CARD_3, 
CARD_4 
data:
8-bit data read from the digital input port.
@ Return Code
ERR_NoError,ERR_BoardNoInit
6.4.2 _9116_DO
@ Description
This function is used to write data to the digital output port. There are 8 
output channels on the cPCI-9116. 
@ Syntax
C/C++ (DOS)
int _9116_DO (I16 card_number , unsigned int data)
@ Argument
card_number:
the card number of the cPCI-9116 to be initialized, 
totally 4 cards can be initialized, valid card 
numbers are CARD_1, CARD_2, CARD_3, 
CARD_4 
data:
data written to the output port.
@ Return Code
ERR_NoError 
ERR_BoardNoInit