Siemens WinCC Modbus TCP/IP Slave to Remote PC Setup

David Krause15 min read
SiemensTechnical ReferenceWinCC
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

1. Overview

Boiler HMI stations built on Siemens WinCC are commonly deployed as redundant Operator Station (OS) Servers that aggregate process tags from PLCs via S7/MPI/Profibus/Ethernet. The next integration layer is often a centralised control room PC — or a third-party supervisory package — that polls each boiler station using Modbus TCP/IP (port 502). The technical question is: can WinCC expose its internal tag database as Modbus holding/input registers so that a remote PC acting as a Modbus master can read boiler data without modifying the SCADA application on the OS servers?

This reference covers three production-grade paths:

  1. WinCC acting natively as a Modbus TCP/IP slave (WinCC V7.5 SP1+ with the Modbus/TCP Slave option, or WinCC Unified with the standard Modbus TCP/IP driver).
  2. WinCC publishing tags to a Modbus TCP gateway (e.g. SIMATIC Modbus/TCP PN Coupler, ET 200SP Modbus coupler, HMS Anybus, Phoenix Contact, Red Lion, Moxa) which then exposes the registers to the remote master.
  3. WinCC publishing tags via OPC DA or OPC UA using the WinCC Connectivity Pack, with the remote PC consuming them through an OPC bridge that re-publishes as Modbus TCP.

The 150–200 tag payload referenced in the original requirement fits comfortably inside a single Modbus transaction block and is well within the bandwidth of Modbus TCP on a normal plant LAN or routed VPN/3G link.

2. Architecture and Data Flow

There are two distinct endpoint roles in this integration:

  • Boiler OS server side (WinCC) — exposes data. It must speak Modbus TCP in server (slave) mode, listening on TCP/502 and responding to read function codes 03 (Read Holding Registers), 04 (Read Input Registers), 01 (Read Coils), 02 (Read Discrete Inputs), and write function codes 05, 06, 15, 16 if write-back is required.
  • Remote control PC side (third-party SCADA / custom master) — initiates connections, reads holding/input registers, and optionally writes coils/registers for commands.
Important polarity: WinCC's stock Modbus TCP channel is a client (master) — it polls PLCs. To make WinCC answer requests from a third-party master you must enable a server/slave capability. Treating the OS server as the Modbus slave and the remote PC as the Modbus master is the only correct polarity for the use case described in the field report.
PLC (S7-1500) Profibus / Profinet Field I/O WinCC OS Server Redundant pair Modbus TCP slave Tag DB ~ 200 tags TCP/502 listener Remote PC 3rd-party SCADA Modbus TCP master LAN / VPN / 3G (boiler telemetry WAN) Function codes used: FC 03 Read Holding Registers (4x) — process values, setpoints, alarms (16-bit) | FC 04 Read Input Registers (3x) — read-only measurements | FC 16 Write Multiple Registers — commands Default port: 502/TCP | Unit ID: 255 (or per-device) | Encoding: Big-Endian (Modbus standard) for Siemens V7; configurable in Unified.

3. WinCC Modbus TCP Capability Matrix

WinCC Edition Modbus TCP role supported natively Required add-on / license Notes
WinCC V7.0 – V7.4 Client/Master only — Standard Modbus TCP channel can poll, cannot be polled.
WinCC V7.4 SP1 – V7.5 SP2 Client + Server (slave) "Modbus/TCP Slave" option (SS!MODBUS_TCP_SLAVE) — separate license dongle/authorization on the OS server Server provides Holding/Input registers and Coils, mapped to WinCC tags.
WinCC V8.0 / V8.1 Client + Server (slave) "Modbus/TCP Slave" option packaged with the runtime license in some bundles; verify per quote Same behaviour as 7.5.
WinCC Unified (V16+) Client + Server (slave) via standard driver No separate add-on; comes with the Modbus TCP/IP RT driver Configured in TIA Portal under the HMI device — see WinCC Unified — Configuring the protocol parameters (Standard Modbus TCP/IP).
WinCC Professional (TIA) RT Client (master) only out of the box None for client; server mode requires Unified-class runtime Often combined with a third-party gateway if server mode is required.
Verify the slave capability against the actual installed WinCC version on the boiler OS server. The Modbus/TCP Slave option is licensed per OS server (or per redundant pair in some packages). Without the authorization, the channel will not be selectable in WinCC Explorer / TIA Portal.

4. Option A — WinCC as Modbus TCP/IP Slave

