5.1
Modbus/TCP
Modbus/TCP uses Ethernet as a transmission standard. Two transmission options can be used
here:
•
Modbus/TCP slave for transmitting individual values
•
Modbus/TCP master for transmitting entire data frames
The advantage of using Modbus/TCP and the Ethernet interface is in the high speed and the
company-wide availability of the connected devices.
Modbus/TCP is a standardized process in which a Modbus telegram is packaged (tunneled)
into a TCP frame via Ethernet.
The Modbus telegram (without CRC) is transmitted with an additional 6 or 7-byte "MBAP head-
er" (Modbus application header). The seventh byte is identical to the first serial byte, but has a
different designation.
Structure of a Modbus/TCP telegram
2-byte
2-byte
transaction ID
protocol ID
Identical in
Must be 0 for
request and
Modbus
response
For comparison: the "normal" Modbus telegram
Slave
address
1 byte
This protocol can be used, e.g. by a suitable process data visualization program, to read and
write system values via a company-wide Ethernet network. All device variables from the Mod-
bus address tables can be accessed.
Chapter 7 "Modbus address tables", page 77
MBAP header
2-byte
length
Length of
request or
response in
bytes starting
with (incl.)
"unit ID"
Function code
1 byte
5 Ethernet transmission modes
1-byte
Other bytes as displayed
unit ID
Corresponds to
device address
and must be TCP
0xFF or 0 (0 =
broadcast)
Data field
CRC16
x byte(s)
2 bytes
Modbus telegram
below but without CRC
57