6 Ethernet protocols
42
6.3 Modbus TCP
In this case, the paperless recorder is configured as a slave and handles
incoming requests as a server via port 502. The port can also be changed, see
Chapter 3.5 Configuration of the Ethernet interface, Page 13.
Modbus TCP is a standardized process, in which a Modbus telegram is
packed into a TCP frame (tunnelled) and transmitted via Ethernet.
The Modbus telegram (without CRC) is transmitted with an additional "MBAP
header" of 6 or 7 byte. The seventh byte is identical to the first serial byte, but
has a different designation.
Structure of a
Modbus TCP
telegram
For comparison:
the "normal" Modbus telegram, see Chapter 4.4 Structure of
a Modbus telegram, Page 17:
This protocol can be used, e.g. by a suitable process data visualization
program to read and write values of the paperless recorder via a company-
wide Ethernet network. All device variables from the Modbus address tables
(see Chapter 7 Address tables, Page 47) can be accessed.
MBAP header Modbus
telegram
2 byte
Trans-
action ID
2 byte
Protocol ID
2 byte
Length
1 byte
Unit ID
Further bytes
as specified below,
however, without CRC
Identical in
request and
response
Must be 0
for Modbus
Length of
question
and
response in
byte
from (incl.)
"Unit ID"
Corresponds to
the controller
address. For
TCP must be
0xFF or 0
(0=broadcast)
Slave
address
1 byte
Function
code
1 byte
Data field
x byte
CRC16
2 byte
Only one Modbus master (client) can access a paperless recorder via
Modbus TCP at a time.
A connection opened by a client is cancelled by the paperless
recorder after 30 seconds of inactivity.
If a Modbus TCP port is closed (by the paperless recorder or the other
end), it can be reopened after 10 seconds.