EasyManua.ls Logo

Siemens SIMATIC S7-1200 - Page 1209

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.5 Modbus communication
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
1209
Modbus signal timing
Modbus_Slave must be executed periodically to receive each request from the
Modbus_Master and then respond as required. The frequency of execution for
Modbus_Slave is dependent upon the response timeout period of the Modbus_Master. This
is illustrated in the following diagram.
The response timeout period RESP_TO is the amount of time a Modbus_Master waits for the
start of a response from a Modbus_Slave. This time period is not defined by the Modbus
protocol, but is a parameter of each Modbus_Master. The frequency of execution (the time
between one execution and the next execution) of Modbus_Slave must be based upon the
particular parameters of your Modbus_Master. At a minimum, you should execute
Modbus_Slave twice within the response timeout period of the Modbus_Master.
Modbus_Slave instruction data block (DB) tags
The following table shows the public static tags stored in the Modbus_Slave instance DB that
you can use in your program:
Table 13- 85 Modbus_Slave instance DB static tags
Tag
Data type
Default
Description
HR_Start_Offset Word 0 Assigns the starting address of the Modbus holding register (default =
0)
Extended_Addressing Bool FALSE Configures single or double-byte slave addressing:
FALSE = single byte address
TRUE = double-byte address
Request_Count
Word
0
Total of all requests received by this slave
Slave_Message_Count
Word
0
Number of requests received for this specific slave
Bad_CRC_Count Word 0 Number of requests received that have a CRC error
Broadcast_Count
Word
0
Number of broadcast requests received
Exception_Count Word 0 Modbus-specific errors that require an acknowledgement with a re-
turned exception to the master
Success_Count Word 0 Number of requests received for this specific slave that have no proto-
col errors
MB_DB MB_BASE - The MB_DB parameter of the Modbus_Comm_Load instruction must
be connected to the MB_DB parameter of the Modbus_Slave instruc-
tion.
Your program can write values to the HR_Start_Offset and Extended_Addressing tags and
control the Modbus slave operations. You can read the other tags to monitor the Modbus
status.

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals