Function 23 (17Hex): "Read/Write Multiple Registers; Exception Codes - Pepperl+Fuchs VBG-ENXK20-DMD-EV Manual

As-i 3.0 ethernet/ip+ modbus tcp gateway
Hide thumbs Also See for VBG-ENXK20-DMD-EV:
Table of Contents

Advertisement

AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Operation via Ethernet IP (Modbus/TCP)
12.2.3

Function 23 (17hex): "Read/Write multiple registers"

This function allows to read the value of read/write-registers and the setting of
several read/write-registers:
request:
17
response:
D1 ... Dn: register value
Example:
Read 2 registers at reference 0 and write 1 register at reference 3 of value 4660
returning values 4 and 4951.
.
request:
request:
response:
response:
12.2.4

Exception codes

There is a defined set of exception codes to be returned by slaves in the event of
problems. Note that masters may send out commands "speculatively", and use
the success or exception codes received to determine which MODBUS com-
mands the device is willing to respond to and to determine the size of the various
data regions available on the slave.
All exceptions are signaled by adding 128 to the function code of the request, and
following this byte by a single reason byte for example as follows:
For instance:
RR
RR
NR
high
low
high
NW
NW
B
high
low
17
B
D1
D1
high
low
RR: reference number for read (2 byte hex-value of register)
NR: word count for read (1 - 125) (2 byte)
RW: reference number for write (2 byte hex-value of register)
NW: word count for write (1 - 100) (2 Byte)
B: byte count (B = 2 x word count for write / 1 byte)
(redundant information to Word count but necessary)
17 RR
RR
NR
high
low
high
17 00
00
00
17
B
D1
D1
high
low
17
04
00
04
NR
RW
RW
low
high
low
D1
D1
...
high
low
...
Dn
Dn
high
low
NR
RW
RW
NW
low
high
low
high
02
00
03
00
D2
D2
high
low
49
51
Dn
low
NW
B
D1
D1
low
high
low
01
02
46
60
81

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vbg-enxk20-dmdVbg-enxk20-d

Table of Contents