Overview
Integrating Modbus TCP/IP devices into a PROFINET-controlled S7-400H automation system requires selecting a conversion strategy that aligns with the existing CP 443-1 communications processor hardware. Two primary paths are available: leveraging the native Modbus TCP capability of the CP 443-1 through the Siemens Modbus/TCP block library (entry ID 109749851), or installing a third-party protocol gateway that bridges Modbus TCP/IP and PROFINET IO. This technical reference evaluates both approaches, details configuration procedures for the major gateway families (ProSoft PLX32, Moxa MGate 5103, HMS Anybus X-gateway), and addresses the S7-400H redundancy constraints that govern gateway placement and IP routing.
Architecture Options
Three viable architectures exist for an S7-400H controller with one or more CP 443-1 modules reaching Modbus TCP/IP field devices:
- Native Modbus TCP on the CP 443-1 using the Siemens Modbus/TCP block library. No additional hardware is required; the existing CP performs the conversion via STEP 7 code and the open TCP SEND/RECEIVE interface.
- Dedicated protocol gateway in the PROFINET IO line of the CP 443-1 (CP as PROFINET IO Controller, gateway as PROFINET IO Device). The gateway maintains the Modbus TCP client or server side and exchanges cyclic I/O data with the PLC.
- Two-stage architecture using a LOGO! 8 with the LOGO! CIM (Communication Interface Module) as a small Modbus TCP front-end, with the LOGO! 8 exposing data via PROFINET or hardwired I/O to the S7-400H. This is best suited for low-bandwidth, small-point-count applications.
The CP 443-1 module connects to the S7-400H backplane and can be configured as a PROFINET IO Controller or as a programmable node running open TCP services. The latter role is what the Siemens Modbus/TCP block library uses: the CP opens a configurable number of TCP connections on port 502 and exchanges Modbus Application Data Units (ADUs) with remote Modbus TCP servers or clients.
Native Modbus TCP via the CP 443-1
The CP 443-1 supports open TCP communication that can be configured as a Modbus/TCP client or server using the Siemens Modbus/TCP block library for CP 343-1 and CP 443-1. The library contains function blocks that build Modbus ADUs and submit them through the CP using the SEND/RECEIVE interface (BSEND/BRCV for larger payloads).
Required Components
- STEP 7 V5.5 SP2 or later (for Classic projects), or STEP 7 Professional in TIA Portal V13 SP1 or later for S7-400 targets.
- CP 443-1 with PROFINET interface (6GK7443-1EX4x-0XE0 or 6GK7443-1GX4x-0XE0 recommended for current firmware).
- Modbus/TCP PN-CPU block library from the Siemens Industry Online Support portal.
- Configured TCP connections on the CP 443-1 using the "Open TCP Communication" wizard in NetPro or the TIA Portal devices & networks editor.
Supported Modbus Function Codes
The library implements the most common Modbus function codes for process automation:
| Function Code | Name | Direction | Use Case |
|---|---|---|---|
| FC 1 | Read Coils | Master to Slave | Digital outputs (read-back) |
| FC 2 | Read Discrete Inputs | Master to Slave | Digital inputs from field |
| FC 3 | Read Holding Registers | Master to Slave | Setpoint, status words |
| FC 4 | Read Input Registers | Master to Slave | Process measurements |
| FC 5 | Write Single Coil | Master to Slave | Digital command output |
| FC 6 | Write Single Register | Master to Slave | Setpoint write |
| FC 15 | Write Multiple Coils | Master to Slave | Block digital output |
| FC 16 | Write Multiple Registers | Master to Slave | Block setpoint write |
| FC 23 | Read/Write Multiple Registers | Master to Slave | Combined transactions |
CP 443-1 Connection Configuration
For each Modbus TCP device, create an undirected TCP connection pointing from the CP 443-1 to the remote Modbus server's IP address. Use the following parameters:
| Parameter | Value |
|---|---|
| Connection type | TCP connection (open) |
| Local port | 2000-5000 (any free port, client side) |
| Remote port | 502 (standard Modbus/TCP) |
| Active/passive | Active connection establishment (CP initiates) |
| Connection name | Reference to Modbus device tag (e.g., "MBM_Flowmeter_01") |
The library's FBs use the connection ID (hex LADDR or "ID" parameter) to route requests to the appropriate connection. The maximum number of concurrent Modbus TCP connections supported by a single CP 443-1 depends on the CP variant and firmware; CP 443-1 Advanced modules generally support more connections than the standard CP 443-1. Always cross-check the CP's technical data for "Number of connections" and "Number of SEND/RECEIVE resources".
Third-Party Protocol Gateways
When the Modbus TCP device population is large, when the S7-400H does not have an available open TCP resource, or when the commissioning schedule does not allow PLC code development, a dedicated protocol gateway is the preferred solution. The gateway appears on the PROFINET side as an IO Device with a GSDML file and on the Modbus TCP side as a client or server, depending on the model.
Three families dominate this segment:
- ProSoft Technology PLX32-MBTCP-PND — Modbus TCP/IP to PROFINET Device gateway. PROFINET IO Device mode, Modbus TCP Client mode. Industrial DIN-rail enclosure with dual Ethernet ports.
- Moxa MGate 5103 — Modbus RTU/ASCII/TCP/EtherNet/IP to PROFINET gateway. Multi-protocol on the field side, PROFINET IO Device on the control side. 1 or 2 Ethernet ports depending on submodel.
- HMS Networks Anybus X-gateway (AB9007-B) — Modbus TCP Client to PROFINET IO Device. Compact gateway with web-based configuration and the Anybus NP40 network processor.
Other vendors including Advantech offer PROFINET gateways covering similar Modbus RTU/TCP conversion use cases.
Gateway Comparison
| Feature | ProSoft PLX32-MBTCP-PND | Moxa MGate 5103 | HMS Anybus X-gateway (AB9007-B) |
|---|---|---|---|
| PROFINET role | IO Device | IO Device | IO Device |
| Modbus TCP role | Client | Master (Client) / Server (Slave) | Client |
| Modbus RTU/ASCII | No (TCP-only variant) | Yes | No (TCP-only variant) |
| EtherNet/IP | No | Yes (gateway to EtherNet/IP) | No |
| Configuration tool | ProSoft Configuration Manager | Web console / MGate Manager (Windows) | Web browser (Anybus Configuration Manager) |
| SD card / backup | No (firmware update only) | Yes (MicroSD configuration backup) | No (configuration via web export) |
| Power input | 24 VDC typical | 12-48 VDC | 24 VDC typical |
| Mounting | DIN rail | DIN rail | DIN rail |
| GSDML file | Yes (vendor-provided) | Yes (vendor-provided) | Yes (vendor-provided) |
| Diagnostics | LEDs, web server, ProSoft Diagnostics | LEDs, web server, MXview | LEDs, web server |
ProSoft PLX32-MBTCP-PND Configuration
Topology
The PLX32-MBTCP-PND sits between the CP 443-1 (PROFINET IO Controller) and the Modbus TCP field network. The PROFINET side connects to the CP 443-1 PROFINET port (or to an industrial Ethernet switch if multiple IO Devices are present). The Modbus TCP side connects to the field switches/routers that reach the Modbus TCP servers.
+-------------------+ PROFINET +-------------+ Modbus TCP +----------------+
| S7-400H CPU | -------------------> | PLX32-MBTCP | ------------------> | Modbus TCP |
| + CP 443-1 | (IO Controller) | -PND | (TCP Client) | Field Devices |
+-------------------+ +-------------+ +----------------+
Configuration Steps
- Install ProSoft Configuration Manager (PCM) on the engineering workstation. PCM is downloadable from the ProSoft Technology website with a free account.
- Import the GSDML file for the PLX32-MBTCP-PND into the TIA Portal or STEP 7 hardware catalog.
- Drag the PLX32-MBTCP-PND into the PROFINET IO line of the CP 443-1. Assign a unique device name and IP address consistent with the PROFINET naming convention (use the PROFINET DCP tool or TIA Portal topology editor).
- Configure the I/O data slots in the device properties. Each slot can be a defined number of input/output bytes, with a maximum total I/O per gateway enforced by the device firmware.
- Launch PCM and connect to the PLX32 over Ethernet using its default IP. Configure the Modbus TCP client side: enter the IP address, port 502, slave/unit ID, and the register/holding register/coil mapping for each Modbus device.
- For each Modbus device, define the read and write transactions: starting register, quantity, function code, and update rate.
- Map Modbus data points to PROFINET slots. The PROFINET-to-Modbus tag mapping is bi-directional and is configured inside PCM.
- Download the configuration to the PLX32 and verify PROFINET IO communication by checking the CP 443-1 diagnostic buffer and the gateway's PROFINET status LEDs.
Key Parameters
| Parameter | Setting |
|---|---|
| PROFINET device name | "plx32-mbtcp-01" (must match DCP name) |
| PROFINET IP | Assignable from PLC project (e.g., 192.168.0.50) |
| Modbus TCP server IP | Field device address (e.g., 192.168.1.101) |
| Modbus TCP port | 502 |
| Unit ID / Slave ID | 1-247 (per Modbus device) |
| Polling interval | 50-1000 ms (configurable per transaction) |
Moxa MGate 5103 Configuration
Topology
The MGate 5103 acts as a PROFINET IO Device on the S7-400H PROFINET segment and a Modbus master on the field side. The field side accepts Modbus RTU/ASCII/TCP and (in some submodels) EtherNet/IP. The PROFINET side connects directly or via managed switch to the CP 443-1.
Configuration Steps
- Install MGate Manager for Windows (Moxa's free utility) or use the device's built-in web console.
- Import the Moxa MGate 5103 GSDML into the TIA Portal / STEP 7 hardware catalog. The GSDML is available on the Moxa product page.
- Add the MGate 5103 as a PROFINET IO Device on the CP 443-1 IO Controller. Assign the PROFINET device name and IP address via DCP.
- Configure the PROFINET I/O modules in the device properties. The MGate 5103 typically exposes a small number of pre-defined slot types (e.g., 8-byte input, 8-byte output).
- Open the web console of the MGate 5103 (default IP printed on the device label). Set the PROFINET device name to match the PLC project.
- In the "Modbus" section of the web console, define the Modbus commands: enable RTU/TCP/ASCII as needed, set slave ID, function code, register address, and quantity.
- Save the configuration. Optionally back up the configuration to a MicroSD card (if installed) for quick field replacement.
- Verify communication: the MGate 5103's "Ready" and "PWR" LEDs should be solid green, the "PROFINET" LED indicates PROFINET IO data exchange, and the "Modbus" or serial LEDs indicate active field transactions.
Key Parameters
| Parameter | Setting |
|---|---|
| PROFINET device name | "mgate5103-01" |
| PROFINET IP | Assignable from PLC project |
| PROFINET slot count | Pre-defined by Moxa GSDML (input/output modules) |
| Modbus protocol | RTU, ASCII, or TCP (selectable per command) |
| Modbus poll interval | 10-10000 ms (per command) |
| Response timeout | 100-10000 ms |
HMS Anybus X-gateway Configuration
Topology
The Anybus X-gateway AB9007-B (Modbus TCP Client to PROFINET IO Device) sits in the PROFINET line of the CP 443-1 and connects via a separate Ethernet port to the Modbus TCP field network. The unit is configured entirely through a web browser; no vendor software install is required.
Configuration Steps
- Power up the Anybus X-gateway. The default IP address is typically 192.168.0.10 (verify against the product datasheet).
- Connect a laptop to the configuration Ethernet port. Open a browser and navigate to the gateway's default IP.
- Import the GSDML file for the AB9007-B into the TIA Portal or STEP 7 hardware catalog.
- Add the Anybus X-gateway to the PROFINET IO line of the CP 443-1. Assign the PROFINET device name and IP address using TIA Portal topology configuration or a DCP tool.
- Set the Anybus PROFINET device name to match the PLC project. The gateway reboots to apply the new name.
- In the Anybus web configuration, define the Modbus TCP client transactions: target IP, port 502, slave ID, function code, register range, and polling rate.
- Map the Modbus data to the PROFINET I/O image. The I/O size is limited to a small number of bytes (typical maximums vary by submodel; check the specific data sheet).
- Save the configuration and verify data exchange using the CP 443-1 online diagnostics and the gateway's "Live Data" page.
CP 443-1 Communications Processor Specifications
Select the correct CP 443-1 variant before planning the Modbus/TCP integration. The relevant catalog numbers and capability levels are:
| Catalog Number | Type | PROFINET | Open TCP (SEND/RECEIVE) | Notes |
|---|---|---|---|---|
| 6GK7443-1EX11-0XE0 | CP 443-1 | 1 port, 100 Mbps | Yes | Legacy, phased out |
| 6GK7443-1EX20-0XE0 | CP 443-1 | 1 port, 100 Mbps | Yes | Discontinued |
| 6GK7443-1EX30-0XE0 | CP 443-1 | 1 port, 100 Mbps | Yes | Discontinued |
| 6GK7443-1EX40-0XE0 | CP 443-1 | 1 port, 100 Mbps | Yes | Current standard |
| 6GK7443-1GX11-0XE0 | CP 443-1 Advanced | 1 port, 1 Gbps | Yes (more connections) | Legacy |
| 6GK7443-1GX20-0XE0 | CP 443-1 Advanced | 1 port, 1 Gbps | Yes (more connections) | Discontinued |
| 6GK7443-1GX30-0XE0 | CP 443-1 Advanced | 1 port, 1 Gbps | Yes (more connections) | Discontinued |
| 6GK7443-1GX40-0XE0 | CP 443-1 Advanced | 1 port, 1 Gbps | Yes (more connections) | Current advanced variant |
For S7-400H redundancy, the system uses two CP 443-1 modules (one per H-station). The H-system manages PROFINET IO with S2 device redundancy for IO Devices that support it, or with single-sided attachment plus a redundancy mode on the CP side. The exact redundancy mode supported by a given CP 443-1 firmware release is documented in the S7-400H communication manual on the Siemens Industry Online Support portal.
S7-400H Redundancy Considerations
When the S7-400H controls a PROFINET segment that includes a Modbus TCP gateway, several redundancy-specific rules apply:
- Gateway placement: For a non-redundant gateway, attach it to the PROFINET line of the active H-CPU's CP 443-1 only. A failure of the active H-station will break communication with the gateway unless the second CP 443-1 in the standby H-station is also wired to the same PROFINET segment via a managed Ethernet switch.
- S2 device redundancy: A few gateways on the market support PROFINET S2 (system) redundancy — a single device with two PROFINET ports, one to each H-station. Verify S2 support in the vendor's PROFINET certification documents and GSDML revision.
- IP addressing: The two CP 443-1 modules have different IP addresses. The PROFINET device name of the gateway must be unique on the segment. Avoid assigning the gateway an IP address in the same subnet as the CP 443-1 management IP if the gateway is meant to be reached only through PROFINET.
- CP connection resources: Each CP 443-1 has a fixed number of TCP connections available for SEND/RECEIVE. When using the native Modbus/TCP library, plan the number of Modbus devices against the CP's connection resource limit. If more connections are required, install a second CP 443-1 or move to a gateway approach.
- Diagnostic buffer: In a redundant S7-400H, the diagnostic buffer entries for the CP are written by the active H-CPU. Use the PG/PC interface to "Target system -> Accessible nodes" against both H-CPUs when commissioning.
Diagnostic and Troubleshooting
| Symptom | Likely Root Cause | Diagnostic Step | Resolution |
|---|---|---|---|
| CP 443-1 reports "Connection fault" for Modbus TCP | Remote Modbus server not reachable, wrong IP, firewall, or wrong port | Use CP's "Connection diagnostics" in STEP 7; ping the remote IP from a PG on the same subnet | Verify IP/subnet, check managed switch port, open TCP/502 path |
| PROFINET IO Device not visible to CP 443-1 | Device name mismatch, wrong GSDML, DCP not accepted | Open "Online -> Accessible nodes" in TIA/STEP 7; check device LEDs | Assign correct device name via DCP, verify GSDML is imported |
| Modbus responses are slow or partial | Modbus TCP server slow to respond; TCP timeout too short on the CP side | Use Wireshark on the Modbus TCP segment; check FB status word | Increase response timeout in the FB configuration; reduce poll frequency |
| Gateway's PROFINET status LED off | PROFINET name not assigned or wrong | Read gateway's web diagnostics; check the CP's diagnostic buffer for the IO Device status | Reset the gateway to factory defaults, reassign the name |
| S7-400H link error after CP 443-1 swap | Standby CP 443-1 not yet synchronized, or IP address conflict | Check H-system event log; compare both CP 443-1 diagnostic buffers | Synchronize the H-system after the swap; resolve IP conflicts |
| MB_CLIENT returns error code 80C8 (or similar) | Connection resource exhausted on the CP | List active connections in NetPro; compare to the CP's max | Reduce number of concurrent Modbus connections or add a second CP |
Selection Decision Matrix
| Scenario | Recommended Solution |
|---|---|
| 1-5 Modbus TCP devices, small I/O count, no extra hardware budget | Siemens Modbus/TCP block library on existing CP 443-1 |
| 5-20 Modbus TCP devices, mixed RTU and TCP, fast commissioning | Moxa MGate 5103 (PROFINET IO Device on PLC side, multi-protocol on field side) |
| 20+ Modbus devices or large I/O image per device | ProSoft PLX32-MBTCP-PND (high transaction count, ProSoft Diagnostics) |
| Brownfield with existing Anybus HMS ecosystem | HMS Anybus X-gateway AB9007-B |
| Low-bandwidth, very small I/O, budget-critical | LOGO! 8 + LOGO! CIM as intermediate |
| Safety-relevant data | PROFIsafe-capable PROFINET gateway (Modbus is not safety-rated) |
Frequently Asked Questions
Can the CP 443-1 act as a Modbus TCP master on its own?
Yes. The CP 443-1 supports open TCP communication, and the Siemens Modbus/TCP block library (entry ID 109749851) provides function blocks that turn the CP into a Modbus TCP client or server. The library is available on the Siemens Industry Online Support portal.
How many Modbus TCP connections can a single CP 443-1 handle?
The exact limit depends on the CP variant and firmware release. The CP 443-1 Advanced (6GK7443-1GX4x-0XE0) generally supports more connections than the standard CP 443-1 (6GK7443-1EX4x-0XE0). Refer to the CP's technical data sheet for the specific maximum number of open TCP connections and SEND/RECEIVE resources.
Do the third-party gateways support S7-400H PROFINET redundancy?
Standard gateways act as single-attached PROFINET IO Devices. A few vendors offer PROFINET S2 (system redundancy) variants. For full H-station redundancy, connect the gateway to a managed PROFINET switch that is reachable from both CP 443-1 modules, or select a S2-capable gateway.
What is the typical latency through a Modbus TCP-to-PROFINET gateway?
Typical round-trip latency is in the range of a few milliseconds to a few tens of milliseconds, depending on the gateway's processing load, the number of concurrent Modbus transactions, and the configured PROFINET update time. Set the PROFINET update time to at least the gateway's worst-case transaction cycle to avoid IO timeout errors.
Is the Modbus/TCP library compatible with TIA Portal?
The library referenced by entry ID 109749851 supports STEP 7 V5.5 for S7-400 classic projects. For TIA Portal projects with S7-400, the library can be integrated into a STEP 7 Professional project, and the CP 443-1-based SEND/RECEIVE interface is also accessible from TIA Portal. Verify the library's release notes for the specific TIA Portal version compatibility before deployment.