Sets the A/D configuration for a Sealevel I/O module.
- Deprecated:
- Version 3.0.4
- Parameters
-
[in] | handle | Valid handle returned by SM_Open(). |
[in] | deviceConfig | Desired configuration of the module. |
[in] | channelsConfig | Channels' voltage ranges. |
- Return values
-
0 | Successful completion. |
-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. |
-8 | Invalid 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).
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().