Setting Up Communication With Modbus Tcp - Siemens SIMATIC S7-1500 Function Manual

Hide thumbs Also See for SIMATIC S7-1500:
Table of Contents

Advertisement

Open User Communication

6.7 Setting up communication with Modbus TCP

4. Create a TCON instruction in the program editor.
5. Interconnect the CONNECT parameter of the TCON instruction with the tag of the data
type TCON_FDL.
In the example below, the CONNECT parameter of the TCON instruction is
interconnected with the tag "FDL_Connection" (data type TCON_FDL).
Figure 6-8
6.7
Setting up communication with Modbus TCP
Setting up a connection for Modbus TCP via the user program
The parameter assignment takes place in the program editor at the instruction MB_CLIENT
or MB_SERVER.
Procedure for setting up communication using Modbus TCP
The MB_CLIENT instruction communicates as a Modbus TCP client via the TCP connection.
You establish a connection between the client and the server with the instruction, send
Modbus requests to the server and receive the corresponding Modbus responses. You also
control the setup of the TCP connection with this instruction.
The MB_SERVER instruction communicates as a Modbus TCP server via the TCP
connection. The instruction processes connection requests of a Modbus client, receives and
processes Modbus requests and sends responses. You also control the setup of the TCP
connection.
Requirement: The client can reach the server via IP communication in the network.
1. Configure an S7-1500 automation system with CPU in the network view of the Devices &
networks editor of STEP 7.
2. In the Project tree, select the "Program blocks" folder and open OB1 in the folder by
double-clicking on it. The program editor opens.
84
Example: TCON Instruction for FDL connection
Function Manual, 11/2019, A5E03735815-AH
Communication

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents