Open User Communication
6.7 Setting up communication with Modbus TCP
Communication
130
Function Manual, 05/2021, A5E03735815-AJ
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.
3.
Select the required instruction, for example MB_CLIENT, from the "Instructions" task card,
"Communication" area, "Other", "MODBUS TCP" and drag it to a network of OB1.
Summary of Contents for SIMATIC ET 200AL
Page 2: ......
Page 143: ......
Page 218: ......
Page 250: ......
Page 296: ......
Page 337: ......
Page 365: ......
Page 392: ......
Page 419: ......
Page 451: ......
Page 483: ......
Page 597: ......
Page 648: ......
Page 702: ......
Page 739: ......
Page 781: ......
Page 804: ......
Page 828: ......
Page 853: ......
Page 880: ......
Page 906: ......
Page 996: ...Diagnostics ...
Page 1121: ......
Page 1565: ......