int __stdcall 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
Parameters
[in]handleValid handle returned by SM_Open().
[out]deviceConfigConfiguration of the module.
[out]channelsConfigA/D channels' voltage ranges.
Return values
0Success.
-1Invalid SeaMAX handle.
-2Connection is not established. Check the provided Connection object state.
-3Read error waiting for response. Unkown Modbus exception.
-4Illegal Modbus Function (Modbus Exception 0x01).
-5Illegal Data Address (Modbus Exception 0x02).
-6Illegal Data Value (Modbus Exception 0x03).
-7Modbus 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).

dot_inline_dotgraph_24.png

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().

Referenced by CSeaMaxW32::Ioctl().

 
 
Generated on Mon Nov 26 2018.