SIMIT Simulation OPC UA Coupling to Controller: Resolving BadConfigurationError and Application Certificate Faults

SIMIT Simulation OPC UA Coupling to Controller: Resolving BadConfigurationError and Application Certificate Faults

In Siemens SIMIT Simulation Platform (V9.1), encountering the error 'OPC UA Server opc.tcp://...:4840 is not reachable ([BadConfigurationError] Could not load the application certificate)' when establishing an OPC UA coupling to a controller occurs when SIMIT lacks read permissions to its Public Key Infrastructure (PKI) certificate directory, or when mutual certificate trust has not been established. OPC UA enforces cryptographic mutual authentication via X.509 certificates. To resolve this, grant full NTFS Read permissions on the SIMIT certificate folder (C:\ProgramData\Siemens\SIMIT\PKI\), ensure SIMIT's application certificate exists, and import SIMIT's certificate into the controller's trusted certificates store (and vice versa).

Table of Contents

OPC UA Security Architecture in SIMIT Simulation Platform

The SIMIT Simulation Platform is widely deployed in SIMATIC PCS 7 and TIA Portal projects to execute virtual commissioning, operator training (OTS), and hardware-in-the-loop (HIL) plant simulation. SIMIT interfaces with automation controllers (S7-1500, CPU 410-5H via CP 443-1, or virtual controllers) using diverse coupling mechanisms, including native S7 memory couplings, PLCSIM Advanced, and OPC UA Couplings.

Unlike legacy OPC DA (which relied on Microsoft DCOM), the modern OPC Unified Architecture (OPC UA) incorporates mandatory cryptographic security based on X.509 digital certificates. In an OPC UA session, both the client (SIMIT) and the server (PLC / WinCC) must possess valid application instance certificates, authenticate each other mutually, and establish secure encrypted communication endpoints.

Anatomy of BadConfigurationError: Could Not Load Application Certificate

