Configuring OPC Communication in Siemens WinCC Client and Server

David Krause13 min read
OPC / OPC UASiemensTutorial / How-to
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 of OPC in Siemens WinCC

OPC (Open Platform Communications) is the interoperability standard for secure and reliable data exchange between industrial automation devices and applications, as defined by the OPC Foundation. In a Siemens WinCC SCADA project, OPC is the integration layer that lets the HMI read and write tag values from PLCs, third-party controllers, historians, MES, and other SCADA packages without custom drivers.

WinCC can take either role in an OPC topology:

  • OPC Client (OPC DA / OPC XML): WinCC consumes tags from an external OPC server through the OPC.chn channel driver and the OPC Item Manager.
  • OPC Server (OPC DA): A WinCC Runtime project exposes its internal tag database to remote OPC clients via WinCC's built-in OPC server component.

The WinCC OPC implementation is documented in the WinCC V7.0 Communications manual and its successors (V7.2, V7.3, V7.4, V7.5). The same procedures apply to all of these versions because the OPC channel architecture has remained stable since V6.x.

2. OPC Specifications Relevant to WinCC

Specification Purpose WinCC Support
OPC Data Access (DA) 2.05a / 3.0 Synchronous and asynchronous read/write of real-time tag values Client + Server (V7.x)
OPC XML-DA 1.01 SOAP/HTTP based DA access across networks and firewalls Client (via OPC XML channel)
OPC Alarms & Events (A&E) Event subscription and acknowledgement Available through WinCC Alarm Logging interfaces
OPC Historical Data Access (HDA) Insert/read of historical values Available via WinCC archive interfaces
OPC Unified Architecture (UA) Modern binary TCP-based successor to COM/DCOM OPC WinCC V7.4+ ships an OPC UA server (see WinCC V7.4 Release Notes)

Classic OPC DA is built on Microsoft COM/DCOM and therefore requires correct DCOM configuration on every machine that participates in the OPC traffic. OPC XML-DA and OPC UA remove that dependency by using TCP port 80 (XML) or TCP port 4840 (UA) instead of dynamic DCOM endpoints.

3. Prerequisites

Before configuring OPC in WinCC, verify the following:

  1. WinCC Installation: Install the WinCC OPC option during setup. This installs the OPC communication driver (OPC.chn) and the OPC Item Manager.
  2. Operating System: Windows 7 SP1 / Windows 10 / Windows Server 2008 R2 or later (Windows Server 2016/2019 for WinCC V7.4 SP1 and V7.5).
  3. User Rights: The Windows user running the WinCC Runtime must be a member of the local group SIMATIC HMI and OPC Users (or the equivalent configured during WinCC installation).
  4. Firewall Rules: Open TCP 135 (RPC Endpoint Mapper) plus the dynamic RPC port range, or open TCP 4840 for OPC UA. Add the executable OPCEnum.exe and WinCC OPC Server.exe to the firewall exception list.
  5. DCOM Configuration: Both client and server machines need matching DCOM authentication and impersonation levels. See section 7.
  6. Licensing: WinCC RT licensing covers the OPC channel usage; no extra license is needed for the OPC DA server function.
Two WinCC projects cannot run simultaneously on the same machine. The OPC server exposed by WinCC Runtime can only come from the active project. Use a VM (or two physical stations) if you need two WinCC projects talking OPC to each other.

4. Configuring WinCC as an OPC DA Client

The OPC channel driver is the OPC DA client interface inside WinCC. It allows the WinCC tag manager to bind to tags published by any OPC DA 2.05a or 3.0 compliant server, including those from Siemens (SIMATIC NET OPC Server, S7-1200/S7-1500 OPC UA), Rockwell (RSLinx Enterprise), Schneider (OFS), and third-party gateway products.

4.1 Add the OPC Channel Driver

  1. Open the WinCC Explorer and load your project.
  2. In the navigation tree, right-click Tag Management.
  3. Select Add New Driver from the context menu.
  4. From the driver list, select OPC.chn and confirm with Open.
  5. The driver appears as a new entry OPC under Tag Management.

4.2 Open the OPC Item Manager

  1. Expand the OPC driver icon. You will see the logical unit OPC Groups (OPCHN Unit #1).
  2. Right-click the unit and choose System Parameters.
  3. The dialog titled OPC Item Manager opens. This tool browses the address space of every OPC server registered on the local machine and (optionally) on remote machines.

4.3 Select the OPC Server

  1. In the OPC Item Manager, use the OPC Server Name dropdown. The list is populated by the Windows service OPCEnum which enumerates every COM-based OPC server installed on the machine and on machines the logged-in user has remote-launch rights to.
  2. If the target server is on a remote machine, type its name using the form \MachineName\ServerName (for example \\PLC-PC\Siemens.SimaticNet.OPCServer).
  3. Click Browse Server. The Filter Criteria window opens.

4.4 Configure the Browse Filter

The Filter Criteria dialog controls which tags are listed during the browse. Configure the following parameters:

Filter Field Recommended Setting
Access Path Leave blank to browse all paths, or specify a path string the server understands (e.g. S7:[S7-1500PN/DP]DB1)
Access Authorization Enable the checkbox only if you need to see tags the server marks with a write-only attribute; leave disabled for normal use
Data Type filter Restrict the list to specific types (BOOL, INT, REAL, STRING, etc.) to keep the list manageable
Item ID pattern Optional wildcard string to limit the browse to a subset of tags

Click Next > to read the address space from the OPC server. The browse can take several seconds if the server exposes tens of thousands of items.

4.5 Add Tags to WinCC

  1. In the item list, multi-select the tags you need (Shift-click for ranges, Ctrl-click for individual items).
  2. Click Add Items. The OPC Item Manager closes and the selected tags appear in the WinCC tag list under OPC Groups (OPCHN Unit #1).
  3. For each imported tag, double-click to open the tag properties and verify the Data Type, Length (for strings), and Update settings match the source tag.
  4. Save the project. The tags are now available to graphics, scripts, archives, and alarms just like any native WinCC tag.

4.6 Recommended Quality-of-Service Settings

Parameter Value Notes
Update rate (ms) 500-2000 Sub-500 ms is allowed but increases RPC load
Item deadband 0% Set per-item to reduce noise for analog values
OPC group behavior Active, in-process Required for synchronous read while the client is connected
Reconnect interval 10 s Configurable under OPC channel unit properties

5. Configuring WinCC as an OPC XML Client

OPC XML-DA uses HTTP/SOAP instead of COM/DCOM. It is the correct choice when the OPC server is reachable only through a firewall or over a WAN.

  1. Install the OPC XML gateway component. For SIMATIC NET, this is the OPC XML Server service; for third-party products, follow the vendor installation.
  2. Verify the gateway is reachable by opening http://<server>/OPCXMLDA/server.asmx in Internet Explorer. You should receive an XML service description.
  3. In WinCC Explorer, right-click Tag Management → Add New Driver.
  4. Select the OPCXML.chn driver instead of OPC.chn.
  5. Configure the connection parameters (HTTP URL, authentication user/password, polling interval) under the channel unit's Connection Properties.
  6. Add tags by browsing the XML address space through the OPC Item Manager exactly as with OPC DA.
OPC XML-DA traffic is unencrypted by default. Use HTTPS and basic/digest authentication, or terminate OPC XML behind a reverse proxy with TLS, before deploying across an untrusted network.

6. Configuring WinCC as an OPC DA Server

Once WinCC Runtime is started, the project automatically publishes its tag database as an OPC DA 3.0 server. Remote OPC clients can browse and read/write every tag declared inside the WinCC project.

6.1 Components Installed by WinCC

  • WinCC OPC Server.exe — exposes WinCC tags under the ProgID OPCServer.WinCC.
  • OPCEnum.exe — enumerates registered OPC servers on the machine.
  • OPCCNF.exe — legacy configuration utility for early WinCC versions; the OPC channel wizard replaces it in V7.x.

6.2 Verify the Server is Running

  1. Start WinCC Runtime.
  2. On the same machine, open an OPC test client such as the Siemens OPC Scout (bundled with SIMATIC NET) or any third-party DA browser.
  3. Confirm OPCServer.WinCC is listed. If not, check that the Windows service SIMATIC WinCC OPC Server is started.

6.3 Publish Tags for Remote Access

Every tag created inside the WinCC Tag Management is automatically exposed by the OPC server — there is no separate "publish" step. To control which tags are exposed externally, restrict write access via the WinCC user administration and configure the tag-level Authorization attribute under the tag properties.

7. DCOM Configuration for Classic OPC DA

DCOM is the single most common cause of "Cannot connect to OPC server" faults. Configure it on both the WinCC (server) and OPC client machines.

  1. Open Component Services (dcomcnfg.exe) as Administrator.
  2. Navigate to Component Services → Computers → My Computer.
  3. Right-click My Computer and open Properties:
    • Default Properties tab: enable Enable Distributed COM on this computer; set Default Authentication Level to Connect; set Default Impersonation Level to Identify (raise to Impersonate if required by your domain policy).
    • Default Protocols tab: ensure Connection-oriented TCP/IP is listed first.
  4. Under DCOM Config, locate OPCServer.WinCC. Right-click → Properties:
    • General tab: set Authentication Level to Default.
    • Location tab: enable Run application on the following computer and select The computer I want; enter the server name.
    • Security tab: add the WinCC runtime user to Launch and Activation Permissions, Access Permissions, and Configuration Permissions. For a quick check, you can grant Everyone full control, but lock this down before going into production.
    • Identity tab: select The interactive user when the WinCC service runs under a logged-in console session, or This user and provide a domain service account when the service runs under a non-interactive session.
  5. Open Windows Firewall with Advanced Security. Add inbound rules for %SystemRoot%\System32\opcenum.exe and the WinCC OPC server executable on TCP port 135 plus the dynamic RPC range (default 49152-65535 on Windows 7+).
  6. Restart the SIMATIC WinCC OPC Server service and the WinCC Runtime.

Microsoft's official DCOM configuration reference for distributed OPC is published at Microsoft DCOM documentation; the OPC Foundation publishes the canonical OPC Security Best Practices document at opcfoundation.org.

8. Using the OPC Item Manager in Detail

The OPC Item Manager is the bridge between the OPC server's address space and the WinCC Tag Manager. Beyond the basic browse-and-add workflow, it supports the following features:

  • Import of multiple tags: Multi-select items in the address-space list and click Add Items. WinCC creates one internal tag per selected item, using the Item ID as the tag name (rename inside WinCC if a different convention is required).
  • Filter by Access Path: Reduces network traffic during browse on servers with large tag databases (e.g. a SIMATIC S7 with thousands of DB symbols).
  • Type filter: Useful when only analog values are needed and you want to avoid BOOL clutter.
  • Quick test: Right-click an imported tag and select Properties. The OPC tab shows the current value, quality code, and timestamp, allowing live verification without starting a graphics screen.

9. Verification Procedure

After completing the configuration, run the following checks to confirm the OPC link is healthy:

  1. OPC Scout test: Open OPC Scout on the client machine, connect to OPCServer.WinCC, add a test tag, and force a write. Confirm the new value appears inside the WinCC project (visible in Tag Management runtime view or via a graphics I/O field).
  2. WinCC channel diagnostics: In WinCC Explorer, open Tools → Channel Diagnosis. Confirm the OPC unit reports OK and the connection state is Connected.
  3. Quality Code inspection: Each imported OPC tag carries an OPC quality code. 0xC0 (Good) is normal; 0x40 (Uncertain) or 0x00 (Bad) indicates a problem. Common mappings:
Quality Code (hex) Meaning Likely Cause
0xC0 Good Normal operation
0x40 Uncertain Sensor substituted value, or stale data from a slow poll
0x08 BadCommunicationError DCOM or network failure
0x01 BadConfigurationError Wrong item ID or datatype
0x00 Bad Server reports tag as non-existent
  1. Event log review: Open Windows Event Viewer → Applications and Services Logs and inspect any OPC-related entries. The WinCC OPC server writes connection and quality events here.
  2. Performance check: Use the WinCC performance tag @PRF_OPC_xxx tags (where xxx is the channel number) to monitor read/write rates and latency in real time.

10. Troubleshooting Matrix

Symptom Likely Root Cause Remediation
OPC server not listed in Item Manager dropdown OPCEnum service stopped, or firewall blocking RPC Start OPCEnum, allow opcenum.exe through the firewall
Item Manager browse returns empty list DCOM access permission on OPCServer.WinCC missing for the user Add the runtime user under DCOM access and launch permissions, restart the service
Tags show quality 0x08 (BadCommunicationError) DCOM identity mismatch, time skew, or RPC port blocked Set DCOM identity to This user, sync time via NTP, open TCP 135 + RPC port range
Write succeeds in OPC client but value not visible in WinCC Tag is configured read-only, or user lacks write authorization Open tag properties and uncheck Read only; review WinCC user rights
WinCC Runtime cannot start a second project on the same PC By-design single-instance limitation Use a VM or a separate physical machine for the second project
Browse of large S7 address space takes minutes Server returns the full address space without filtering Use Access Path filter (e.g. S7:[S7-1500PN/DP]) and Type filter
OPC XML client returns HTTP 401 Anonymous authentication disabled on the XML gateway Configure the OPC XML server for basic/digest authentication, supply credentials in the WinCC channel connection
OPC UA not visible in V7.x project WinCC version older than V7.4, or UA option not installed Upgrade to WinCC V7.4 SP1 or V7.5 and install the WinCC OPC UA Server option

11. Migrating Classic OPC DA to OPC UA

WinCC V7.4 and later expose an OPC UA server endpoint on TCP port 4840. Migrating from COM/DCOM OPC DA to OPC UA removes the DCOM attack surface and allows traffic over TLS 1.2/1.3. Recommended migration steps:

  1. Confirm the WinCC OPC UA Server option is installed (visible under Start → Siemens Automation → WinCC → Tools).
  2. Enable the endpoint and configure the security policy (e.g. Basic256Sha256, SignAndEncrypt) and authentication method (anonymous, username/password, certificate).
  3. Generate or import the server certificate into the Windows certificate store under Trusted People on the client machine.
  4. Update remote OPC clients to use the UA endpoint URL opc.tcp://<server>:4840.
  5. Decommission the DCOM configuration only after a full monitoring cycle confirms UA traffic is stable.

The OPC UA specification and compliance test tools are published by the OPC Foundation; an overview of industrial UA adoption is available at PTC's OPC technology page.

12. Field-Proven Tips

  • Always set a unique Update rate for each OPC group; do not leave it on the default 1 s when 5 s is sufficient — this dramatically reduces RPC traffic on large projects.
  • Avoid browsing and adding more than a few thousand tags in a single session — the OPC Item Manager GUI becomes sluggish. Use the WinCC Tag Export/Import CSV workflow for bulk additions.
  • If WinCC is acting as both client and server, dedicate separate Windows user accounts for the client and the server side. This isolates DCOM authentication and simplifies audit logging.
  • For cross-subnet deployments, prefer OPC UA over OPC XML — OPC XML adds SOAP overhead and limits payload size.
  • Document each OPC server's ProgID and the network port(s) it relies on inside the project Functional Design Specification. This avoids hours of troubleshooting when a tag stops updating after a network change.

Which WinCC versions support OPC DA as a client?

WinCC V6.0 SP3 and all V7.x releases (V7.0, V7.2, V7.3, V7.4, V7.4 SP1, V7.5) ship the OPC.chn channel driver. The same configuration steps described above apply to all of these versions.

Can two WinCC projects exchange OPC tags on the same PC?

No. WinCC Runtime allows only one active project per machine, so only one OPCServer.WinCC instance can run at a time. Use a virtual machine, a second physical station, or upgrade to OPC UA on WinCC V7.4+ if multi-project communication is required.

What is the default port for the WinCC OPC UA server?

TCP 4840. The URL is opc.tcp://<server>:4840. The endpoint can be moved to a custom port through the OPC UA Server configuration tool.

Why does the OPC Item Manager not list my remote OPC server?

The most common cause is that the OPCEnum service on the remote machine is stopped, or the Windows firewall is blocking RPC traffic on TCP 135 and the dynamic RPC range. Verify the service is running and that both opcenum.exe and the target OPC server executable are allowed through the firewall. DCOM launch permissions for the user account are the next most frequent cause.

How do I confirm an OPC tag is updating inside WinCC?

Open the Tag Management runtime view (Tag Management → right-click an OPC tag → Properties → OPC tab). The dialog shows the live value, the OPC quality code, and the timestamp of the last successful read. A quality code of 0xC0 (Good) and a timestamp within the configured update interval confirms healthy communication.

Back to blog