ADLINK PCM-9112+ User Manual
Page 59

C/C++ Library
• 51
5.9 _9112_AD_Set_Range
@ Description
This function is used to set the A/D analog input range by means of
writing data to the A/D range control register. There are two factors that
will change the analog input range - Gain and Input type.
The Gain can be from 0.5, 1, 2, 4, and 8 .The input type can be either
Bipolar or Unipolar.
The initial gain value is '1‘ and input type is bipolar, which are pre-set by
the PCI-9112 hardware. The relationship between analog input voltage
range, gain and input mode are listed in the table below:
** this table is suitable for PCI-9112 card.
AD_INPUT
GAIN
Input type
(Bipolar or Unipolar)
Input Range
AD_B_5_V 1
Bipolar
±5V
AD_B_2_5_V 2
Bipolar
±2.5V
AD_B_1_25_V 4
Bipolar
±1.25V
AD_B_0_625_V
8 Bipolar
±0.625V
AD_U_10_V
1
Unipolar
0V ~ 10V
AD_U_5_V
2
Unipolar
0V ~ 5V
AD_U_2_5_V
4
Unipolar
0V ~ 2.5V
AD_U_1_25_V
8
Unipolar
0V ~ 1.25V
AD_B_10_V 0.5
Bipolar
±10V
@ Syntax
Visual C++ (Windows-95)
int W_9112_ AD_Set_Range (int card_number, int ad_range)
Visual Basic (Windows-95)
W_9112_AD_Set_Channel (ByVal card_number As Long, ByVal
ad_range As Long) As Long
C/C++ ( DOS)
int _9112_AD_Set_Range (int card_number, int ad_range )
@ Argument
card_number:
the card number of PCI-9112
ad_range: the programmable range of A/D conversion,
please refer the the above table for the possible
range values.
@ Return Code
ERR_NoError
ERR_BoardNoInit
ERR_AD_InvalidRange