XPS Unified Programmer’s Manual
7.2.1.58 GPIOAnalogGainSet
Name
GPIOAnalogGainSet – Sets a gain for one or several analog inputs (ADC).
Input tests
- Refer to section 7.1: “Input Tests Common to all XPS Functions”.
- Checks board: (-8)
- GPIO name (ADC): (-8)
- Checks outpout value (1, 2, 4 or 8): (-17)
- Hardware compatibility or XPS initialization in progress: (-22)
Description
Sets a gain value for one or several analog inputs.
The gain value can be 1, 2, 4 or 8
If the conversion of the gain value to bits fails then (-22) error is returned.
The maximum number of INT boards, that can be plugged inside the XPS controller, is
2, increasing the number of analog inputs from 4 to 8.
Prototype
int GPIOAnalogGainSet(
int SocketID,
int NbElements,
char * GPIONameList,
int * AnalogGainValueArray
)
Input parameters
SocketID int Socket identifier gets by the
“TCP_ConnectToServer” function.
NbElements int Number of analog GPIO to read.
GPIONameList char * List of analog input names – separator is
comma.
AnalogGainValueArray int * Value of analog input gain.
Output parameters
None.
Return (In addition to the results of “Input Tests Common to all XPS
Functions”)
• 0: No error.
• -8: Wrong object type for this command.
• -17: Parameter out of range or incorrect.
• -22: Not allowed action.
105 EDH0373En1023 — 01/18