I-8026W API User Manual, v1.0.1, June 2015
Copyright © 2015 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
3-29
3.14.
i8026W_ReadAIGainOffset
This function is used to read the reference gain and offset values for each Analog Input channel and
each input type.
Prototype
short i8026W_ReadAIGainOffset
(
int slot, int ch, int gain, unsigned short* refGain, short * refOffset
);
Parameters
slot: specifies the slot number (1 ~ 8)
ch: specifies the Analog Input channel number (0 ~ 5)
gain: specifies the input type (0 ~ 4), where:
0: +/-10 V, 1: +/-5 V, 2: +/-2.5 V, 3: +/-1.25 V, 4: +/-20 mA
*refGain: [Output] the reference gain value for the Analog Input type
*refOffset: [Output] the reference offset value for the Analog Input type
Return Values
0 = No Error
For other return values, see the Error Codes in Appendix A.
Example
[C]
unsigned short gVal=0;
short oVal=0;
int slot=2;
Open_Slot(slot);
i8026W_ ReadAIGainOffset (slot,gain,&gVal, &oVal);
printf("\nThe Gain = %04X , Offset = %04X ",gVal, oVal);