ADLINK ACL-8112 Series User Manual
Page 76

68
• C Language Library
Syntax
int _8112_AD_Set_Range( int ad_range )
int _8112pg_AD_Set_Gain( int ad_range )
Argument:
int ad_range: the programmable range of A/D
conversion, pleas refer to above tables for the
possible values .
Return Code:
ERR_NoError
ERR_BoardNoInit
ERR_AD_InvalidRange
Example:
#include “8112.h”
main()
{
_8112_Initial( CARD_1, A8112B_HG, 0x220 );
/* Assume NoError when Initialize ACL-8112 */
_8112_AD_Input_Mode( DIFFERENTIAL) ;
/* set analog input mode as “differential” mode */
_8112_AD_Set_Range( AD_B_5_V );
printf( "The A/D analog input range is +/- 5V \n" );
for( j = 0; j < 7; j++)
{
_8112_AD_Set_Channel( j );
printf( "AD channel j is now selected.\n" );
/* all analog input operations are based on
analog differential mode,
input range is from -5V to +5V */
}
...
}