When an engineer configures an OPC UA Coupling in SIMIT pointing to a server endpoint URL (opc.tcp://192.168.1.10:4840), SIMIT attempts to initialize its internal OPC UA client stack. A common blocker in SIMIT V9.1 is the immediate abort dialog:

OPC UA Server opc.tcp://...:4840 is not reachable ([BadConfigurationError] Could not load the application certificate)

The error code [BadConfigurationError] indicates that the failure occurred locally within SIMIT, before a single network packet was successfully transmitted to the server. SIMIT's cryptographic subsystem attempted to read its own local client certificate and private key file (*.der and *.pfx) from the hard drive, but the operation was rejected by the Windows operating system.

Windows File System and PKI Certificate Store Permissions

SIMIT manages its digital identity files inside a standardized Public Key Infrastructure (PKI) directory structure located under:

C:\ProgramData\Siemens\SIMIT\PKI\Own\certs\ (Public Certificate)
C:\ProgramData\Siemens\SIMIT\PKI\Own\private\ (Private Key)

Two common permission failures trigger [BadConfigurationError]:

  1. Restricted NTFS Access: The ProgramData directory is protected by Windows UAC. If the Windows user account running SIMIT does not possess explicit Read & Execute permissions on the PKI\Own\private folder, the SIMIT process cannot read its own private key.
  2. Missing Certificate Generation: If SIMIT was installed without administrative privileges or launched in Demo Mode without administrative elevation, SIMIT may have failed to generate its initial self-signed application certificate during setup.

Mutual Certificate Exchange: Trusted vs Rejected Certificates

Once local permissions are granted and SIMIT can read its application certificate, establishing the live connection requires completing the mutual trust handshake:

  • Server Trusting SIMIT: When SIMIT connects to the controller for the first time, the controller's OPC UA server rejects the connection and places SIMIT's public certificate into its Rejected Certificates folder. In TIA Portal or the controller web server, the engineer must move SIMIT's certificate into the Trusted Certificates store.
  • SIMIT Trusting the Server: SIMIT must trust the controller's server certificate. In SIMIT, un-trusted server certificates appear in C:\ProgramData\Siemens\SIMIT\PKI\Rejected\certs\. Moving the file into PKI\Trusted\certs\ validates the server identity.

Diagnostic Matrix: SIMIT OPC UA Coupling and Connection Failures

The following table summarizes troubleshooting steps for SIMIT OPC UA coupling errors:

Error Code / MessageRoot Cause MechanismCorrective Engineering Action[BadConfigurationError]Local certificate directory access deniedGrant user Read/Write permissions on %ProgramData%\Siemens\SIMIT\PKI[BadSecurityChecksFailed]Server certificate not trusted by SIMITMove server certificate from SIMIT Rejected to Trusted\certs[BadCertificateUntrusted]Controller rejected SIMIT's client certIn PLC Web Server / TIA, accept SIMIT cert into Trusted list[BadCommunicationError]Network routing or firewall port 4840 blockedVerify IP ping; open TCP port 4840 on Windows FirewallEndpoint discovery failsURL syntax error or missing port numberEnsure URL follows format: opc.tcp://<IP_Address>:4840

Step-by-Step Configuration and Certificate Validation Workflow

Follow this sequence to establish a flawless OPC UA coupling in SIMIT:

  1. Fix Certificate Permissions: Open Windows Explorer and navigate to C:\ProgramData\Siemens\SIMIT\. Right-click the PKI folder, select Properties -> Security, and grant the active user account or Users group Read & Execute and Write permissions.
  2. Verify Application Certificate: Open PKI\Own\certs\; confirm that SIMIT_Application.der (or equivalent) exists. If missing, launch SIMIT once with Run as Administrator to generate the default self-signed certificate.
  3. Configure SIMIT Coupling: In SIMIT, create an OPC UA Client Coupling. Enter the target endpoint URL: opc.tcp://<Controller_IP>:4840.
  4. Initial Security Policy: For bench testing, select Security Policy None (if enabled on the server) to verify network layer connectivity.
  5. Mutual Trust Approval: Switch Security Policy to Basic256Sha256 - Sign & Encrypt. Connect once to trigger certificate exchange. Approve SIMIT's certificate in the controller's management interface, and move the controller's certificate into SIMIT's Trusted store.
  6. Activate the SIMIT simulation; confirm that the OPC UA coupling indicator turns solid green.

Verification

Confirm reliable simulation data exchange over OPC UA:

  1. In SIMIT, open the OPC UA Coupling editor; verify that the connection status displays 'Connected' with 0 communication errors.
  2. Import the controller's tag symbol list into SIMIT; verify that PLC I/O tags populate the coupling signals table.
  3. Start the SIMIT simulation engine. In SIMIT, modify a simulated sensor value (e.g., pressure transmitter 4–20 mA signal).
  4. Open the controller online program; confirm that the input tag in the PLC updates instantaneously matching the SIMIT simulation value.

Limitations and Operational Precautions

Adhere to the following operational precautions:

  • Never Leave Security on 'None' in Production: Security Policy 'None' bypasses encryption and authentication; while useful for initial bench diagnostics, always enable Basic256Sha256 or Aes128_Sha256_RsaOaep for industrial networks.
  • Certificate Expiration Auditing: Self-signed OPC UA certificates typically expire after 1 to 5 years. Log certificate expiration dates to prevent sudden simulation lockouts during scheduled plant training campaigns.
  • Time Synchronization: OPC UA certificate validity checks evaluate system clocks. Ensure both the SIMIT PC and the controller clocks are synchronized within acceptable tolerance windows.

Engineer FAQ

Why did the standalone OPC UA Client 1500 connect while SIMIT failed?

Because the standalone sample client had already generated and established trusted certificates with the controller, whereas SIMIT had separate, unpermitted PKI directories.

Can SIMIT connect to an OPC UA server in Demo Mode?

Yes. SIMIT Demo Mode supports OPC UA coupling for testing, but administrative rights may be required to generate local certificate files on initial launch.

What TCP port is used by standard OPC UA servers?

Standard OPC UA servers communicate on TCP port 4840. Ensure this port is open on all intermediate firewalls.

Technical References

Related Articles

Related Tags

  • SIMIT Simulation
  • OPC UA Coupling
  • BadConfigurationError
  • Application Certificate
  • PKI Security
  • X.509 Certificate
6 respuestas