Modbus RTU
The Modbus RTU protocol in InDataX enables communication with industrial devices via serial interfaces such as RS-485 or RS-232. This protocol is the standard for integrating instrumentation, frequency inverters, and "legacy" devices over fieldbus.
Connection Parameters
To configure a Modbus RTU channel, define the following serial parameters:
- Name: Unique identifier for the protocol.
- USB Port (Connection Order): InDataX uses the physical connection order of USB-to-Serial adapters (0, 1, 2...) to ensure the system always assigns the same channel to the same hardware, regardless of the port name assigned by the operating system (COM).
- Baud Rate: Transmission speed (e.g.,
9600,19200,115200). - Parity: Selection between
None,Even, orOdd. - Data Bits: Usually
8. - Stop Bits: Usually
1or2. - Modbus Slave ID: The device's address on the bus (Station ID).
Variable Configuration
Variable management is identical to Modbus TCP, based on register mapping:
- Name: Variable identifier.
- Type: Data format (Real, Integer, Boolean, Long, etc.).
- Record Value: Enables logging in the historical database.
- Modbus Address: Numerical address of the register.
- Length: Number of registers (16 bits each) the variable occupies.
- Register Type:
- Coil: Output bits (read/write).
- Discrete Input: Read-only input bits (e.g., status of a digital sensor).
- Holding Register: 16-bit registers (read/write).
- Input Register: 16-bit registers (read-only).
- Signed: Defines whether the value includes a negative sign.
Configuration Example
| Variable | Type | Address | Length | Register Type | Application |
|---|---|---|---|---|---|
frequency_hz | Real | 4001 | 2 | Holding Register | Reading frequency from an inverter. |
start_stop | Boolean | 1 | 1 | Coil | Remote motor control. |
current_a | Integer | 500 | 1 | Input Register | Line current measurement. |
door_sensor | Boolean | 20 | 1 | Discrete Input | Status of a limit switch. |
Bus Termination
In RS-485 networks, remember to install termination resistors (usually 120Ω) at the ends of the bus to prevent signal reflections and communication errors, especially for long cable runs or high speeds.