4.1 WinCC V7.x: enabling the Slave channel

  1. Open WinCC Explorer on the OS server.
  2. Right-click Tag Management → Add new driver → select "Modbus TCP/IP Slave". (If absent, the license is not installed.)
  3. Right-click the new driver → New Connection.
  4. Configure the connection:
    • IP address / host name of the remote PC (master) — restrict to known master IPs in firewall.
    • Port: default 502 for Modbus TCP. Change only if a NAT or tunnel requires it.
    • Station address (Unit ID): typical value 255 (Modbus TCP default) or a value matching the master device profile.
    • Byte order: WinCC V7 implements Modbus standard big-endian. Confirm against the master's expectation; mismatched word/byte order is the single most common cause of "garbage" values.
  5. Define the tag mapping. Each WinCC tag is exposed as a Modbus address. Holding Register area starts at offset 0 unless your mapping profile specifies otherwise.
    • Word (16-bit) WinCC tags → 4x Holding Registers, e.g. 400001 = first tag.
    • 32-bit float values → occupy two consecutive registers, e.g. 400001–400002. Document register pairing explicitly in the master side.
    • Boolean tags → 0x Coils, e.g. 000001.
  6. Save, compile the OS, restart the WinCC Runtime.

4.2 WinCC Unified (TIA Portal V16+)

The Unified runtime includes a Standard Modbus TCP/IP driver that can be configured as a server. In the TIA Portal project tree:

  1. Open the Unified HMI device → Connections.
  2. Create a new Modbus TCP/IP connection.
  3. Set:
    • Mode: Server (this is the role that answers the master).
    • Port: 502 unless firewall/NAT requires otherwise.
    • Connection type: TCP/IP.
    • Activate connection: checked.
  4. Map the HMI tags to Modbus addresses via the Modbus address mapping editor. The exact editor location and field labels are described in Siemens TIA Portal documentation — Configuring the protocol parameters (Standard Modbus TCP/IP).

4.3 Example tag map (boiler station, 192 tags)

WinCC tag Data type Modbus address FC Notes
Boiler1.SteamPressure REAL (float32) 400001–400002 03 0.1 bar per count, scale on master
Boiler1.SteamTemperature REAL (float32) 400003–400004 03 0.1 °C per count
Boiler1.FiringRate INT (16-bit) 400005 03 0–100 %
Boiler1.FuelFlow REAL (float32) 400006–400007 03 m³/h × 10
Boiler1.StatusWord WORD 400008 03 / 16 Bit-packed alarms
Boiler1.BurnerOn BOOL 000001 01 Discrete
Boiler1.SetpointSteam REAL (float32) 400101–400102 03 / 16 Writeable setpoint

This layout gives the remote master a deterministic 200-register map. Reserve 400000–400050 for status / handshake, 400050–401000 for measured values, 401000–402000 for commands / setpoints.

5. Option B — Modbus TCP Gateway (SIMATIC, ET 200SP, HMS, Red Lion)

If the WinCC OS server cannot be re-licensed for the Modbus/TCP Slave option, insert a Modbus TCP gateway in the path. The gateway polls (or is polled by) WinCC via S7 / OPC and exposes the data as Modbus TCP registers. This is the most common production pattern when WinCC is treated as authoritative and Modbus is an interface for a third-party system.

5.1 Siemens SIMATIC ET 200SP Modbus TCP coupler

  • Order number 6ES7138-6DF01-0AB0 (Modbus TCP coupler for ET 200SP, head module).
  • Function: server listens on TCP/502, returns process image to master.
  • On the WinCC side, the S7 connection to the ET 200SP station provides the data; on the Modbus side the coupler exposes a fixed register image.

5.2 HMS Anybus X-gateway / Communicator

HMS Networks publishes explicit integration notes for Siemens WinCC as the SCADA endpoint of an Anybus gateway. Refer to HMS Networks — Communicating to a Siemens WINCC SCADA via Modbus TCP/IP for the canonical reference wiring diagram. The typical pattern is:

  • Anybus serial/Profinet/Ethernet/IP scanner side reads from WinCC's data source (or from the underlying S7 PLC).
  • Anybus Modbus TCP server side publishes holding/input registers on TCP/502.

5.3 Other commonly used gateways

Vendor / model Typical use Modbus TCP port Max registers
Phoenix Contact FL MGUARD / EPC Inline protocol conversion + firewall 502 8 192
Red Lion CR3000 / DA70A High-density protocol conversion 502 8 192+
Moxa MGate MB3170 / MB3270 Modbus TCP ↔ Modbus RTU/ASCII bridging 502 8 192
Woodhead / Molex SST ES2C Modbus TCP ↔ Modbus RTU/ASCII 502 4 096
A gateway adds latency, a single point of failure, and a configuration surface. For new deployments where Modbus is a hard requirement, prefer enabling the Modbus/TCP Slave option directly on the WinCC OS server. Reserve the gateway path for retrofit or where WinCC is the master and a third-party boiler is the slave.

6. Option C — OPC DA / OPC UA via WinCC Connectivity Pack

When the Modbus/TCP Slave option is not available and a gateway is undesirable, the WinCC Connectivity Pack exposes the tag database through OPC DA (legacy, DCOM) and OPC UA (modern, encrypted). The remote PC can then consume these tags through any OPC client; if the remote application is a Modbus-only SCADA, an OPC-to-Modbus bridge (e.g. KEPware, MatrikonOPC Modbus Server, Softing dataFEED) is added at the remote side to re-publish as Modbus.

  • OPC DA: WinCC Connectivity Pack exposes the tag DB on port 135 (RPC) plus dynamic DCOM ports; legacy but well supported. See Siemens support entry Siemens Entry ID 22892718 — OPC communication with WinCC for the canonical setup notes.
  • OPC UA: WinCC Unified exposes OPC UA server on default port 4840. Recommended for greenfield and any deployment crossing security boundaries.

This option is the most flexible in terms of tag volume and security, but it requires both an OPC client on the remote PC and (for Modbus-only masters) a bridging application on the remote side.

7. Network and Firewall Requirements

Modbus TCP is a plaintext, unauthenticated protocol designed for trusted plant networks. Treat it accordingly.

Requirement Value / note
TCP port 502 (IANA registered for Modbus)
Allowed source IPs Restrict to the remote control PC's static IP (and the redundant master's IP, if applicable) on the OS server's Windows Firewall
Bind interface Bind the WinCC Modbus listener to the plant network NIC only — never the corporate / WAN / 3G NIC
IP addressing Static / DHCP reservation on both sides; never rely on dynamic addressing
VLAN Place boiler OS servers and the remote PC on the same ICS VLAN; no direct internet routing
3G / cellular path Use a router with IPsec/OpenVPN tunnel to the central SCADA; do not expose TCP/502 directly to a public APN
Connection limit Default Modbus TCP allows one master per slave; multiple masters require a gateway or Modbus router
Polling interval ≥ 1 000 ms recommended for 200 tags; faster polling wastes bandwidth on cellular links
The source notes that the original customer considered 3G. Modbus TCP over 3G without a VPN is not acceptable: TCP/502 has no authentication and the central PC will be exposed. Always terminate the cellular link at a router that provides an IPsec/OpenVPN tunnel back to the central SCADA's Modbus master.

8. Redundancy Considerations

The boiler OS is described as a redundant server pair. Two viable redundancy patterns exist for the Modbus interface:

  1. Active/active with two TCP listeners — each OS server runs the Modbus slave on TCP/502; the remote master is configured with two slave IP addresses and fails over if a session drops. This works only if the OS redundancy synchronises tag values between the pair (standard WinCC redundant option).
  2. Active/passive via virtual IP (VIP) — the cluster's VIP (e.g. a Windows Failover Cluster role or a VRRP-capable router) holds TCP/502; the remote master connects to a single IP. Cleaner from the master's perspective.

State which model is in use before specifying the Modbus wiring. Polling two independent slave IPs without VIP fails the OPC/Modbus consistency requirement the moment the active server changes.

9. Verification and Diagnostics

9.1 Connectivity test (no WinCC tool required)

  1. From the remote PC, open a command prompt and run telnet <WinCC_OS_IP> 502. A blank screen (the connection stays open) means TCP/502 is reachable. A "connection refused" means either the listener is not running or a firewall is blocking.
  2. Run a Modbus poll test using an open-source tool (e.g. modbus-cli, libmodbus examples, QModMaster) against the slave IP, FC 03, address 0, quantity 10. Expected response: 20 bytes (10 registers × 2 bytes) preceded by MBAP header (transaction ID, protocol ID 0, length, unit ID).

9.2 WinCC-side diagnostics

  • Open the WinCC Channel Diagnosis applet (WinCC V7) or Trace Viewer (Unified). Filter on the Modbus channel. Look for connection-state events and request/response byte counts.
  • Watch the OS server's Windows Firewall with Advanced Security log for dropped packets to TCP/502.
  • Use netstat -an | findstr 502 on the OS server to confirm a listening socket on 0.0.0.0:502 (or the specific NIC address).

9.3 Tag-level verification

  1. Force a known value into a WinCC tag in the OS server (e.g. via WinCC internal variable or a test script).
  2. Read the corresponding Modbus register from the remote master and confirm the value matches, including byte order.
  3. Reverse the test: write a value from the remote master (FC 06 / 16) to a dedicated test register mapped to a WinCC internal tag, and confirm the WinCC tag reflects the write.

10. Troubleshooting Matrix

