int __stdcall SM_SetADDAConfig ( SM_HANDLE  handle,
unsigned char *  deviceConfig,
unsigned char *  channelsConfig 
)

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

Deprecated:
Version 3.0.4
Parameters
[in]handleValid handle returned by SM_Open().
[in]deviceConfigDesired configuration of the module.
[in]channelsConfigChannels' voltage ranges.
Return values
0Successful completion.
-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.
-8Invalid device configuration.
Note
This function has been replaced by SM_SetAnalogInputConfig() and SM_SetAnalogInputRanges(). See the updated function for parameter and return values.

Sets the module's offset reference, A/D mode, and channel ranges. The deviceConfig parameter should contain two bytes: deviceConfig[0] should contain the A/D reference (zero for most applications), and deviceConfig[1] should contain the A/D mode. ChannelsConfig should contain one byte for each analog input, with each byte corresponding to that inputs channel range (e.g. channelsConfig[3] would contain the intended channel range for analog input 4).

dot_inline_dotgraph_23.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.

Referenced by CSeaMaxW32::Ioctl().

 
 
Generated on Mon Nov 26 2018.