Skip to content
Unitronics UniStream 10.4 inch HMI panel

Modbus RTU vs. Modbus TCP: Differences, Wiring and Common Pitfalls

Modbus is the most widely supported industrial protocol: almost every PLC, drive, meter and HMI speaks it. Modbus RTU runs over serial lines, usually RS-485. Modbus TCP runs over Ethernet. They use the same data model and function codes, so moving between them is mostly about the physical connection and a few settings.

Comparison

Modbus RTU Modbus TCP
Physical layer RS-485 (multi-drop) or RS-232 (point-to-point) Ethernet
Addressing Slave/server ID 1–247 IP address, TCP port 502, plus a unit ID
Speed Typically 9,600–115,200 baud 10/100 Mbit Ethernet
Error checking CRC on every message Handled by TCP/IP
Masters/clients One master on the bus Multiple clients can talk to one server
Cabling Twisted pair daisy chain, up to about 1,200 m at low baud rates Standard Ethernet cable and switches, 100 m per segment

What they share: the data model

Type Traditional address Size Access
Coils 0xxxx 1 bit Read/write
Discrete inputs 1xxxx 1 bit Read only
Input registers 3xxxx 16 bits Read only
Holding registers 4xxxx 16 bits Read/write

Common function codes: 01 read coils, 02 read discrete inputs, 03 read holding registers, 04 read input registers, 05/15 write coils, 06/16 write registers.

RS-485 wiring rules for Modbus RTU

  • Daisy-chain devices one after another. Avoid star wiring and long stubs.
  • Use shielded twisted pair for the A/B (D+/D–) signals and connect the signal common.
  • Fit a 120 Ω termination resistor at each end of the bus, and only at the ends.
  • Make sure the bus has biasing (usually provided by the master or a switch on one device).
  • Every device needs a unique address, and the same baud rate, parity and stop bits.
  • Watch A/B labeling: manufacturers disagree on which is which. If nothing responds, try swapping them.

The most common pitfalls

  1. Off-by-one addresses. "40001" in a manual usually means holding register offset 0 on the wire. Some software wants 40001, some wants 0, some wants 1. If every value is shifted by one register, this is why.
  2. Byte and word order. 32-bit values (floats, long integers) use two registers, and devices disagree on their order. If a value looks wildly wrong, swap the words.
  3. Scaling. Many devices send integers scaled by 10 or 100 (e.g. 2345 = 234.5 V). Check the register map.
  4. Timeouts and polling too fast on RS-485 networks with many devices.

Which should you choose?

  • Modbus TCP for new installations with Ethernet available: easier diagnostics, faster, and many clients can share a device.
  • Modbus RTU for simple, low-cost links to drives, meters and instruments that only have RS-485, or for long cable runs.
  • Gateways convert between them, and between Modbus and other protocols. Unitronics offers gateways such as the GW-BAC1 (BACnet to Modbus) and GW-KNX1 (KNX to Modbus).

Unitronics controllers, including UniStream panels such as the USP-104-C10, support Modbus communication; check the model's specifications for ports and protocols. Comparing other industrial Ethernet protocols? See EtherNet/IP vs. PROFINET vs. EtherCAT.

Frequently asked questions

Is Modbus TCP the same as Modbus over Ethernet?
Yes, in common use.

Can Modbus RTU and Modbus TCP devices talk directly?
Not without a gateway, because the physical layers differ.

Need hardware?

Browse Unitronics PLCs and gateways, call 1-800-724-4209, or request a quote.

Previous article EtherNet/IP vs. PROFINET vs. EtherCAT vs. Modbus TCP: Industrial Ethernet Compared
Next article Safe Torque Off (STO) Explained: What It Does and How It's Wired