Symptom Likely root cause Action
Master times out, no response WinCC Modbus slave not started, or firewall blocks TCP/502 Verify WinCC runtime is running, slave channel active. telnet <IP> 502. Check Windows Firewall inbound rule for TCP/502.
Connection establishes but values are wrong (e.g. 256× or swapped words) Byte/word order mismatch between WinCC and master Confirm both sides use big-endian (Modbus standard) for V7. In Unified, verify the connection's Word swap/Byte swap settings.
Floating-point values appear as garbage Master treats 32-bit float as two 16-bit registers in wrong order, or interprets the data type as INT Map each float to two consecutive registers; document in the master's address table; verify with FC 03 quantity 2 and decode the bytes as IEEE-754 big-endian.
"Illegal data address" exception (0x02) Master requests an address outside the configured mapping Re-check the address map; ensure the highest polled address ≤ the last mapped WinCC tag.
"Illegal function" exception (0x01) Master uses FC not supported by WinCC Modbus slave Limit master to FC 01, 02, 03, 04, 05, 06, 15, 16 unless the channel documentation states otherwise.
Modbus works locally but not over 3G/VPN MTU fragmentation, NAT port forwarding wrong, or no IPsec Run pathping and tracert. Reduce master MTU. Verify the VPN tunnel negotiates correctly and forwards TCP/502.
Values freeze after failover Redundant OS pair not synchronised; master connected to passive node Reconnect master to the active node's IP/VIP; confirm WinCC redundancy is licensed and Synchronisation is enabled in Redundancy Editor.
Modbus listener present on corporate NIC, not plant NIC Channel bound to all interfaces (0.0.0.0) In the Modbus connection settings, bind explicitly to the plant NIC's IP. Restrict with Windows Firewall rule on source IP.

11. Decision Path: Which Option to Choose

  • Pick Option A (native WinCC Modbus slave) if the WinCC version is V7.4 SP1+ or Unified, and the Modbus/TCP Slave option can be licensed. This is the cleanest path: no extra hardware, no extra software on the remote side, no double-mapping.
  • Pick Option B (gateway) if WinCC is older, the slave option is not licensed, or there are multiple masters that need to read the same boiler data simultaneously without sharing a TCP session.
  • Pick Option C (OPC + remote bridge) if the remote PC already runs an OPC-capable SCADA, or if cybersecurity policy prohibits opening TCP/502 across a WAN/3G link. OPC UA (port 4840, encrypted) is the preferred transport.

12. Security and Operational Notes

  • Modbus TCP carries no authentication and no encryption. It is acceptable on a sealed ICS VLAN; it is not acceptable across a routed or public boundary without a VPN.
  • Disable all unused Modbus function codes on the master if the SCADA supports it (e.g. allow only FC 03 / 04 from the field).
  • Document the complete register map in a single engineering document; make it a controlled revision (e.g. Engineering_Boiler_Modbus_Map_RevN.xlsx) signed by both boiler integrator and central SCADA integrator.
  • Add the boiler station to the central SCADA's asset inventory with IP, port, Unit ID, last-seen timestamp, and alarm on comms loss.
  • Include a Modbus comm-loss alarm in the boiler HMI as well, so the boiler operator is notified if the central system is offline for more than, e.g., 60 s.

Does Siemens WinCC support Modbus TCP/IP communication between two PCs?

Yes, but the stock Modbus TCP channel in WinCC V7 is a client/master only. To make WinCC answer a third-party Modbus master, you need the Modbus/TCP Slave option (WinCC V7.4 SP1 and later) or use the standard Modbus TCP/IP driver in WinCC Unified (TIA Portal V16+), where the connection is configured in server mode on TCP/502.

What port does Modbus TCP use and can it be changed?

The IANA-registered port is 502/TCP. WinCC's Modbus slave listens on 502 by default. The port can be remapped in the connection properties if a NAT, tunnel, or firewall rule requires it, but the master must match.

Can a Modbus TCP master read 200 tags from a WinCC OS server in real time?

Yes. 200 tags, polled at ≥ 1 s with FC 03 over LAN, fits in roughly 4–8 KB/s of payload and is well within the bandwidth of Modbus TCP. Over 3G or cellular, use a ≥ 2 s poll interval and an IPsec tunnel; do not expose TCP/502 directly to the public network.

Do I need the WinCC Connectivity Pack if I use the Modbus/TCP Slave option?

No. The Modbus/TCP Slave option is independent of OPC. The WinCC Connectivity Pack is only required if you intend to expose data via OPC DA / OPC UA, e.g. when the remote application is an OPC client or when Modbus is not permitted on the network.

Which is faster to deploy — Modbus/TCP slave on WinCC or a gateway such as an HMS Anybus?

The native Modbus/TCP slave is faster: it requires only a license and a tag map. A gateway such as the HMS Anybus adds a hardware box, a configuration tool, and a separate power/network path; the integration is documented in HMS Networks' WinCC integration note. Choose the gateway only when the slave option is unavailable, when multiple masters must read the same data, or when the master speaks a protocol WinCC does not support natively.

Back to blog