Initialization And Execution Time For Modbus Protocol - Siemens Simatic S7 Series System Manual

Hide thumbs Also See for Simatic S7 Series:
Table of Contents

Advertisement

Modbus RTU slave protocol
Modbus slave protocol instructions use the following resources from the CPU:
● The MBUS_INIT instruction initializes the Modbus slave protocol and dedicates the
assigned CPU port (0 or 1), for Modbus slave communication.
When a CPU port is used for Modbus communication, it cannot be used for any other
purpose, including communications with an HMI.
● Modbus slave instructions affect all of the SM locations associated with a Freeport
communications on the port assigned by the MBUS_INIT instruction.
● Modbus slave instructions program size
– Modbus slave instructions use 3 subroutines and 2 interrupts.
– Modbus slave instructions require 2113 bytes of program space for the two slave
– The variables for the Modbus slave instructions require a 786 byte block of V memory.
9.3.1.2

Initialization and execution time for Modbus protocol

● Modbus RTU master protocol: The master protocol requires a small amount of time every
scan to execute the MBUS_CTRL instruction. The time will be about .2 milliseconds when
the MBUS_CTRL is initializing the Modbus master (first scan), and about 0.1 milliseconds
on subsequent scans.
The scan time is extended when the MBUS_MSG instruction executes a request. Most of
the time is spent calculating the Modbus CRC for the request and response. The CRC
(Cyclic Redundancy Check) insures the integrity of the communications message. The
PLC scan time is extended by about 86 microseconds for each word in request and in the
response. A maximum request/response (read or write of 120 words) extends the scan
time to approximately 10.3 milliseconds. A read request extends the scan mainly when
the response is received from a slave, and to a lesser extent when the request is sent. A
write request extends the scan mainly when the data is sent to a slave, and to a lesser
extent when the response is received.
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
instructions and support routines.
The starting address for this block is assigned by the user and is reserved for Modbus
variables.
Note
To change the CPU communication port from Modbus back to PPI so that you can
communicate with an HMI device, set the mode parameter of the MBUS_INIT
instruction to a zero (0).
Libraries
9.3 Modbus library instructions
433

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart series

Table of Contents