How do you use the blocks for redundant Modbus/TCP communication via the integrated PROFINET interface of the S7-1200 or S7-1500 and a connected CP in STEP 7 V15 or higher?
With the "MB_RED_CLIENT" and "MB_RED_SERVER" instructions you can establish a connection between an S7-1200/S7-1500 CPU and a device that supports the Modbus/TCP protocol.
The "MB_RED_CLIENT" instruction communicates as Modbus/TCP client via the PROFINET connection. Using the "MB_RED_CLIENT" instruction you establish a redundant connection between the client and the server, send Modbus requests, receive responses and control the establishment of the connection of the Modbus/TCP client.
The "MB_RED_Server" instruction communicates as Modbus/TCP server via the PROFINET connection. The "MB_RED_Server" instruction processes connection requests of a Modbus/TCP client, receives and processes Modbus requests and sends response messages.
The instructions can be used in the following CPUs:
- S7-1200 CPUs firmware V4.2 and higher
- S7-1500 CPUs firmware V2.5 and higher
In STEP 7 V15 and higher the instructions in the "Instructions" task card are included in the palette "Communication > Other > MODBUS TCP".
The download includes the "MODBUS_RED_1200_1500_EXAMPLE_V15.zip" project that has been created with STEP 7 V15. This project includes examples with the integrated Modbus blocks for redundant Modbus/TCP communication between a S7-1200/S7-1500 CPU with connected CP and a third-party device. For each CPU there is a sample station for parameterization as server and as client.
Unpack the "MODBUS_RED_S71200_S71500_EXAMPLE_V15.zip" file into a separate directory. Then you can open and edit the project in the TIA Portal.
Detailed information on the topic of Modbus/TCP communication is available here: