ADLINK ACL-8112 Series User Manual
Page 71
 
C Language Library
• 63
7.8
_8112_AD_Set_Channel
Description
This function is used to set the AD channel by means of writing data to 
the multiplexer scan channel register. There are 16 single -ended A/D 
channels for the ACL-8112, so the channel number must be set to 
between 0 and 15. The initial state is channel 0, which is the default 
setting for the ACL-8112. 
Syntax
int _8112_AD_Set_Channel( int ad_ch_no ) 
int _8112pg_AD_Set_Channel( int ad_ch_no ) 
Argument:
ad_ch_no:
Number of channels to perform AD 
conversions: 
for single-ended mode: 0 -15
for differential mode: 0 -7
Return Code:
ERR_NoError 
ERR_BoardNoInit 
ERR_InvalidADChannel 
Example:
#include “8112.h” 
main() 
{ 
_8112_Initial( CARD_1, A8112B_DG, 0x220 ); 
/* Assume NoError when Initialize ACL-8112 */ 
 
_8112_AD_Input_Mode( DIFFERENTIAL) ; 
/* set analog input mode as “differential” mode */ 
 
_8112_AD_Set_Channel( 3 ); 
printf( "AD channel 3 is now selected.\n" ); 
 
... 
 
/* the following A/D's operation is based on channel 
3 */ 
}