Gets the device's analog inputs range configuraton.
- Parameters:
-
| [in] | handle | Valid handle returned by SM_Open(). |
| [in] | ranges | Array of desired channel ranges. |
- Return values:
-
| 0 | Successful completion. |
| -1 | Invalid SeaMAX handle. |
| -2 | Invalid parameter. Parameters 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 analog input ranges and places them in the 'ranges' array parameter. For more information on the returned range values, see
A/D Channel Range values.
The 'ranges' parameter will contain one byte for each analog input, with the first byte corresponding to a desired range for analog input 1, the second byte for analog input 2, and so on.
- Warning:
- 'Ranges' should contain at least one byte for each analog input.