EasyManua.ls Logo

Siemens SIMATIC S7-1200 - Page 1168

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
1168 System Manual, V4.2, 09/2016, A5E02486680-AK
Modbus TCP communication
Modbus TCP (Transmission Control Protocol) is a standard network communication protocol
that uses the PROFINET connector on the CPU for TCP/IP communication. No additional
communication hardware module is required.
Modbus TCP uses Open User Communications (OUC) connections as a Modbus
communication path. Multiple client-server connections may exist, in addition to the
connection between STEP 7 and the CPU. Mixed client and server connections are
supported up to the maximum number of connections allowed by the CPU model
(Page 801).
Each MB_SERVER connection must use a unique instance DB and IP port number. Only 1
connection per IP port is supported. Each MB_SERVER (with its unique instance DB and IP
port) must be executed individually for each connection.
A Modbus TCP client (master) must control the client-server connection with the
DISCONNECT parameter. The basic Modbus client actions are shown below.
1. Initiate a connection to a particular server (slave) IP address and IP port number
2. Initiate client transmission of a Modbus message and receive the server responses
3. When desired, initiate the disconnection of client and server to enable connection with a
different server.
Modbus RTU instructions in your program
Modbus_Comm_Load: One execution of Modbus_Comm_Load is used to set up PtP port
parameters like baud rate, parity, and flow control. After a CPU port is configured for the
Modbus RTU protocol, it can only be used by either the Modbus_Master or
Modbus_Slave instructions.
Modbus_Master: The Modbus_Master instruction enables the CPU to act as a
Modbus RTU master device and communicate with one or more Modbus slave devices.
Modbus_Slave: The Modbus_Slave instruction enables the CPU to act as a Modbus RTU
slave device and communicate with a Modbus master device.
Modbus TCP instructions in your program
MB_CLIENT: Make client-server TCP connection, send command message, receive
response, and control the disconnection from the server
MB_SERVER: Connect to a Modbus TCP client upon request, receive Modbus message,
and send response

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals