IMDHMIControls LibraryShop main store

Troubleshooting

Why OPC DA works while the OPC UA connection fails

SCADA and data logging Published 8 min read By IMDHMI controls team

Short answer

A green OPC DA test proves nothing about OPC UA: the two interfaces share no port, listener, security or identity check. Walk the four UA gates in order — TCP socket on the endpoint port, secure channel, session activation with an accepted identity, browse — and the WinCC connection follows. With security off, the first suspects are the local firewall rule and the endpoint hostname.

On this page
  1. Why the passing DA test proves nothing
  2. The four gates an OPC UA connection passes
  3. Worked example: the same-PC WinCC V7.3 setup with DA green and UA red
  4. Check the listener and its port first
  5. Match the endpoint URL the server advertises
  6. Match the security policy and the user identity
  7. The ordered check from red to green
  8. What counts as fixed
  9. Questions asked

A green OPC DA test and a dead OPC UA connection on the same PC are not a paradox: DA and UA are separate interfaces with separate ports, security and identity checks, and the DA test never touches any of them. Treat the DA result as proof that the S7-1500 link and the server are alive, then walk the four UA gates in order — TCP socket on the endpoint port, secure channel, session activation with an accepted user identity, address-space access. In the same-PC setup with signing and encryption already off — WinCC Explorer V7.3 as client, KEPServerEX as server — the first suspects are the local firewall rule on the UA port and the endpoint hostname the server advertises. Test the socket, then the name, then the identity.

Why the passing DA test proves nothing #

OPC DA and OPC UA share a name and almost nothing on the wire. DA rides the Windows COM machinery; UA speaks its own opc.tcp protocol on its own port, with its own handshake, its own security negotiation and its own user check. A client connection entry of one kind never exercises the other, so the server test that passes for DA proves the upstream half works and stops there.

The path has two segments, and you have already closed the first: the link from the S7-1500 into the server, proven by the blinking test bit you can watch alternating in the server itself. Everything still unproven lives in the second segment, from the server's UA listener to the tag in WinCC runtime.

Reported result What it actually proves Where the fault can still sit
The blinking bit alternates in the server The S7-1500 channel and its addressing are live Every UA gate downstream of the listener
The OPC DA server test passes The DA interface works Nothing about the UA listener, endpoint or identity
UA fails with signing and encryption off Certificate matching is not the blocker Socket, advertised hostname, user identity
Both programs on one PC No network route between the two Local firewall rule and name resolution

DA collects failure modes of its own — the classic is why a remote OPC DA client fails to reach a LAN OPC server — but none of them is shared with the UA gates, so a DA pass clears none of them.

The four gates an OPC UA connection passes #

A UA connection succeeds only in sequence:

  1. Transport. The client opens TCP to the host and port in the endpoint URL. Blocked here, the client reports a socket error or a timeout and never reaches the server.
  2. Secure channel. Client and server open a secure channel. Even with the security policy at None this exchange still happens: None only switches off signing and encryption, it does not skip the channel.
  3. Session. The client creates and activates a session and presents a user identity. This check is separate from message security — with signing and encryption off, the server still decides whether your identity type is acceptable.
  4. Data access. Browse and read in the server's address space, where the test bit lives under its NodeId.

One trap sits across these gates: discovery and data access can use different addresses. The address you enter may serve discovery only; the server then advertises its working endpoints under its own hostname, and the client must resolve that name before the real connection opens. If it is unclear which side dials, the page on which direction works between an HMI OPC UA server and its client settles it: here WinCC is the UA client and KEPServerEX the server, so WinCC dials and the server must be listening.

Worked example: the same-PC WinCC V7.3 setup with DA green and UA red #

Inputs, each as reported for the installation:

  • Client and server: WinCC Explorer V7.3 and KEPServerEX on one PC.
  • Upstream link: S7-1500 into the server, working — the blinking bit alternates in the server.
  • OPC DA test from the client: passes.
  • OPC UA in the server: enabled.
  • Message security: signing and encryption disabled.

Rule: a UA connection must pass four gates in order, and evidence from any other path — the PLC link, the DA test — counts toward none of them.

Arithmetic:

  • Gates exercised by the passing DA test: 0 of 4.
  • Gates cleared by the working PLC link: 0 — that link ends at the server, upstream of the listener.
  • Gates removed by disabling signing and encryption: 0 — the secure channel still opens and the session still demands an accepted identity; only certificate matching and message protection drop out.
  • Causes removed by one PC: 1, the route between machines — the local firewall rule on the UA port and resolution of the advertised hostname stay in play.

Result: 4 gates stand and none is validated by the evidence already in hand, which leaves 3 leading suspects in gate order — the socket on the endpoint port, the advertised hostname, the user identity.

Decision: work in gate order and let each result convict one suspect. A refused TCP connect convicts the listener or firewall; discovery that succeeds while the connection fails convicts the advertised hostname; a channel that opens and then rejects convicts the identity. The DA pass and the disabled security cannot clear any of the four, so re-running the DA test never shortens this list.

Check the listener and its port first #

Enabling OPC UA in the server project is a checkbox, not a socket. The decisive check is whether the running server actually opened the listener:

  • Read the complete endpoint URL — host, port and any path — from the server's UA configuration. Never derive it from the PLC address or from the DA server name.
  • Check the server's own event log: the UA service must start without an endpoint or socket-binding error.
  • Match the socket: the operating system's list of listening ports must show the server process holding the UA port, on an interface the endpoint hostname reaches.
  • If the port refuses connections, add a firewall rule scoped to the server executable and that port — inbound, from the client's address — and retest. Do not test by switching the firewall off; it hides the cause and leaves every other service on the PC exposed.

