Herunterladen Inhalt Inhalt Diese Seite drucken

ECOLAB Versatronic Modbus Beschreibung Seite 140

Mehrkanalmessgerät
Inhaltsverzeichnis

Werbung

Verfügbare Sprachen

Verfügbare Sprachen

Modbus over Ethernet
Example: Reading n words
Reading the IP address of the device. The address used in the example is 10.10.1.69.
Since each octet of the IP address is saved in a word, it is necessary here to read 4
words, that is, 8 bytes.
See also the Modbus example in
Query:
MBAP header
0x0001
2 bytes
Transaction ID
Assignment of
response to
request
(consecutive
numbering)
Response:
MBAP header
0x0001
0x0000
2 bytes
2 bytes
Transacti
Protocol
on ID
ID
Assign-
For
ment of
Modbus
response
always
to query
0x00
417102397 Rev. 1-10.2019
Ä Chapter 3.4.1 'Reading n words' on page 18.
0x0000
0x0006
2 bytes
2 bytes
Protocol ID
Length
Length of the
request in
For Modbus
bytes starting
always
with (incl.)
0x0000
"Unit ID"; 6
bytes here
(0x06)
Modbus telegram (without slave address and CRC)
0x000B
0xFF
2 bytes
1 byte
Length
Unit ID
Length of
response
in bytes
For TCP
(incl.)
always
"Unit ID";
0xFF
in this
case 11
bytes
Modbus telegram (without slave
address and CRC)
0xFF
0x03
1 byte
1 byte Unit ID
Function code
Function code
for "Reading n
For TCP
words"
always FF or
255
0x03
0x08
0x000A
1 byte
1 byte
Number
Function
of bytes
code
read
IP address consisting of 4 octets
Function
code for
8 bytes
"Reading
were read
10.
n words"
40
0x19C9
0x0004
2 bytes
2 bytes
address First
Number of
word
words
First word of
4 words
IP address to
should be
be read
read
0x000A
0x0001
0x0045
8 bytes
1 word per octet
4 octets × 2 bytes = 8 bytes
10.
1.
69

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis