Resolving S7-1500 OPC UA Error 16#8601 in TIA Portal V16 (Project 109762770)
The Siemens application example 109762770_OPC_UA_PLCClient_16_PROJ_V1_1 ships a paired S7-1500 OPC UA Server and OPC UA Client configuration that demonstrates inter-PLC tag exchange over an OPC UA binary channel. When the project is downloaded unmodified and commissioned under TIA Portal V16 with PLCSIM Advanced, the OPC UA client block reports a transport-layer failure with the diagnostic signature:
- Status code: 16#8601
- Subfunction status: 16#803D_0000
This error terminates at the opcUaConnect instruction and prevents the client from establishing a session with the companion server PLC. The root cause is not in the protocol itself but in the firmware/runtime defaults, certificate handling, and endpoint URL embedded in the bundled project. The troubleshooting guide below consolidates the verified remediation paths and the architectural constraints imposed by the S7-1500 OPC UA stack.
Background: OPC UA on the SIMATIC S7-1500
OPC Unified Architecture (OPC UA) is the IEC 62541 cross-platform, service-oriented architecture that replaces the older OPC Classic (DA/HDA/AE) COM-based stack. It provides a single, secure, reliable transport for industrial data from sensor to cloud and is the recommended interoperability layer for S7-1500 controllers when communicating with third-party SCADA, MES, or cloud brokers. The OPC Foundation OPC UA landing page and the IEC 62541 specification reference describe the binary protocol, security profiles, and information modeling that the Siemens OPC UA server/client libraries implement.
For the S7-1500, Siemens provides two distinct OPC UA roles:
| Role | Mechanism | Activation | License |
|---|---|---|---|
| OPC UA Server (embedded) | Configured under PLC properties > OPC UA > Server | TIA Portal V14 SP1 or later | None on S7-1500 (firmware-feature based) |
| OPC UA Client (program blocks) | Library "LOPCUAC" (blocks opcUaConnect, opcUaRead, etc.) |
Manually instantiated in user program | None additional |
Problem Details: Error 16#8601 with SubfunctionStatus 16#803D_0000
When the SCL instruction opcUaConnect is forced to TRUE on the client PLC, the status outputs of the FB return:
status = 16#8601
subfunctionStatus = 16#803D_0000
According to the Siemens OPC UA client library documentation, the high word 16#86 indicates a connection-establishment error originating from the OPC UA client runtime. The subfunction status 16#803D_0000 corresponds to a transport-level or session-level rejection during the OpenSecureChannel / CreateSession handshake. Typical underlying causes include:
- Endpoint URL points to an IP address that is not reachable from the client PLC (wrong IP, wrong subnet, or wrong port).
- The server PLC has not yet published its endpoint (server still initializing, certificate not generated).
- The client certificate is missing, mismatched, or has been permanently associated with an endpoint (ClientID = 0 requirement on PLCSIM Advanced).
- Security policy mismatch (PLCSIM Advanced supports no security / None; the project example requires
None). - PLCSIM vs. PLCSIM Advanced: the project only operates against PLCSIM Advanced because PLCSIM does not provide the S7-1500 OPC UA server runtime.
Root Cause Analysis
Three independent defects exist in the V16 example project that converge on the 16#8601 status. Each is documented against the bundled data block and project settings.
Defect 1: Pre-populated Client Certificate in the V16 Project
The V16 archive contains a default OPC UA client certificate. Once this certificate is bound to the client configuration, the runtime cannot de-select it, and the trust chain with the server's trustedClients directory fails because the server's certificate store is empty. The V15.1 archive is delivered with an empty client certificate slot, which allows a fresh trust establishment on first run. The Siemens Application Example 109762770 download portal reflects this and offers separate V15.1 and V16 archives for that reason.
Defect 2: Hard-coded Endpoint URL in OpcUaClientInterface_Data
The instance DB OpcUaClientInterface_Data contains the connection parameter block Connection with the field ServerEndpointUrl. In the bundled project the start value is set to opc.tcp://10.11.22.113:4840, but the simulated server PLC is configured at 10.11.22.112. Because opcUaConnect consumes the literal string from the instance DB, the connect attempt is sent to the wrong IP and is rejected with a transport error.
Defect 3: PLCSIM Advanced Constraints
PLCSIM Advanced supports the S7-1500 OPC UA server runtime, but with two non-negotiable constraints:
- Security policies must be set to None in both the server and client configuration. PLCSIM Advanced does not implement the cryptographic stack.
- The ClientID on the client side must be set to
0(anonymous), or the client will attempt to authenticate with a stored application instance certificate that PLCSIM Advanced cannot validate.
The subnet mask of the virtual PLCSIM Advanced network adapter must match the subnet declared in the project's PG/PC interface and PLC IP settings, or the simulated Ethernet layer will silently drop the OPC UA TCP frames to port 4840.
Solution: Step-by-Step Remediation
Apply the following sequence. Steps 1 and 2 are mandatory; steps 3-5 are verification and hardening.
Step 1: Use the V15.1 Archive (Recommended Path of Least Resistance)
- Open the Siemens Support entry 109762770.
- Download the V15.1 project archive, not the V16 archive.
- Open the V15.1 archive in TIA Portal V15.1 (or upgrade it to V16 via Project > Upgrade).
- Compile both the server and client stations and download to two PLCSIM Advanced instances.
The V15.1 archive ships without a default client certificate, so the trust handshake completes on first connect.
Step 2: Correct the ServerEndpointUrl
If you must use the V16 archive, edit the data block before download:
- In the project tree, open
OpcUaClientInterface_Data(or the equivalent instance DB on the client station). - Navigate to
Connection.ServerEndpointUrl(string, WString). - Replace the start value with the actual IP of the server PLC, for example:
opc.tcp://10.11.22.112:4840. - Recompile and download both stations.
opcUaConnect cycle in the watch table; OPC UA clients commonly cache the URL from the initial call.
Step 3: Configure Security Policy to None for PLCSIM Advanced
- Select the server PLC, then Properties > OPC UA > Server > Security.
- Uncheck
Security policy Noneis the only allowed policy in PLCSIM Advanced, so uncheck allBasic128Rsa15,Basic256,Basic256Sha256entries. - Select None as the only enabled security policy and confirm No application authentication is allowed.
- Repeat on the client PLC under Properties > OPC UA > Client > Security.
Step 4: Set ClientID to 0 in the Instance DB
- Open the client instance DB.
- Set the
Connection.ClientId(or analogous token) to0to force anonymous authentication. - Ensure the local
opc.tcpstack is configured without a client certificate reference.
Step 5: Verify PLCSIM Advanced Network Settings
- Open PLCSIM Advanced and create two virtual instances. The first PLC must occupy the IP declared in the
ServerEndpointUrl. - Confirm that the virtual Ethernet adapter PLCSIM Advanced installs (typically a TAP or Npcap-based interface) has a subnet mask identical to the project, e.g.
255.255.255.0for a10.11.22.0/24network. - From the host, run
ping 10.11.22.112andtelnet 10.11.22.112 4840to confirm L3 and L4 reachability before debugging the PLC program.
Verification Procedure
After applying the remediation, validate the connection with the following checks:
-
Watch table on the client: Force
opcUaConnect= TRUE. Expectstatus = 16#0000andsubfunctionStatus = 16#0000_0000. The connect output should latch to TRUE. - Server diagnostics: Open the server PLC online > Diagnostics > OPC UA and confirm at least one active session in the session list.
-
Tag readback: Force
opcUaReadfor a known server tag (e.g. a tag inOPC_UA_Data_DB). The output buffer should populate within one cycle. - Third-party client test: Use an external OPC UA client (e.g. UA Expert) to subscribe to the server's namespace. If the third-party client can connect, the server is healthy and any remaining 16#8601 is on the client side.
Troubleshooting Matrix
| Symptom | Likely Cause | Remediation |
|---|---|---|
| Status 16#8601, SubfunctionStatus 16#803D_0000 in PLCSIM Advanced | Security policy mismatch (PLCSIM Advanced requires None) | Disable all security policies except None on both server and client |
| Status 16#8601 with correct IP | Pre-bundled client certificate rejected by empty server trust store | Switch to V15.1 project, or clear the client certificate and re-trust |
| Status 16#8601 after IP fix | ClientID non-zero forcing certificate auth | Set ClientID = 0 in the instance DB |
| Status 16#8602 (timeout) | PLCSIM Advanced subnet mismatch | Match virtual adapter subnet mask to project |
| Status 16#8601, real hardware instead of PLCSIM | Firewall on engineering host or PLC subnet | Open TCP 4840 between client and server, check Windows Firewall rules |
| Status 16#8601 on S7-1500 with firmware < V2.6 | OPC UA server runtime not enabled or out of date | Update CPU firmware to V2.6 or later via TIA Portal |
| Status 16#8601 with PLCSIM (not Advanced) | PLCSIM lacks OPC UA server support | Migrate simulation to PLCSIM Advanced 3.0 or later |
Configuration Parameters Reference
The following data block fields govern OPC UA client connectivity and must be reviewed whenever a 16#8601 is observed.
| Parameter | Location | Default in V16 Project | Required Value |
|---|---|---|---|
| Connection.ServerEndpointUrl | OpcUaClientInterface_Data.Connection | opc.tcp://10.11.22.113:4840 | opc.tcp://<server-IP>:4840 |
| Connection.ClientId | OpcUaClientInterface_Data.Connection | 1 (or non-zero) | 0 (PLCSIM Advanced) |
| Connection.SessionTimeout | OpcUaClientInterface_Data.Connection | 60000 ms | 60000-300000 ms |
| Connection.SecurityPolicy | OpcUaClientInterface_Data.Connection | None | None (PLCSIM Advanced) |
| Connection.SecurityMode | OpcUaClientInterface_Data.Connection | None | None (PLCSIM Advanced) |
| PLC Properties > OPC UA > Server > Port | Server station | 4840 | 4840 (or firewall-opened alternative) |
| PLC Properties > OPC UA > Server > Discovery URL | Server station | opc.tcp://<server-IP>:4840 | Matches ServerEndpointUrl |
Production Hardware Considerations
The constraints above apply to PLCSIM Advanced. Real S7-1500 CPUs lift the security restrictions and allow signed certificates, but introduce new ones:
- CPU firmware: V2.6 or later is required for the full security profile set; V2.9 or later is recommended for the latest OPC UA features.
- Global Discovery Server (GDS): For multi-server fleets, push certificates from a central GDS via the SIMATIC Automation Tool or the OPC UA GDS push mechanism.
- Firewall traversal: TCP 4840 must be open between client and server subnets. On segmented plant networks, configure NAT or a dedicated DMZ for OPC UA traffic.
- Namespace indexing: When you add or remove tags on the server, the namespace version increments. Clients should re-read the namespace rather than cache it across controller restarts.
Why V15.1 Works but V16 Fails (Project Internals)
The V15.1 archive was generated against a TIA Portal V15.1 toolchain that pre-dates changes to the OPC UA client certificate handling in V16. In V16, the OPC UA configuration UI began persisting a self-signed client certificate at project creation time as a convenience, which inadvertently hard-binds the client identity to a certificate that the server trust store has never seen. The V15.1 archive leaves this field empty so the first opcUaConnect generates a fresh certificate and the trust exchange completes. The Siemens Support team has not republished a V16 archive with the defect patched, so the official workaround is to use V15.1 or to manually re-issue the client certificate against the server trust list.
Diagnostic Logging on the Server
For deeper investigation beyond the 16#8601 status, enable the OPC UA server's diagnostic trace:
- Online > Diagnostics > OPC UA > Trace
- Set the trace level to Verbose and the output to File.
- Reproduce the failed
opcUaConnect. - Download the trace and search for
Bad_CommunicationErrororBad_SecurityChecksFailed.
A Bad_CommunicationError with no preceding OpenSecureChannel entry typically indicates a TCP-level failure (wrong IP, wrong port, blocked firewall). A Bad_SecurityChecksFailed after a successful OpenSecureChannel indicates a certificate or trust problem.
Frequently Asked Questions
What does OPC UA error 16#8601 with subfunctionStatus 16#803D_0000 mean on the S7-1500?
It is a connection-establishment failure reported by the OPC UA client library. The high word 16#86 indicates that opcUaConnect could not complete the OpenSecureChannel or CreateSession handshake. The subfunction 16#803D_0000 flags a transport or session-level rejection, typically caused by a wrong endpoint URL, a missing or untrusted client certificate, or a security policy mismatch (especially under PLCSIM Advanced).
Do I need PLCSIM or PLCSIM Advanced to run the 109762770 OPC UA example?
PLCSIM Advanced 3.0 or later is required. PLCSIM (the older single-instance simulator) does not provide the S7-1500 OPC UA server runtime. PLCSIM Advanced must be configured with the security policy set to None and the OPC UA client must use ClientID = 0.
Why does the V15.1 archive of application example 109762770 work while the V16 archive fails?
The V16 archive ships a pre-generated client certificate that the server's trust store has never seen, which causes the OPC UA handshake to fail. The V15.1 archive is delivered with an empty client certificate slot, allowing a clean trust establishment on first connect. The recommended fix is to use the V15.1 archive and upgrade it to V16 if needed.
How do I change the OPC UA endpoint URL in the bundled project?
Open the data block OpcUaClientInterface_Data on the client station, navigate to Connection.ServerEndpointUrl, and replace the start value with opc.tcp://<server-IP>:4840. Recompile and download the client station. Verify the new value in a watch table because OPC UA clients can cache the URL from the first connect call.
Can I use signed certificates and security policies with PLCSIM Advanced?
No. PLCSIM Advanced supports only the None security policy and anonymous (ClientID = 0) authentication. For signed certificates, transport encryption, and authenticated sessions, deploy to a physical S7-1500 CPU with firmware V2.6 or later.