Back to Sealevel      

int SM_GetADDAConfig ( SM_HANDLE  handle,
unsigned char *  deviceConfig,
unsigned char *  channelsConfig 
)

Retrieves the A/D configuration for a Sealevel I/O module.

Deprecated:
Version 3.0.4 - Version 5.0
Parameters:
[in] handle Valid handle returned by SM_Open().
[out] deviceConfig Configuration of the module.
[out] channelsConfig A/D channels' voltage ranges.
Return values:
0 Success.
-1 Invalid SeaMAX handle.
-2 Connection is not established. Check the provided Connection object state.
-3 Read error waiting for response. Unkown Modbus exception.
-4 Illegal Modbus Function (Modbus Exception 0x01).
-5 Illegal Data Address (Modbus Exception 0x02).
-6 Illegal Data Value (Modbus Exception 0x03).
-7 Modbus CRC was invalid. Possible communications problem.
Note:
This function has been replaced by SM_GetAnalogInputConfig() and SM_GetAnalogInputRanges(). See the updated function for parameter and return values.
Retrieves the module's offset reference, A/D mode, and channel ranges. The deviceConfig parameter will contain two bytes: deviceConfig[0] containing the analog reference point (should be zero for most applications), and deviceConfig[1] containing the A/D channel mode. The channelsConfig parameter will contain one byte for every analog input, indicating that input's channel range (e.g. channelsConfig[4] indicates analog input 5's channel range).

inline_dotgraph_23.dot

For more information on the appropriate bit values, see A/D Voltage Reference values, A/D Channel Modes, and A/D Channel Range values.

Warning:
The parameter deviceConfig should have at least 2 bytes, and channelsConfig should have at least 16 bytes, allocated before calling SM_GetADDAConfig().

 
 
Generated on 15 Dec 2008.