![Pepperl+Fuchs VBG-ENXK20-D Скачать руководство пользователя страница 81](http://html1.mh-extra.com/html/pepperl-fuchs/vbg-enxk20-d/vbg-enxk20-d_manual_1527748081.webp)
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Operation via Ethernet IP (Modbus/TCP)
26
.9.20
1
3
81
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:
Example:
Read
2 registers at reference 0 and write 1 register at reference 3 of value 4660
returning values 4 and 4951.
.
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:
request:
17
RR
high
RR
low
NR
high
NR
low
RW
high
RW
low
NW
high
NW
low
B
D1
high
D1
low
…
Dn
low
response:
17
B
D1
high
D1
low
…
Dn
high
Dn
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)
D1 ... Dn: register value
request:
17 RR
high
RR
low
NR
high
NR
low
RW
high
RW
low
NW
high
NW
low
B
D1
high
D1
low
request:
17 00
00
00
02
00
03
00
01
02
46
60
response:
17
B
D1
high
D1
low
D2
high
D2
low
response:
17
04
00
04
49
51
Содержание VBG-ENXK20-D
Страница 1: ...AS I 3 0 ETHERNET IP MODBUS TCP GATEWAY FACTORY AUTOMATION MANUAL...
Страница 114: ......