Restarting WinCC OS Client Runtime via Pushbutton Script Without Rebooting Windows
To restart WinCC Runtime on a PCS 7 OS Client using a dedicated screen button without rebooting Windows or closing the engineering project, executing PdlRt.exe directly is insufficient because PdlRt.exe starts only the Graphics Runtime, leaving Alarm Logging, Tag Logging, and script subsystems inactive. The technically correct Siemens solution requires executing a C-script on button click that calls DeactivateRTProject() followed by DMExitWinCC(), while launching an external batch script that monitors process termination and invokes AutostartRt.exe with the full client project MCP path (AutostartRt.exe /Activ:yes /Delay:5), cleanly re-initializing the entire WinCC runtime stack.
Table of Contents
- WinCC Runtime Multi-Process Subsystem Architecture
- Why Executing PdlRt.exe Fails to Restore Complete Runtime
- WinCC Runtime Process Lifecycle and Management Matrix
- Step-by-Step Implementation of the Automated Restart Script
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
WinCC Runtime Multi-Process Subsystem Architecture
In SIMATIC PCS 7 Operator Stations, WinCC Runtime is not a monolithic executable; it is a distributed suite of interconnected server and client processes operating under the supervisory coordination of the Data Manager (CCProjectMgr.exe). Core runtime subsystems include:
PdlRt.exe: Picture/Graphics Runtime (renders process screens, faceplates, and dynamic shapes).CCAlarmLogServer.exe: Alarm Logging Server (manages active alarms and message lists).CCTagLoggingServer.exe: Tag Logging Server (manages cyclical and change-driven trend archiving).ScriptRT.exe/PassSvc.exe: C and VBScript runtime execution engines and User Administrator security.CCDataServer.exe: Communication channel manager exchanging data with OS Servers over the Terminal Bus.
When maintenance technicians encounter graphical display glitches or desire to clear temporary screen cache on an OS Client, restarting the runtime stack without restarting the physical PC saves valuable operating time.
Why Executing PdlRt.exe Fails to Restore Complete Runtime
A frequent programming error is attaching a script to a button that terminates runtime and restarts PdlRt.exe directly from <Drive>:\Program Files (x86)\Siemens\WinCC\bin\PdlRt.exe:
- Orphaned Graphics Engine:
PdlRt.exeis merely the display client. If launched in isolation, it cannot communicate with Alarm Logging or Tag Logging because the underlying Data Manager and COM channels are absent. -
Missing Server Connections: The client will display process graphics, but all I/O fields will display yellow exclamation marks or disconnected states because
CCDataServer.exehas not established the server session. -
The
AutostartRt.exeSolution: Siemens provides the dedicated utilityAutostartRt.exespecifically to orchestrate the multi-process startup sequence. When passed the project.mcppath,AutostartRt.exeverifies database readiness, startsCCProjectMgr.exe, loads all configured runtime modules in correct sequence, and activates Graphics Runtime seamlessly.
WinCC Runtime Process Lifecycle and Management Matrix
The following table compares runtime executables and their operational roles:
PdlRt.exeCCProjectMgr.exeAutostartRt.exeDeactivateRTProject()DMExitWinCC()Step-by-Step Implementation of the Automated Restart Script
To implement a safe, pushbutton-triggered runtime restart on an OS Client:
-
Create the External Restart Watchdog Batch File:
- On the OS Client PC, create a batch script atC:\Siemens_Scripts\RestartWinCC.bat:
bat @echo off timeout /t 3 /nobreak > nul :WAIT_LOOP tasklist | find /i "PdlRt.exe" > nul if not errorlevel 1 ( timeout /t 1 /nobreak > nul goto WAIT_LOOP ) timeout /t 2 /nobreak > nul "C:\Program Files (x86)\Siemens\WinCC\bin\AutostartRt.exe" "C:\ClientProject\OSClient.mcp" /Activ:yes /Delay:5 exit -
Configure Button C-Script in Graphics Designer:
- Open the client overview toolbar picture (e.g.,@Buttons.pdlor custom screen) in Graphics Designer.
- Insert a button labeled 'Restart Runtime'.
- In the button's Mouse Click event, attach the following C Action:
```c
#include "apdefap.h"
void OnClick(char lpszPictureName, char lpszObjectName, char* lpszPropertyName)
{
// Launch the external watchdog script before terminating runtime
ProgramExecute("C:\Siemens_Scripts\RestartWinCC.bat");// Gracefully deactivate runtime subsystems
DeactivateRTProject();// Unload project and release database handles
DMExitWinCC();
}
``` -
Assign User Authorization:
- In the button properties, assign Authorization Level 6 (Higher Process Controlling) to prevent accidental runtime termination by general operators.
Verification
Verify automated runtime restart:
1. Open WinCC Runtime on the OS Client station.
2. Click the 'Restart Runtime' button and confirm the action prompt.
3. Observe that WinCC Runtime closes gracefully: Graphics Designer/Runtime closes, and taskbar icons disappear.
4. Open Windows Task Manager; confirm that PdlRt.exe and CCProjectMgr.exe terminate completely.
5. Within 5 to 10 seconds, verify that AutostartRt.exe launches automatically, reloading the project MCP and restoring full operational runtime with active alarms, live trends, and healthy server communication.
Limitations and Operational Precautions
- OS Server Prohibition: Never implement an automated runtime restart button on an OS Server during active production; deactivating a server momentarily breaks AS communication and triggers server redundancy failovers.
- Hardcoded Project Path: Ensure the path specified in the batch file (
C:\ClientProject\OSClient.mcp) matches the exact local path on the target OS Client station. - Timing Delays: Always enforce a delay (
/Delay:5and batch timeouts) to ensure Windows SQL Server Express instances have fully detached previous database connections before re-initializing.
Engineer FAQ
Can I use StopWinCC.exe instead of scripting DeactivateRTProject()?
Yes, calling Siemens utility StopWinCC.exe /Force terminates runtime, but calling DeactivateRTProject() followed by DMExitWinCC() is cleaner because it allows alarm journals and historical buffers to flush to disk.
What does the /Delay:5 parameter do in AutostartRt.exe?
It introduces a 5-second buffer before launching WinCC, ensuring all operating system services, network adapters, and security credentials are fully ready.
Why must DMExitWinCC() be called after DeactivateRTProject()?
DeactivateRTProject stops runtime, but leaves the WinCC project open in memory. AutostartRt requires the project to be completely closed so it can re-open and re-initialize it cleanly.
Will restarting client runtime affect the running PLC controller?
No. An OS Client restart has zero impact on AS controllers or OS Servers. The redundant servers continue controlling the process and archiving all data uninterrupted.
Technical References
- Siemens Industry Online Support: How to Avoid Synchronization Problems with WinCC Autostart (Entry ID: 19249315)
- SIMATIC HMI WinCC V7.4 SP1 Scripting: VBS, ANSI-C, VBA Programming Reference
- SIMATIC Process Control System PCS 7 Operator Station (V9.0 SP1) Operating Manual
Related Articles
- Resolving OS Download Failure 'Error Changing Computer Name to Station-Name'
- Renaming Computers and OS Projects in PCS 7 When Upgrading to Windows Server
- Restoring WinCC OS Client Trend Views Following Server Power Outages in PCS 7
Related Tags
- WinCC Runtime
- AutostartRt
- OS Client
- C-Scripting
- Runtime Restart