EasyManua.ls Logo

Siemens SIMATIC S7-1200 - Page 1280

Siemens SIMATIC S7-1200
1614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Communication processor and Modbus TCP
13.9 Legacy Modbus RTU communication (CM/CB 1241 only)
S7-1200 Programmable controller
1280 System Manual, V4.2, 09/2016, A5E02486680-AK
The following table shows examples of Modbus address to holding register mapping that is
used for Modbus function codes 03 (read words), 06 (write word), and 16 (write words). The
actual upper limit of DB addresses is determined by the maximum work memory limit and M
memory limit, for each CPU model.
Table 13- 156 Mapping of Modbus addresses to CPU memory
Modbus Master
Address
MB_HOLD_REG parameter examples
MW100
DB10.DBw0
MW120
DB10.DBW50
"Recipe".ingredient
40001
MW100
DB10.DBW0
MW120
DB10.DBW50
"Recipe".ingredient[1]
40002
MW102
DB10.DBW2
MW122
DB10.DBW52
"Recipe".ingredient[2]
40003 MW104 DB10.DBW4 MW124 DB10.DBW54 "Recipe".ingredient[3]
40004
MW106
DB10.DBW6
MW126
DB10.DBW56
"Recipe".ingredient[4]
40005
MW108
DB10.DBW8
MW128
DB10.DBW58
"Recipe".ingredient[5]
Table 13- 157 Diagnostic functions
S7-1200 MB_SLAVE Modbus diagnostic functions
Codes
Sub-function
Description
08 0000H Return query data echo test: The MB_SLAVE will echo back to a Modbus master a
word of data that is received.
08 000AH Clear communication event counter: The MB_SLAVE will clear out the communication
event counter that is used for Modbus function 11.
11 Get communication event counter: The MB_SLAVE uses an internal communication
event counter for recording the number of successful Modbus read and write requests
that are sent to the Modbus slave. The counter does not increment on any Function 8,
Function 11, or broadcast requests. It is also not incremented on any requests that
result in a communication error (for example, parity or CRC errors).
The MB_SLAVE instruction supports broadcast write requests from any Modbus master as
long as the request is for accessing valid addresses. MB_SLAVE will produce error code
0x8188 for function codes not supported in broadcast.

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals