IMDHMIControls LibraryShop main store

Explainer

Why Modbus TCP and PROFINET I/O can share one interface

Industrial networks Published 8 min read

Short answer

Yes. On an S7-1500 or ET200SP CPU interface that supports both services, PROFINET I/O cyclic frames and Modbus TCP request/response run on the same port because they are separate communication services. A slow PROFINET update time saves wire time only: every Modbus peer still needs its own TCP connection, connection ID, instance data and scan-driven handshake inside the CPU's documented limits.

On this page
  1. Can Modbus TCP and PROFINET I/O run on the same interface?
  2. Why don't the two protocols collide on one port?
  3. Does a slow PROFINET update time free up room for Modbus?
  4. How much wire time do the two services actually use?
  5. What does each Modbus TCP connection cost inside the CPU?
  6. How do you configure the shared interface in order?
  7. Which designs share the port and which need another path?
  8. Questions asked

Yes. On an S7-1500 or ET200SP CPU interface that supports both services, PROFINET I/O cyclic traffic and Modbus TCP request/response share one Ethernet port, because they are separate communication services on the same cable, not competing configurations. Your slow PROFINET update time makes the wire side trivial. What the slow cycle does not buy is CPU-side room: every Modbus peer still needs its own TCP connection, its own connection ID and its own scan-driven handshake. Below is what runs where, what the standards require, the bandwidth arithmetic, and the decision for each case.

Can Modbus TCP and PROFINET I/O run on the same interface? #

Yes: on an S7-1500 or ET200SP CPU interface that supports both services, PROFINET I/O cyclic traffic and Modbus TCP connections run on one port at the same time, and the arrangement is a documented capability rather than a workaround. The port has one MAC address and one IP address, and both services use them. The PROFINET I/O controller role is fixed in the hardware configuration; the Modbus side comes from the library and your program, using the MODBUS TCP library documented for S7-1200 and S7-1500 in library versions V2.1 and V3.x.

Sharing the port does not merge the data: nothing in the PROFINET process image appears as Modbus registers unless your program maps it. The same port also carries S7 communication next to Modbus TCP, the sibling case covered in can one S7 CPU PN port run Modbus TCP and S7 comms together.

Why don't the two protocols collide on one port? #

They pass each other untouched: PROFINET cyclic frames are prioritized Ethernet frames with EtherType 0x8892 that never touch the IP layer, while Modbus TCP is ordinary TCP/IP traffic addressed to port 502. PROFINET RT is standardized as IEC 61158 Type 10 with the IEC 61784-2 profile: cyclic data goes out tagged VLAN priority 6, addressed by device name, with no IP header at all, while engineering, parameterization and alarm traffic rides on UDP/IP alongside. Modbus TCP follows the Modbus Messaging Implementation Guide over IP (RFC 791) and TCP (RFC 793): every request and response is a TCP segment to the server, prefixed with the MBAP header.

Two practical consequences follow. A switch that honors IEEE 802.1Q priority empties the cyclic queue before the Modbus queue, so a Modbus burst cannot hold up the I/O cycle. And because RT cyclic frames are not IP traffic, they do not route: PROFINET I/O devices stay on the port's local segment, while a Modbus peer can sit anywhere a route reaches it.

Does a slow PROFINET update time free up room for Modbus? #

On the cable only: the update time sets how often each device's cyclic frames repeat, so stretching it trims PROFINET's bandwidth share, but no connection, instance or handshake on the Modbus side becomes cheaper. The update time is configured per device and sets the interval in which data moves between the CPU and that device; your slow choice is legitimate process-industry practice, and the device's watchdog time belongs to the same decision, set loose enough that one missed cycle alarms instead of faulting.

What the slow cycle leaves untouched is everything the Modbus library needs: a connection resource per peer, a connection ID that must be unique, an instance block with working storage, and a request handshake that your scan drives. If the CPU is already close to its connection limit from HMI sessions and other open user communication, the slowest I/O cycle in the plant will not free one more connection; the connection count decides, not the update time.

How much wire time do the two services actually use? #

In the worked example below, eight I/O devices at a 100 ms update time and four polled meters together load the port with about 0.11 Mbit/s, roughly 0.1 % of a 100 Mbit/s interface. The numbers are illustrative, at process-industry scale.

PROFINET side: 8 I/O devices, 32 bytes of process data in each direction, update time 100 ms, one cyclic frame per device per direction per update, the usual RT pattern. Wire floor per frame: the 64-byte minimum Ethernet frame plus 8 bytes of preamble and start delimiter plus 12 bytes of interframe gap equals 84 bytes. Per second: 8 devices × 2 frames × 84 bytes = 1,344 bytes per cycle; 1,344 ÷ 0.1 s = 13,440 bytes/s; 13,440 × 8 = 107,520 bit/s.

Modbus side: four power meters, the arrangement why a PROFINET port can also poll Modbus TCP power meters covers, each read for 10 holding registers (20 data bytes) every 2 s. Request on wire: 14 (Ethernet) + 20 (IP) + 20 (TCP) + 12 (7-byte MBAP header plus the 5-byte read request) + 4 (frame check) + 20 (preamble and gap) = 90 bytes. Response on wire: 14 + 20 + 20 + 29 (MBAP, function, byte count, 20 data bytes) + 4 + 20 = 107 bytes. One TCP acknowledgment: 14 + 20 + 20 + 4 + 20 = 78 bytes. Per poll: 90 + 107 + 78 = 275 bytes; per second: 4 meters × 275 bytes ÷ 2 s = 550 bytes/s = 4,400 bit/s.

Combined: 107,520 + 4,400 = 111,920 bit/s, about 0.11 Mbit/s, which is 111,920 ÷ 100,000,000 ≈ 0.0011, about 0.11 % of the port. Compress the I/O to a 1 ms update time and the PROFINET figure multiplies by 100 to 10.75 Mbit/s, about 10.8 %: still comfortable on bandwidth, and at that speed it is switch priority, not wire time, that protects the cycle. Frames carrying 32 data bytes plus PROFINET headers sit a few bytes above the minimum frame size, so read all of this as a floor; the true load is a few percent higher and the conclusion does not move.

What does each Modbus TCP connection cost inside the CPU? #

One peer costs one TCP connection, one instance data block and one connection ID that no other connection may reuse, and its request handshake advances one program scan at a time however idle the network is. The client block, MB_CLIENT in the documented library, runs in the scan like any other block: you trigger a request, it stays busy across scans while the TCP exchange completes, and you read its DONE output and error status before reusing the request data. Polling pace therefore comes from scan time plus the partner's turnaround, not from network load.

Connection parameters travel in a connection description. When you configure the connection graphically in TIA Portal, the connection configuration for Open User Communication creates the connection description DB automatically, the mechanism the TSEND_C and TRCV_C family uses; the Modbus blocks take the same kind of parameters in their own instance. Give every instance its own connection ID: two instances pointed at one server with colliding resources stop each other's reads, exactly the failure why two MB_CLIENT instances stop Modbus TCP reads from one server works through.

Count before you build: the connections already in use, meaning HMI, programming access and other open user communication, plus one per Modbus peer, must fit the connection resources your CPU's data sheet lists. A handful of meters or analyzers on an S7-1500 that is not already near that limit fits; commit to the shared interface.

How do you configure the shared interface in order? #

Bring up PROFINET first and Modbus second: one IP address on the port, device names and update times for the I/O devices, then one library instance per Modbus peer, and no further coordination is needed between the two.

  1. Set the PN interface's IP address and subnet mask, with every I/O device and local Modbus peer inside one consistent subnet plan.
  2. Add the I/O devices to the hardware configuration from their GSD files and set each device's update time and watchdog time to the machine's needs.
  3. Assign the device names online before expecting cyclic data: the controller accepts a device only when the configured name matches, and a correct IP address alone attaches nothing.
  4. Confirm every device is assigned and exchanging data before touching Modbus; PROFINET diagnostics name any device that is missing or wrongly named.
  5. Add the Modbus TCP library, instantiate one block per peer with its own connection ID, and put the peer's IP address and the local InterfaceID in the connection parameters. The interface selection must name the PN interface: a wrong choice leaves TCP accepted with no DONE arriving, the behavior why an S7-1500 X2 Modbus server accepts TCP but no DONE arrives traces.
  6. Prove one read against the meter's own display, scaling included, before chaining the polling sequence.

One safety line to hold through all of it: a value that arrives over Modbus is standard communication only and can carry no safety function, so PROFIsafe traffic keeps the certified path the safety design gave it.

Which designs share the port and which need another path? #

Share the port whenever the Modbus peers speak Modbus TCP, on the local subnet or routed, and take another path only for Modbus RTU devices, which need a serial port or a gateway because RTU never runs on the Ethernet interface.

Case Decision What decides it
PLC polls Modbus TCP meters next to slow-cycled I/O Share the port Wire load is trivial; one connection per meter
SCADA writes the PLC as Modbus server Share the port One connection per SCADA client; the data area is yours to map
1 ms I/O update with Modbus bursts Share, behind a priority switch IEEE 802.1Q keeps VLAN priority 6 frames first
Modbus RTU instruments Serial module or gateway RTU never runs on the Ethernet interface
Modbus peer beyond a router Share the port Modbus TCP routes; RT I/O devices stay local

For the case you asked about, process industry with a slow PROFINET cycle and Modbus alongside, the decision is to run both on the one interface: the wire does not notice, the I/O keeps its priority, and the only budget you actually spend is one connection, one connection ID and one instance per Modbus peer. If RTU devices join later, serial and TCP Modbus can run side by side off the same PLC, as how a PLC runs two Modbus networks at the same time shows.

Questions asked

How fast can one Modbus TCP client instance poll its devices?

The handshake runs scan by scan: plan on about three scans per read, one to trigger, one while the block services the exchange, one to evaluate the DONE output or error status, plus the device's turnaround. With a 20 ms scan and a 50 ms response, one read takes 3 × 20 ms + 50 ms = 110 ms, so four devices polled in sequence finish in about 0.44 s and a 2 s cycle has wide margin.

Can two client instances share one connection ID?

No. Every connection on the CPU needs its own connection ID, its own instance data and its own endpoint; two instances pointed at one server with colliding IDs or working data stop each other's reads. Give each peer its own instance, and keep hand-assigned IDs out of the range the engineering software reserves for configured connections.

Does a Modbus write land in the PROFINET process image?

No. A Modbus server block exposes a data area in a data block, and a register write changes only that area; your program must move the value into the process image output on purpose. Scope the exposed area so a supervisory write cannot reach anything the machine treats as interlocked.

Do I need a managed switch between the Modbus peers and the I/O devices?

Not at the update time in the example. An unmanaged switch puts both frame types in one queue, which that load easily tolerates. Run a 1 ms update and you want a switch that honors IEEE 802.1Q priority, so the priority 6 cyclic frames leave ahead of queued Modbus traffic; without it, a Modbus burst adds its queueing delay to the I/O cycle.

Keep reading

  • How-to

    Can one S7 CPU PN port run Modbus TCP and S7 comms together

    Yes. A 414-5H's integrated PN interface runs a Modbus TCP server for the DCS and S7 communication for the operator station on the same port, because both are TCP-based services on one IP stack. What decides the project is the CPU's connection-resource total, the station's transport type, the loaded response delay against each timeout — and on an H pair, the fact that Modbus sessions break at switchover unless you use the redundant option on a CP 443-1 pair.

    Industrial networks

  • Comparison

    Choosing how a Siemens PLC talks to a Modicon M580

    An S7-1200 or S7-1500 and a Modicon M580 need no gateway: both speak Modbus TCP on their existing Ethernet ports, with the M580 as server and MB_CLIENT on the Siemens side or MB_SERVER polled by the M580's I/O scanner, and OPC UA is native to both. Add a PROFINET-to-Modbus TCP gateway only when a participant such as a PROFINET-only drive control unit cannot take a Modbus role, because the M580 has no PROFINET stack.

    Industrial networks

  • Explainer

    Why PROFINET PROFIBUS and Modbus are four separate protocols

    PROFINET, PROFIBUS, Modbus RTU and Modbus TCP are four separate combinations of protocol and transport: PROFINET and Modbus TCP ride Ethernet, PROFIBUS and Modbus RTU ride RS-485 serial. An S7-1200 serves each on a different interface — the onboard PROFINET port for Ethernet traffic, serial modules for Modbus RTU, a fieldbus module for PROFIBUS — so the partner's port decides the method, not one blended protocol.

    Industrial networks