hit counter script
Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

Table 12- 59 Modbus diagnostic function codes
MB_SERVER Modbus diagnostic functions
Codes
Sub-function
08
0x0000
08
0x000A
11
MB_SERVER variables
This table shows the public static variables stored in the MB_SERVER instance data block
that can be used in your program
Table 12- 60 MB_SERVER public static variables
Variable
HR_Start_Offset
Request_Count
Server_Message_Count
Xmt_Rcv_Count
Exception_Count
Success_Count
Connected
Your program can write values to the HR_Start_Offset and control Modbus server
operations. The other variables can be read to monitor Modbus status.
HR_Start_Offset
Modbus holding register addresses begin at 40001. These addresses correspond to the
beginning PLC memory address of the holding register. However, you can configure the
"HR_Start_Offset" variable to start the beginning Modbus holding register address at another
value instead of 40001.
For example, if the holding register is configured to start at MW100 and is 100 words long.
An offset of 20 specifies a beginning holding register address of 40021 instead of 40001.
Any address below 40021 and above 40119 will result in an addressing error.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
Description
Return query data echo test: The MB_SERVER will echo back to a Modbus client a word of data
that is received.
Clear communication event counter: The MB_SEVER will clear out the communication event
counter that is used for Modbus function 11.
Get communication event counter: The MB_SERVER uses an internal communication event
counter for recording the number of successful Modbus read and write requests that are sent to
the Modbus server. The counter does not increment on any Function 8 or Function 11 requests. It
is also not incremented on any requests that result in a communication error.
The broadcast function is not available for Modbus TCP, because only one client-server
connection exists at any one time.
Data type Default
value
Word
0
Word
0
Word
0
Word
0
Word
0
Word
0
Bool
0
Communication processor and Modbus TCP
Description
Assigns the starting address of the Modbus Holding register
The number of all requests received by this server.
The number of requests received for this specific server.
The number of transmissions or receptions that have encountered an
error. Also, incremented if a message is received that is an invalid
Modbus message.
Modbus specific errors that require a returned exception
The number of requests received for this specific server that ha no
protocol errors.
Indicates whether the connection to the assigned client is connected or
disconnected: 1=connected, 0=disconnected
12.5 Modbus communication
739

Advertisement

Table of Contents
loading

Table of Contents

Save PDF