Easy Modbus · plain-English Modbus reference

Modbus TCP, Modbus RTU or RS-485 — which do I have?

Short answer

Look at the socket. An Ethernet socket — the square one a network cable clips into — usually means Modbus TCP. Two or three screw terminals labelled A, B and sometimes GND or SHLD mean Modbus RTU over RS-485. If the equipment has screw terminals but you are reaching it over the network, there is a gateway in between, and that gateway either translates properly (Modbus TCP) or just pipes bytes through (Modbus RTU over TCP). Telling those last two apart matters, because choosing the wrong one produces total silence, which looks exactly like equipment that is switched off.

The three you will meet

Modbus TCPModbus RTURTU over TCP
PhysicalEthernetRS-485 twisted pairEthernet to a gateway, RS-485 beyond it
How you address itIP address and port 502COM port, baud rate, unit IDGateway IP and port, plus unit ID
Devices per connectionNormally oneUp to 32 on a chain, by unit IDMany, by unit ID
SpeedFastSlow: 9600 or 19200 baud is typicalAs slow as the serial side
Error checkingTCP handles itA CRC on every messageA CRC on every message

How to tell by looking

Telling a translating gateway from a transparent one

A gateway labelled “Modbus TCP to Modbus RTU” usually translates: you speak Modbus TCP to it and it speaks RTU to the equipment. A box labelled “serial device server”, “serial to Ethernet” or “TCP transparent mode” usually does not: it forwards the bytes you send, so you have to send RTU-framed bytes yourself.

The practical answer is to try Modbus TCP, and if there is no reply at all, try Modbus RTU over TCP before concluding anything is broken. It costs one button press and resolves this more often than any other single check.

Easy Modbus has a Test connection action that tries both framings and tells you which one answered, then offers to switch the device over. This one problem is the reason that feature exists.

Things that only matter on the serial side

If the equipment is RS-485, several settings have to match on every device on the chain, and they are not discoverable:

Serial Modbus is also much slower than it looks. At 9600 baud one request and reply takes tens of milliseconds, so reading forty values one at a time can take several seconds. Asking for a block of registers in one request rather than one at a time makes a large difference, and is worth doing.