Modbus RTU
Modbus RTU serial or RTU-over-TCP.
| Property | Value |
|---|---|
| Console protocol id | modbus-rtu |
| Site Runtime plugin | modbus-rtu |
| Transport | Serial (RS-232/RS-485), some families also over TCP |
| Read | yes |
| Write | yes — through approved writes |
| Subscribe | — |
| Default group interval | 1000 ms |
| Maturity | Production: complete driver (connection handling, address forms, batching, read and write) |
Create the device
- Open Connectivity → Devices and click Add device.
- Pick Modbus RTU in the protocol list and make sure the Site Runtime host has the serial port.
- Choose the Site Runtime that can reach the device, fill the connection parameters below and click Create & connect.
- Add a group (poll interval) and tags with the address formats below. See Devices and Groups and tags for the full walk-through.
Connection parameters
Every field the Console shows for this protocol. Required fields must be set before the device can be saved.
| Parameter | Type | Default | Range / options | Required | Description |
|---|---|---|---|---|---|
Physical Linklink | map | Serial | Serial, Ethernet | yes | Serial or Ethernet |
Connection Timeout (ms)timeout | int | 3000 | 1000 – 30000 | yes | |
Device Degradationdevice_degrade | map | False | False, True | yes | Enable or disable device degradation mechanism |
Failure Threshold for Degradationdegrade_cycle | int | 2 | 1 – 65535 | yes | The number of consecutive failure cycles required to trigger device degradation Shown when Device Degradation = True. |
Recovery Time After Degradationdegrade_time | int | 600 | 1 – 65535 | yes | The time in seconds after which the device recovers from degradation Shown when Device Degradation = True. |
Maximum Retry Timesmax_retries | int | 0 | 0 – 5 | yes | The maximum number of retries after a failed attempt to send a read command |
Retry Interval (ms)retry_interval | int | 0 | 0 – 10000 | yes | |
Enable 0x16enable16 | bool | true | — | no | Enable function 0x16 |
Endianess of 4-Byte Dataendianess | map | ABCD | ABCD, BADC, DCBA, CDAB | yes | Tag byte order, ABCD corresponds to 1234 |
Endianess of 8-Byte Dataendianess_64 | map | 12 34 56 78 | 12 34 56 78, 21 43 65 87, 87 65 43 21, 78 56 34 12 | yes | Tag byte order, applicable to int64, uint64 and double types |
Start Addressaddress_base | map | PLC Addresses (Base 1) | Protocol Addresses (Base 0), PLC Addresses (Base 1) | yes | Address starts from 1 or 0 |
Send Interval (ms)interval | int | 20 | 0 – 3000 | yes | |
Serial Devicedevice | string | — | max 30 chars | yes | Shown when Physical Link = Serial. |
Stop Bitsstop | map | 1 | 1, 2 | yes | Shown when Physical Link = Serial. |
Parityparity | map | none | none, odd, even, mark, space | yes | Shown when Physical Link = Serial. |
Baud Ratebaud | map | 9600 | 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200 | yes | Shown when Physical Link = Serial. |
Data Bitsdata | map | 8 | 5, 6, 7, 8 | yes | Shown when Physical Link = Serial. |
IP Addresshost | string | — | — | yes | Local IP in server mode, remote device IP in client mode Shown when Physical Link = Ethernet. |
Portport | int | 502 | 1 – 65535 | yes | Local port in server mode, remote device port in client mode Shown when Physical Link = Ethernet. |
Connection Modeconnection_mode | map | Client | Client, Server | yes | MakeIntelligent as the client, or as the server Shown when Physical Link = Ethernet. |
Tag addresses and data types
Supported data types: INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT, DOUBLE, BIT, BOOL, STRING, BYTES. The Console validates each tag address against the pattern for its data type before it is saved:
| Data types | Address pattern (regular expression) |
|---|---|
INT16 UINT16 | ^[0-9]+![3-4][0-9]+(#B|#L|)$ |
INT32 UINT32 FLOAT | ^[0-9]+![3-4][0-9]+(#BB|#BL|#LL|#LB|)$ |
INT64 UINT64 DOUBLE | ^[0-9]+![3-4][0-9]+(#B|#L|#BB|#BL|#LL|#LB|)$ |
BIT BOOL | ^[0-9]+!([0-1][0-9]+|[3-4][0-9]+\.([0-9]|[0-1][0-5]))$ |
STRING | ^[0-9]+![3-4][0-9]+\.[0-9]+(H|L|)$ |
BYTES | ^[0-9]+![3-4][0-9]+\.[0-9]+$ |
Addressing and notes
Address syntax and examples
Modbus RTU uses the same addresses as Modbus TCP:
unit!reference holding / input register, coil, discrete input
unit!reference.bit one bit of a register (0 to 15)
unit is the slave address on the bus (1 to 247 on a real bus). On a serial line several units share one device connection, so each tag carries its own unit id.
| Address | Type | Meaning |
|---|---|---|
1!40001 | UINT16 | Slave 1, holding register 40001 |
2!40001 | UINT16 | Slave 2, holding register 40001 on the same line |
1!40004 | FLOAT | Registers 40004 and 40005 |
3!30001 | INT16 | Slave 3, input register 30001 |
1!00001 | BOOL | Coil 1 |
1!10001 | BOOL | Discrete input 1 |
1!40001.7 | BIT | Bit 7 of holding register 40001 |
Register numbering depends on the Start Address setting (default PLC Addresses (Base 1), so 40001 is the first holding register).
Endianness
Same as Modbus TCP. Set Endianess of 4-Byte Data (ABCD, BADC, DCBA, CDAB, default ABCD) and Endianess of 8-Byte Data on the device. For a single 64-bit tag use the suffixes #BB, #LB, #LL or #BL. Suffixes on 16-bit tags do not change the value.
Typical settings
The field Physical Link chooses the transport:
| Physical Link | Fields | Notes |
|---|---|---|
| Serial | Serial Device (for example /dev/ttyUSB0 on Linux), Baud Rate (default 9600), Data Bits (8), Stop Bits (1), Parity (none) | RS-485 or RS-232 port of the Site Runtime host. |
| Ethernet | IP Address, Port (502), Connection Mode | Modbus RTU framing over TCP, for serial gateways in transparent mode. |
Other fields: Connection Timeout (ms) 3000 (1000 to 30000), Send Interval (ms) 20, Maximum Retry Times 0, Retry Interval (ms) 0, Device Degradation off.
A serial line carries one request at a time. Calculate: at 9600 baud 8N1 one register read of 10 registers takes about 40 ms. Size the group interval for the sum over all units.
On Windows the connection test cannot open serial ports yet.
Common errors
| Symptom | Cause | Fix |
|---|---|---|
All tags bad on a serial link | Wrong port, baud rate or parity. | Match the settings of the device exactly. |
| Works for one unit, not for another | Wrong slave address, or two devices with the same address. | Check the address plate or the device menu. |
| Frequent timeouts | Line too slow for the group, no termination, noise. | Raise the group interval and the timeout. Check A/B wiring and termination resistors. |
| "Not installed here" in the picker | Lite build without the serial plugin. | Use the Enterprise stack or Modbus TCP with a gateway. |
| Float values are nonsense | Register order. | Change Endianess of 4-Byte Data. |
| Serial device not found | The user of the service cannot open the port. | Give the service user access to the port (on Linux the dialout group). |