9
Modbus protocol (Modbus/TCP)
Protocol structure
Manual – MOVIPRO
®
with EtherNet/IP™ or Modbus/TCP Fieldbus Interface
103
9.2 Protocol structure
The Modbus protocol consists of a header and function code data.
The header is the same for all request and response telegrams as well as for error
messages (exceptions).
Depending on the "function code", a different number of data is attached to the
header.
Unit ID N DataTransaction ID Protocol ID Length (1+1+N) FC
MBAP Header Function Code Data
9007200887174411
9.2.1 Header
The following table describes the protocol bytes of the header.
Byte Designation Meaning
0
Transaction identifier
Value: Often "0" (is simply copied by the server
(slave).)
1
2
Protocol identifier Value: 0
3
4 Length field (upper byte) Value: 0
5 Length field (lower byte) Number of function code data bytes + 1 ("Device identi-
fier")
6
Device identifier (slave ad-
dress)
Slave address.
In order to access the process data of the device, it
must be set to 0 (0x00) or 255 (0xFF).
The following address assignments apply to the para-
meter channel access (Offset 200
hex
–203
hex
):
• 0 or 254 for parameters of the "PFH-..." communica-
tion and control unit
• 20 for parameters of the integrated power section
"PFA‑..."
7 Function code Requested service
8–N Data Data depending on requested service
Observe the following:
• The slave simply copies the "transaction identifier" (bytes 0 and 1). It helps the
fieldbus master to identify related actions.
• The "protocol identifier" (bytes2 and 3) must always be "0".
• The length bytes (bytes4 and 5) determine the number of the following bytes. As
the maximum telegram length is 255bytes, the "upper byte" must be "0".
• The "device identifier" (byte6) is used for distinguishing between several connec-
ted nodes (e.g. bridges or gateways). It has the function of a subaddress that is
only used for parameter access for devices from SEW‑EURODRIVE. The process
data are always mapped to the device that is addressed via the "device identifier"
"0" or "FF
hex
".
The assignment of "device identifiers" to lower-level devices or the integrated
power section is determined in the routing table of the controller configuration in
IEC Editor. The "device identifiers" are assigned according to the following table:
Device identifier Option/interface
0 or 255 MOVIPRO
®
control
16998413/EN – 12/2016