Retrieves a Sealevel I/O module's programmable IO direction.
- Parameters
-
[in] | handle | Valid handle returned by SM_Open(). |
[out] | config | Contains the direction (input or output) of the programmable IO. |
- 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. Unknown 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. |
-10 | SeaDAC Lite: Invalid model number. |
-11 | SeaDAC Lite: Unknown connection type. |
-12 | SeaDAC Lite: Error communicating with device. |
The SeaI/O 462 & 463 modules offer 96-bits of programmable IO in 12 banks, each of which may be configured as a bank of 8 inputs or 8 outputs.
The format of the config parameter should be one byte for every 8 bits of programmable I/O, each byte representing banks 1 - 12. A non-zero byte indicates that the corresponding bank of PIO should be a bank of 8 inputs, zero indicating 8 outputs. For example, a non-zero value in config[3] would indicate that bank 4 should be a bank of inputs.
- Warning
- The parameter, config, must have at least one byte of space allocated for every 8 bits of I/O before calling this function.
Referenced by CSeaMaxW32::Ioctl(), and CSeaMaxW32::Read().