Examples: Read Parameter - Siemens SINAMICS S120 Function Manual

Drive functions
Hide thumbs Also See for SINAMICS S120:
Table of Contents

Advertisement

Communication
11.4 Communication via MODBUS TCP
11.4.6.2

Examples: Read parameter

Table 11- 28 Write parameter request: Reading parameter value of r0002 from device number 17
Value
Byte
Description
MBAP header
10 h
7
Function code (write multiple)
0258 h
8,9
Register start address
0007 h
10,11
Number of registers to be read (40601 ... 40607)
0E h
12
Number of data bytes (7 registers, each 2 bytes = 14 bytes)
0001 h
13,14
40601: DS47 Control = 1 (activate request)
2F0A h
15,16
40602: Function 2F h (47), request length 10 bytes (0A h)
8001 h
17,18
40603: Request reference = 80 h, request identifier = 1 h
0101 h
19,20
40604: DO-Id = 1, number of parameters = 1
1001 h
21,22
40605: Attribute, number of elements = 1
0002 h
23,24
40606: Parameter number = 2
0000 h
25,26
40607: Subindex = 0
Table 11- 29 Start parameter request: Reading parameter value of r0002 from device number 17
Value
Byte
Description
MBAP header
03 h
7
Function code (read)
0258 h
8,9
Register start address
0007 h
10,11
Number of registers to be read (40601 ... 40607)
0010 h
12,13
Number of registers
Table 11- 30 Response for successful read operation
Value
Byte
Description
MBAP header
Number of following data bytes (20 h: 32 bytes ≙ 16 registers)
03 h
7
Function code (read)
20 h
8
0002 h
9,10
40601: DS47 Control = 2 (the request was executed)
2F08 h
11,12
40602: Function code 2F h (47), response lengths 8 bytes
8001 h
13,14
40603: Request reference mirrored = 80 h,
response identifier = 1 (request parameter)
0101 h
15,16
40604: DO-ID = 1, number of parameters = 1
0301 h
17,18
40605: Format, number of elements = 1
001F h
19,20
40606: Parameter value = 1F h (31)
868
Function Manual, 11/2017, 6SL3097-4AB00-0BP5
Drive functions

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents