![SEW-Eurodrive DHR41B Manual Download Page 71](http://html.mh-extra.com/html/sew-eurodrive/dhr41b/dhr41b_manual_1250086071.webp)
Manual – MOVI-PLC® advanced DHR41B for EtherNet/IP, Modbus/TCP and PROFINET IO
71
8
Protocol structure
The Modbus Protocol (Modbus/TCP)
8.2.4
Service FC23 Read/write multiple registers
With the service
FC23 Read/write multiple registers
, you can simultaneously write and
read a variable number of registers. The write access is carried out first. Preferably, this
service is used for the process data (see following picture).
Example
Request:
Response:
Exception:
64071AXX
MBAP Header
Function Code-Data (FC23)
Bytes
(N)
(1...N)
FC
(0x17)
T- ID (0x00)
Prot-ID (0x00)
UI-D
Length
(1+10+N)
Read Address
Write Address
Write Data
ReadWord
Count
Write Word
Count
Byte
Designation
Meaning/permitted values
0 - 6
MBAP header
See chapter 'Header'.
7
Function code
Requested service: 23 (Read/Write Multiple Registers)
8
Read reference number
(high)
Offset
9
Read reference number
(low)
Offset
10
Read word count (high)
Number of words (register) always 0
11
Read word count (low)
Number of words (register)
12
Write reference number
(high)
Offset
13
Write reference number (low) Offset
14
Write word count (high)
Number of words (register) always 0
15
Write word count (low)
Number of words (register)
16
Write byte count
2* Word count
17 ...
Write register values
2 - ... Data bytes depending on the length
Byte
Designation
Meaning/permitted values
0 - 6
MBAP header
See chapter 'Header'.
7
Function code
Service: 23 (Read/Write Multiple Registers)
8
Byte count
Number of following bytes
9
Data
2 - ... Data bytes depending on the length
Byte
Designation
Meaning/permitted values
0 - 6
MBAP header
See chapter 'Header'.
7
Function code
97
hex
8
Exception code
Fault code
0
0
I
Summary of Contents for DHR41B
Page 2: ...SEW EURODRIVE Driving the world ...
Page 129: ...SEW EURODRIVE Driving the world ...