How does it work?
SCADA or a PLC connects as a client to the device's IP address and reads/writes registers; the device answers as a server. Each device has an IP address. There is no need to wait in turn as on a serial line; several devices can be queried at the same time.
The Unit ID field addresses serial devices behind a gateway. Devices with built-in Ethernet usually use 1 or 255.
Distance: the difference from Modbus RTU
With Modbus RTU, an RS-485 line is limited to about 1200 metres. With Modbus TCP, distance depends on the network, not the protocol:
- Up to 100 metres: a single Cat6 cable
- A few hundred metres: add switches
- Kilometres: fibre optic
- Between cities: VPN over 4G, MPLS or the internet
So Modbus TCP has no practical distance limit. What needs attention on long and wireless links is latency and timeout settings.