43
5 Modbus and other protocols over Ethernet
5.2 Networking with Modbus/TCP
The image below provides an overview of the networking options when using the Modbus/TCP
protocol:
Each Modbus/TCP node is accessible via a unique IP address. The "Unit ID" also contained in
the protocol (= device address) must be 0xFF for the node directly attached to the network.
However, a node can present itself virtually as several subordinate devices, including a Modbus
gateway (on right of image) for all modules behind it. These can then be accessed using Unit
ID 1to254.
5.3 Modbus master with Modbus/TCP
Up to 4 connections are possible to different Modbus/TCP devices which allow the exchange
of a maximum of 8 reading and 8 writing frames. A frame can be used to transmit up to 254
bytes. It operates just like the Modbus master function via the serial interface.
Chapter 4.2 "Modbus master operation", page 38
Frames can be exchanged with 4 devices (1 to 4) on the other end using 4 sockets. The Mod-
bus device address that can be edited inside each frame mask and that is also transmitted in
the Modbus/TCP protocol can be used to address Modbus gateways and modules behind oth-
er base units. The latter then forward the frame to the Modbus node behind them.