Back to Sealevel      

int SM_GetAnalogInputConfig ( SM_HANDLE  handle,
unsigned char *  reference,
unsigned char *  mode 
)

Gets the device's analog configuraton.

Parameters:
[in] handle Valid handle returned by SM_Open().
[in] reference Analog to digital reference point.
[in] mode Device input mode.
Return values:
0 Successful completion.
-1 Invalid SeaMAX handle.
-2 Invalid reference or mode parameter. May not be null.
-3 Connection is not established. Check the provided Connection object state.
-4 Modbus: Read error waiting for response. Unkown Modbus exception.
-5 Modbus: Illegal Modbus Function (Modbus Exception 0x01).
-6 Modbus: Illegal Data Address (Modbus Exception 0x02).
-7 Modbus: Illegal Data Value (Modbus Exception 0x03).
-8 Modbus: CRC was invalid. Possible communications problem.
Gets the I/O device's offset reference and A/D channel mode. The reference parameter represents which source each analog input is compared against. The mode paramter is the overall configuration of the channels and whether they are singled ended or paired.

For more information on the returned parameter values, see A/D Voltage Reference values and A/D Channel Modes.

 
 
Generated on 18 Sep 2007.