Decision: if the socket is not listening or the rule blocks it, no client setting can fix the connection, so settle this gate before touching WinCC.

Match the endpoint URL the server advertises #

On one PC the route is short but name resolution is not automatic. The client may reach the server, request its endpoints, and receive back endpoint URLs carrying the server's own hostname — a name the client must then resolve before the connection opens. Discovery succeeds, connection fails; that split is the signature of this fault.

Check both directions: the host you typed must resolve on the client PC, and the host inside the endpoint the server returned must resolve too. Keep the machine's real name usable rather than swapping to a bare IP, because a certificate issued to the hostname rejects the address form.

Decision: make both names — the one entered and the one advertised — resolve before changing anything else.

Match the security policy and the user identity #

The WinCC connection must be a fresh entry on the OPC UA interface, separate from the working DA one, and its parameters must name a security policy and message mode the server actually offers. Copy the advertised list from the server's UA configuration and pick from it; a policy the server does not offer fails the channel before identity is even reached.

Identity is the half people skip. With signing and encryption off, session activation still demands an identity the server accepts: in the KEPServerEX project Properties, OPC UA enabled plus the anonymous-login option set to Yes is what lets an anonymous client through; otherwise set up a UA user account and enter those credentials in WinCC. When the selected policy does exchange certificates, both sides must hold and trust the other's certificate — the handshake that why OPC UA certificate trust fails between an S7-1200 and a panel walks through on a PLC-to-panel pair.

One safety note: None is a bench diagnostic. Put a signing policy and a real user account back before this system runs the plant.

The ordered check from red to green #

  1. Watch the blinking bit in the server: value alternating, quality good. If it is not, stop — the S7-1500 channel is the fault.
  2. Copy the complete opc.tcp endpoint URL from the server's UA configuration.
  3. On the client PC, confirm the host in that URL resolves and the port accepts a TCP connection.
  4. If the connection is refused, add a firewall rule for the server executable on that port and retest.
  5. Browse the endpoint and check the host inside the returned endpoint URL also resolves.
  6. Create the WinCC connection on its OPC UA interface, with a policy and mode from the server's advertised list and an identity the server accepts — anonymous only if the server's anonymous option is on.
  7. Add one test tag on the bit's NodeId, matched to the server's data type, and leave production tags out until it updates.
  8. Make one connection attempt and compare the server's event log timestamps against the client's attempt, so a blocked or dropped connection names itself.
  9. Accept the fix only when the bit alternates in WinCC runtime with good quality.

What counts as fixed #

Not a successful connection dialog. The acceptance criterion is a live WinCC value that follows the PLC test bit with valid quality, watched over a full blink cycle or two. A value that arrives with bad quality clears the UA path — channel, session and browse all worked — and points at the upstream device configuration instead.

One architectural decision is worth making while you are in there: if WinCC only needs a handful of PLC values, the S7-1500 can serve OPC UA itself — when an S7-1500 needs no SIMATIC PC Station for OPC UA covers that path — and taking the middle server out of the chain removes this whole class of fault with it.

Questions asked

What port does the OPC UA server listen on?

The port is the number after the colon in the full endpoint URL, and it is read, not remembered: open the UA configuration and take host, port and path from the URL the server publishes. No default is worth assuming across servers or versions, so test a TCP connection to exactly that port before blaming security or certificates.

Should the client use localhost, the PC name, or the IP address?

Use the PC's real name on both ends. Enter it as the address you browse, and expect the endpoint the server returns to carry that same name: localhost fails once the returned endpoint or a certificate binds to the machine name, and a bare IP fails any policy that checks certificate names. Keep the machine name resolvable and use it consistently across the UA connection.

Can OPC DA and OPC UA run side by side on the same server?

Yes, and independently: DA and UA are separate interfaces with their own listeners, ports, security settings and client connection entries. Enabling one never configures the other, and editing the DA entry does not touch the UA channel. Treat a fault on one side as invisible to the other and fix them separately.

Do I need certificates if signing and encryption are switched off?

None of them. With the security policy at None, no application certificates are checked, so a certificate mismatch cannot be the fault you are chasing. Certificates enter only when the connection uses a signing policy; from that point, both sides must hold and trust the other's certificate before the secure channel opens.

Keep reading

  • Troubleshooting

    Why OPC UA writes fail while reads stay good

    Good reads prove only the read path. A write rejected as 0x80004005 is a generic failure, not a permission verdict: read the node's AccessLevel and UserAccessLevel under the session's real identity, check the write bit, then split bridge from source with a direct OPC UA write.

    SCADA and data logging

  • Explainer

    Why a C# OPC DA client needs its own RSLinx Classic server

    The OPC DA endpoint your C# client needs comes from a licensed RSLinx Classic installation with a configured communication driver and a named DDE/OPC topic — the plant's built-in HMI link provides neither. Install Classic on the computer that runs your client, configure the driver and topic, prove the topic with a generic OPC DA test client, then connect. If you only need tag values, libplctag reads EtherNet/IP tags from C# without RSLinx.

    SCADA and data logging

  • How-to

    Connecting a CODESYS HMI on Windows to an S7-1500 PLC

    Yes, it works. Use OPC UA with the S7-1500 as server and the CODESYS HMI as client when the PC only supervises; use a CODESYS Control Win runtime with target visualization over a PROFINET controller/device link when the PC must also run logic. The PROFINET path adds one single-device license on top of the runtime; the OPC UA path adds none.

    SCADA and data logging

Why Citect OPC DA fails in Runtime Manager service mode