English (GB)
77
15. Modbus telegram examples
15.1 Diagnostics: return query data
This function is useful to ensure that the communication path and
slave configuration are correct. It will echo the request in the
response.
In the example, slave address 0x01 is used.
Request from master to slave
Example of response from slave to master
If there is no response from the slave, see section
200 Modbus communication faults
.
15.2 Reading the CIM configuration register block
This section shows how to read the CIM configuration register
block (a total of four registers).
In the example, slave address 0x01 is used.
Request from master to slave
Example of response from slave to master
If there is no response from the slave, see section
200 Modbus communication faults
15.3 Reading the pit water level
This section shows how to read and interpret the water level of
the pit.
In the example, slave address 0x01 is used.
Request from master to slave
Example of response from slave to master
A pit water level value of 220 [0.01 m] equals a water level of 2.20
metres.
If there is no response from the slave, see section
200 Modbus communication faults
Note
CRC fields are not shown in the following examples.
Note
The Modbus data model states that registers
numbered X are addressed in telegrams as X - 1,
e.g. register 00104 (setpoint) is addressed as 00103
in a Modbus telegram.
Field
Value
Description
Slave address
0x01
-
Function code
0x08
Diagnostics
Subcode
0x00
Echo request
Data
0xAB
Test data
Data
0xCD
Test data
Field
Value
Description
Slave address
0x01
-
Function code
0x08
Diagnostics
Subcode
0x00
Echo request
Data
0xAB
Test data
Data
0xCD
Test data
Field
Value
Description
Slave address
0x01
-
Function code
0x04
Read input registers
Start address HI
0x00
Start address
= 0x0001
Start address LO
0x00
Quantity HI
0x00
Number of registers
= 0x0004
Quantity LO
0x04
Field
Value
Description
Slave address
0x01
-
Function code
0x04
Read input registers
Byte count
0x08
8 bytes follow
00001 HI
0x0A
SlaveMinimumReplyDelay
= 0x000A (10 ms)
00001 LO
0x00
00002 HI
0x00
RegisterOffset
= 0x0000 (no offset)
00002 LO
0x00
00003 HI
0x00
Reserved value
= 0x0000
00003 LO
0x00
00004 HI
0x00
ModbusBitRate
= 0x0004 (19200, software-defined)
00004 LO
0x04
Field
Value
Description
Slave address
0x01
-
Function code
0x04
Read input registers
Start address HI
0x01
Start address (00301)
= 0x012D
Start address LO
0x2C
Quantity HI
0x00
Number of registers
= 0x0001
Quantity LO
0x01
Field
Value
Description
Slave address
0x01
-
Function code
0x04
Read input registers
Byte count
0x02
2 bytes follow
00301 HI
0x00
Pit water level
= 0x00DC (220)
00301 LO
0xDC
Pumpland.ru
Содержание CIM 200
Страница 92: ...92 Pumpland ru...