Diagnosing OpenPCS 7 Service Halts and RDP Remote Desktop Disconnections in PCS 7

Diagnosing OpenPCS 7 Service Halts and RDP Remote Desktop Disconnections in PCS 7

In SIMATIC PCS 7, when the OpenPCS 7 OPC UA / OPC DA server stops communicating after running normally for several days—causing external MES, ERP, or third-party OPC clients to lose connection until the server host is rebooted—the failure is frequently caused by administrative access via standard Microsoft Remote Desktop Protocol (RDP). Standard RDP connections instantiate dynamic virtual terminal sessions; upon disconnecting or closing the RDP client window, Windows suspends or terminates desktop memory heaps and DCOM communication contexts required by the underlying WinCC and OpenPCS 7 runtime services. To prevent these service freezes, strictly prohibit standard RDP sessions, utilize Siemens-approved remote administration tools such as RealVNC (Enterprise Edition) or the Microsoft Remote Desktop console session switch (mstsc /admin), and configure automatic service recovery in Windows Services.

Table of Contents

Executive Summary

OpenPCS 7 serves as the primary standardized communication gateway interfacing PCS 7 process values, alarm logs, and historical archives with plant-level manufacturing execution systems (MES) via OPC UA. In 24/7 operating facilities, system administrators frequently connect to OpenPCS 7 and WinCC OS Servers over the corporate network using Windows Remote Desktop (mstsc.exe). However, Siemens industrial control guidelines explicitly classify unmanaged RDP as an unreleased remote access mechanism. When an administrator disconnects from an RDP session, Windows alters user security contexts and detaches COM/DCOM socket bindings, silently starving the OpenPCS 7 daemon of memory until communications collapse. Adhering to certified remote access methods guarantees long-term OpenPCS 7 service stability.

Architecture and Fundamental Mechanics

The inter-process communication and security architecture of OpenPCS 7 within the Windows runtime environment operates through specific service boundaries:

  1. The OpenPCS 7 Service Architecture:
    * The OpenPCS 7 server (OPC UA Server OpenPCS7 / OpenPCS7.exe) runs as a background Windows service interacting directly with the local WinCC runtime subsystem.
    * It utilizes COM/DCOM interfaces and local shared memory buffers to query tag values from CCProjectMgr.exe and CCAlgRtServer.exe.
  2. The Impact of Remote Desktop Protocol (RDP):
    * Standard RDP creates an isolated virtual session (Session 1, Session 2) distinct from the physical machine console (Session 0).
    * When a user logs in via standard RDP, Windows redirects certain COM/OLE callbacks to the user's virtual terminal session.
    * When the administrator simply closes the RDP window without a formal logoff (or when the session times out), Windows locks or suspends the session's graphics context and terminates its Desktop Heap allocations.
  3. DCOM Socket Freezes and Memory Starvation:
    * When external OPC UA clients issue polling requests, OpenPCS 7 attempts to marshal data across DCOM boundaries that are now detached or locked by Windows Terminal Services.
    * The service experiences repetitive unhandled exceptions, thread pool deadlocks, or socket exhaustion, eventually hanging completely.
    * Because the service process remains technically running in Task Manager, Windows does not detect a crash, but the OPC UA TCP listening port stops responding.

Step-by-Step Implementation Procedure

Follow these procedures to diagnose, recover, and secure the OpenPCS 7 server against RDP-induced failures:

  1. Immediate Service Recovery:
    * If the OpenPCS 7 server has stopped responding, log onto the physical machine console or approved remote session.
    * Open Windows Services (services.msc) as Administrator.
    * Locate the service OPC UA Server OpenPCS7 (and OpenPCS7 Server).
    * Click Restart Service.
    * If the service hangs in the 'Stopping' state, open Windows Task Manager (Ctrl + Shift + Esc), navigate to the Details tab, locate OpenPCS7.exe or sopcserver.exe, and terminate the process.
    * Restart the service.
  2. Prohibit Standard Remote Desktop (RDP) Usage:
    * Issue an engineering directive prohibiting plant IT and engineering staff from using standard mstsc.exe RDP sessions to access OS Servers or OpenPCS 7 stations.
    * In Windows System Properties (sysdm.cpl), disable Remote Desktop if local corporate policy allows.
  3. Deploy Siemens-Approved Remote Access Tools:
    * Install RealVNC (Enterprise Edition) on the OpenPCS 7 server station.
    * RealVNC mirrors the physical console (Session 0) without creating virtual terminal sessions, preserving DCOM and desktop heap allocations.
    * If Microsoft Remote Desktop must be used under strict IT constraints, mandate the console switch: launch via mstsc.exe /admin (or mstsc.exe /console on legacy Windows releases) and ensure users formally Log Off rather than closing the window.
  4. Configure Automatic Windows Service Recovery:
    * In services.msc, right-click OPC UA Server OpenPCS7 and select Properties.
    * Go to the Recovery tab.
    * Configure First failure, Second failure, and Subsequent failures to Restart the Service.
    * Set Restart service after to 1 minute.
  5. Inspect Windows Desktop Heap Allocations:
    * If multiple concurrent OPC DA/UA clients connect to the server, verify that the Windows Desktop Heap (SharedSection registry setting in HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Session Manager/SubSystems) provides adequate non-interactive heap memory (e.g., set the third SharedSection argument to 768 or 1024 KB).

Verification

Connect an OPC UA diagnostic client (such as UAExpert or OPC Quick Client) to the OpenPCS 7 endpoint. Establish continuous cyclic polling of 100 process tags. Connect to the host machine using RealVNC, perform administrative checks, and disconnect. Confirm that the OPC UA client communication remains uninterrupted with zero dropped packets over a 7-day monitoring interval.

Limitations and Operational Precautions

Third-party remote tools like TeamViewer or AnyDesk are not officially tested or validated by Siemens for PCS 7 OS stations and can interfere with WinCC graphics drivers. Always coordinate remote access policies with plant cybersecurity guidelines.

Engineer FAQ

Why is standard RDP prohibited on WinCC and OpenPCS 7 stations?

Standard RDP creates isolated terminal sessions that detach COM/DCOM bindings and exhaust desktop heap memory upon disconnection, crashing or hanging WinCC and OpenPCS 7 services.

What remote access software is officially recommended by Siemens for PCS 7?

Siemens officially tests and supports RealVNC (Enterprise Edition) and SIMATIC Management Console (SMC) for remote station management.

Does mstsc.exe /admin completely prevent session detachment?

While /admin connects to Session 0 (console session), closing the RDP window without logging off can still suspend certain Windows graphical and COM message loops; formal logoff or VNC is preferred.

Can OpenPCS 7 recover automatically if the service freezes?

Configuring Windows Service Recovery to 'Restart the Service' on failure helps, but if the process hangs in a deadlock without crashing, manual termination may be required.

Technical References

Related Articles

Related Tags

  • OpenPCS 7
  • Remote Desktop
  • RDP Freeze
  • OPC UA Server
  • RealVNC
20 respuestas