Communication via RS485
5.4 Communication using Modbus RTU
Fieldbuses
Function Manual, 04/2018, FW V4.7 SP10, A5E34229197B AE
141
Read parameter
Example: r0002 read acyclically
Table 5- 24 Write parameter request: Reading the parameter value of r0002 from slave number 17
0258 h
0007 h
0E h
0001 h
2F0A h
8001 h
0101 h
1001 h
0002 h
2,3
4,5
6
7,8
9,10
11,12
13,14
15,16
17,18
Function code (write multiple)
Register start address
Number of registers to be read (40601 … 40607)
Number of data bytes (7 registers, each 2 bytes = 14 bytes)
40601: DS47 Control = 1 (activate request)
40602: Function 2F h (47), request length 10 bytes (0A h)
40603: Request reference = 80 h, request identifier = 1 h
40604: DO-Id = 1, number of parameters = 1
40605: Attribute, number of elements = 1
40606: Parameter number = 2
xx h
21
CRC "Low"
Table 5- 25 Start parameter request: Reading the parameter value of r0002 from slave number 17
03 h
0258 h
0007 h
1
2,3
4,5
Function code (read)
Register start address
Number of registers to be read (40601 … 40607)
Table 5- 26 Response for successful read operation
20 h
0002 h
2F08 h
8001 h
0101 h
0301 h
2
3,4
5,6
7,8
9,10
11,12
Number of following data bytes (20 h: 32 bytes
16 registers)
40601: DS47 Control = 2 (the request was executed)
40602: Function code 2F h (47), response lengths 8 bytes
40603: Request reference mirrored = 80 h,
response identifier = 1 (request parameter)
40604: DO-ID = 1, number of parameters = 1
40605: Format, number of elements = 1
40606: Parameter value = 1F h (31)
xx h
15
CRC "Low"