I8026W_Readaigainoffset - ICP DAS USA I-8026W Manual

Multifunction i/o module
Table of Contents

Advertisement

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);
I-8026W API User Manual, v1.0.1, June 2015
Copyright © 2015 ICP DAS Co., Ltd. All Rights Reserved.
E-mail: service@icpdas.com
3-29

Advertisement

Table of Contents
loading

Table of Contents