WinCC RT Professional V17: One-Day Trend Logging and Runtime Stop Failures
WinCC Runtime Professional (RT Pro) on TIA Portal V17 is a PC-based SCADA runtime that uses Microsoft SQL Server for historical data archiving. When integrated with a SIMATIC S7-1200 (such as the 1214 DC/DC/DC), RT Pro exchanges tag data, alarms, and trends through a configured HMI connection. Two correlated failures are repeatedly reported on this stack: (1) the trend archive stops growing after the first day of runtime, and (2) stopping the runtime raises either No more threads can be created in the system or RPC server is unavailable. Both symptoms typically point to the same root cause: a TagLogging / archive configuration that is incompatible with the runtime instance, combined with a thread or DCOM resource exhaustion that the host OS cannot recover from at shutdown.
This reference explains the underlying WinCC RT Pro V17 architecture, walks through every diagnostic step, and provides a verified resolution procedure for both issues on a TIA V17 Update 6 / WinCC RT Pro V17 Update 6 system running on Windows 11 Pro 64-bit.
1. System Configuration Snapshot
The reported environment is the baseline reference for every step below. Reproduce the parameters in your project before applying the changes.
| Component | Value |
|---|---|
| Engineering software | TIA Portal V17 Update 6 |
| Runtime | WinCC RT Professional V17 Update 6 |
| Controller | SIMATIC S7-1200, CPU 1214 DC/DC/DC (6ES7214-1AG40-0XB0 family) |
| HMI connection | S7-1200 / S7-1500 channel (HMI tag subscription) |
| OS | Windows 11 Pro 64-bit |
| Archive backend | Microsoft SQL Server (bundled with RT Pro V17) |
| Runtime launcher | WinCC RT Start (compiled RT file launched externally) |
| Runtime services verified active | Alarm Logging, Tag Logging |
The runtime is started from a generated .rtf / .exe project file (compiled with TIA Portal) and launched through WinCC RT Start, not the TIA integrated simulation. This distinction matters: simulation uses a temporary local archive directory, while the standalone runtime honors the configured archive path in the project.
2. Problem Definition
2.1 Symptom A — One-Day Trend Logging
- After starting the runtime, the trend view logs data correctly for the first 24 hours.
- Beginning on the second day, no new historical values are written.
- Opening the trend page shows only the live (current) curve; the previous day's history is missing.
- Inside Archive Manager > TagLogging Fast, only one database segment exists, dated for the day the runtime was started.
- The runtime process remains running, the HMI connection to the S7-1200 is up, and live tags continue updating.
2.2 Symptom B — Runtime Cannot Stop
- Initiating Stop Runtime from WinCC RT Start or the project file fails to terminate the process.
- Error dialog
No more threads can be created in the systemappears, or - Error dialog
RPC server is unavailableappears. - The RT Pro process must be killed via Task Manager; SQL Server instances launched by RT Pro sometimes remain orphaned.
0x800700A4; the RPC error corresponds to 0x800706BA (RPC_E_DISCONNECTED). They are not WinCC application errors — they are pushed up to the WinCC RT Pro UI by the .NET runtime when the host OS refuses further resource allocation or loses its RPC channel to the SQL Server / WinCC service.3. WinCC RT Pro V17 Archive Architecture
Before diagnosing, you must understand how RT Pro writes history. WinCC Runtime Professional V17 stores archives in SQL Server databases that are segmented on a configurable boundary. The archive types and the segmentation policy are both defined in TIA Portal under Runtime Settings > Archives and projected into the runtime image.
| Archive | Driver / process | Default cycle | Use case |
|---|---|---|---|
| Tag Logging Fast | TagLoggingFast.exe | 500 ms (configurable down to 100 ms) | High-speed analog trends, motion / process variables |
| Tag Logging Slow | TagLoggingSlow.exe | 1 s and slower | Energy, counters, batch IDs, KPIs |
| Alarm Logging | ALG.exe | Event-driven | Alarm history, audit trail |
For each archive, RT Pro creates a new SQL database segment when a segmentation boundary is crossed. Segmentation is controlled by two independent parameters:
-
Segmentation type:
Daily,Weekly,Monthly, orSize-based. -
Segmentation time: the time-of-day the boundary is applied (only for
Daily/Weekly/Monthly).
If segmentation is misconfigured, the runtime can still open the first segment, but it will not create a second one — and the trend view will then show only the data inside the live segment window. This is the single most common cause of the one-day symptom.
4. Root Cause Analysis — One-Day Trend Logging
4.1 Segmentation Boundary
The default segmentation type in a fresh RT Pro V17 project is Daily with a segmentation time of 00:00:00. If the engineer changes the segmentation type to None, Single, or leaves it at the wrong boundary, only a single database file is ever created. After that file is closed by the archive writer (at the configured boundary), no new file is opened, and Trend view can no longer load historical data outside the current buffer.
4.2 Archive Path Inaccessible or Read-Only
The runtime is launched by a Windows user (often a non-administrator service account or interactive user). If the configured archive path:
- resolves to a UNC path that the runtime user cannot reach at midnight,
- points to a redirected / roaming profile folder,
- is on a drive that is encrypted or sleeping,
- lacks write permissions for
SYSTEMor the interactive user,
the segmentation boundary will silently fail. The previous day stays open, no new segment is created, and the archive subsystem is effectively dead.
4.3 Time Skew Between Engineering Station and Runtime
If the runtime host and the engineering station differ in their time zone, DST handling, or if the runtime is started with a different system time, the next Daily boundary may be computed as already-passed. In that case the first segment is opened and closed on the same day, and the writer enters a state where it expects to roll over to a date that never recurs.
4.4 TagLogging Fast Not Selected for the Trend
A Trend control can be bound either to the live tag or to a logged archive. If the Trend control is configured to display only the live value (or to a TagLogging Slow archive that is empty), the visible curve looks correct on day 1, but the history function has no segment to fall back to. Verify the Data Source in the trend control properties and confirm it points to the TagLogging Fast archive you expect.
4.5 Licensing
WinCC RT Professional requires a valid license for the archive option. On the SIMATIC S7-1200, the RT Pro archive option is delivered as WinCC RT Professional (V17) — Archives. If the license is missing, expired, or the License Manager is not running, RT Pro degrades to logging disabled after start on some update levels.
None in Runtime Settings > Archives > Tag Logging Fast > Properties > Archive. This is a project-side mistake, not a runtime bug.5. Root Cause Analysis — Runtime Stop Errors
5.1 Thread Exhaustion (HRESULT 0x800700A4)
WinCC RT Pro V17 is a managed (.NET) application. Each Trend view with a tight refresh cycle, each script executing a heavy LINQ query against the archive, and each HMI connection occupies a thread pool worker. When a script triggers a synchronous archive query that re-enters itself (for example, a C# script that calls HMIRuntime.Tags.SysFct.ReadTag from inside a cyclic event), the thread pool starves. The shutdown path of RT Pro allocates additional threads to flush pending archive writes; if no thread is available, .NET throws 0x800700A4 and the shutdown dialog appears.
5.2 SQL Server Service Shutdown Race (HRESULT 0x800706BA)
RT Pro V17 launches a Microsoft SQL Server instance (named instance per project) at runtime start. When the user requests Stop Runtime, the WinCC shutdown sequence first asks the SQL Server instance to commit pending transactions, then asks it to stop. If:
- the SQL Server service has already auto-shut down (e.g., on idle timeout),
- the WinCC RT Pro main process is being terminated before SQL Server releases the port,
- the DCOM / RPC port range is blocked by Windows Firewall,
- an antivirus product is quarantining the SQL Server process mid-shutdown,
the RPC channel between WinCC and SQL Server is severed, the 0x800706BA exception is raised, and the runtime does not exit cleanly.
5.3 Forced Termination After a Hard Kill
Once a user has had to kill the RT Pro process via Task Manager, the SQL Server instance it spawned remains orphaned. On the next start, RT Pro detects the orphan and tries to attach — if the orphan is locked, the start itself can fail. This produces a self-perpetuating failure cycle where the next shutdown raises the same thread or RPC error.
6. Step-by-Step Resolution
Apply these steps in the order given. Each step is independently verifiable, so you can stop at the first step that resolves the issue.
Step 1 — Verify the archive segmentation
- Open the project in TIA Portal V17 Update 6.
- Navigate to Runtime Settings > Archives > Tag Logging Fast.
- Select the archive that supplies the trend in question, then open Properties > Archive.
- Set Segmentation type to
Daily. - Set Segmentation time to
00:00:00(midnight) for a typical plant, or to the off-shift time that matches the site. - Repeat for Tag Logging Slow if the trend uses it.
- Compile and re-deploy the runtime.
Step 2 — Set the archive path to a fixed local directory
- In Runtime Settings > Archives > General, set the data path to a fixed, non-roaming local path, e.g.
D:\Siemens\WinCC\Archives\[ProjectName]. - Confirm the Windows account that runs the runtime has
Modifypermission on this folder. - Add a corresponding folder to the Windows Defender / antivirus exclusion list (WinCC + SQL Server).
Step 3 — Synchronize time on the runtime host
- Open Settings > Time & Language > Date & time.
- Enable Set time automatically and confirm the time zone matches the engineering station.
- If the runtime host is on a domain, ensure it is in time sync with the domain controller (
w32tm /resync).
Step 4 — Confirm TagLogging Fast is active and bound to the trend
- In TIA Portal, open the Trend control that is failing on day 2.
- In Properties > Trend > Data Source, confirm the trend is bound to the TagLogging Fast archive (not a live tag).
- Verify that the tag driving the trend is configured for archiving: select the HMI tag, then Properties > Logging → tick Archive TagLogging Fast (or Slow, depending on the cycle).
Operation of the Trend view in runtime, including binding source, time range, and toolbar IDs, is documented in the official WinCC V20 reference for controls — the dialogs are identical to V17 Update 6: Using the trend and table view in Runtime (RT Professional) — TIA Portal docs.
Step 5 — Verify the archive services are active
- In TIA Portal, open Runtime Settings > Services.
- Confirm both Alarm Logging and Tag Logging are set to Start automatically with the runtime.
- Save and re-compile.
Step 6 — Check the WinCC RT Pro license
- Open the Automation License Manager on the runtime host.
- Confirm the WinCC RT Professional V17 license and the WinCC RT Professional — Archives option are present and not in the warning state.
- If either is missing, transfer the license via the License Manager and restart the runtime.
Step 7 — Clean orphaned SQL Server instances
- Stop the runtime. If it does not stop, open Task Manager and end the
WinCCRTPro.exeprocess and itssqlservr.exechildren. - Open Services (
services.msc) and stop any service namedWinCC RT Pro — <ProjectName>that is still in Running. - Open SQL Server Configuration Manager → SQL Server Services and confirm no orphan instance remains.
- Restart the runtime cleanly from WinCC RT Start.
Step 8 — Eliminate the thread exhaustion path
- Audit every C# / VBS script in the project for synchronous archive reads executed inside a fast cyclic event.
- Refactor each call to a throttled, queue-based model — e.g., trigger the archive read from a button event, not from a 100 ms cycle.
- Confirm the Trend view Update cycle is at least 500 ms; sub-second refreshes on a small S7-1200 HMI tag set often push .NET into thread starvation.
Step 9 — Restore the RPC channel
- Open Windows Defender Firewall with Advanced Security.
- Confirm the File and Printer Sharing (SMB-In) and Windows Management Instrumentation (WMI-In) rules are enabled for the runtime network profile.
- Open Component Services > Computers > My Computer > DCOM Config. Find SQL Server WinCC and confirm Authentication Level is Connect.
- Restart the RPC Endpoint Mapper service:
net stop RPCSS && net start RPCSS.
Step 10 — Apply pending Siemens updates
Confirm that TIA Portal V17 and WinCC RT Professional V17 are both on Update 6 or later. Several earlier V17 updates shipped with archive writer defects that were resolved in subsequent updates. Use the Siemens Automation License Manager and the TIA Update Installer to verify.
7. Verification Procedure
After applying the steps above, validate the fix on the live runtime.
7.1 Archive growth test
- Start the runtime at a time that is at least 5 minutes before a planned segmentation boundary.
- Open the Trend view and confirm data is being written (point the trend at a known-cyclic tag).
- Wait for the segmentation time to elapse.
- In Windows Explorer, navigate to the configured archive path. Confirm a new SQL database file was created, dated for the new day.
- Open the Trend view and request a 48-hour range. Confirm the new segment is loaded.
7.2 Clean shutdown test
- With the runtime running and a trend actively updating, request Stop Runtime from WinCC RT Start.
- Confirm the runtime exits within 30 seconds and no error dialog appears.
- Confirm in SQL Server Configuration Manager that the project-named SQL instance has been stopped.
- Open services.msc; no
WinCC RT Pro — <ProjectName>service should be left in Running.
7.3 72-hour soak test
Leave the runtime running over a continuous 72-hour window. On each daily boundary:
- a new SQL segment is created in the archive path,
- the Trend view loads all three days of history,
- the runtime can be stopped and restarted cleanly.
8. Common Mistakes to Avoid
-
Mixing RT Pro and RT Advanced archives. The two are not interchangeable; do not copy a
.dbfrom a Comfort panel project into an RT Pro runtime path. - Storing archives on a network share. SQL Server cannot guarantee a stable file handle across a WAN drop. The archive writer will hang, the shutdown path will fail, and the segment will be marked corrupt.
- Launching the runtime as a service from a non-elevated context. WinCC RT Pro V17 expects to start the SQL Server instance on a per-user basis; running it under SYSTEM without a profile can fail silently.
-
Setting segmentation to
Nonefor a 24/7 process. The first segment will eventually be closed by the SQL Server write cache; the data is then stranded. - Excluding only WinCC from antivirus scans. The SQL Server executable, the archive path, and the WinCC RT Pro temp directory all need exclusion.
9. Field-Proven Diagnostic Matrix
| Observed symptom | Likely cause | Verification step | Resolution |
|---|---|---|---|
| Trends visible on day 1, gone on day 2 | Segmentation type = None / Single
|
Check Runtime Settings > Archives > Tag Logging Fast > Segmentation | Set segmentation to Daily with a defined boundary time |
| Only one SQL file in archive path | Archive path on read-only / UNC volume | Check NTFS permissions and connectivity to the share | Move archives to a local fixed NTFS path; grant Modify
|
| No new segment at the expected boundary time | Time skew between host and engineering station | Compare w32tm /query /status on both machines |
Enable automatic time sync; align time zones |
| Trend shows only live values, no history | Trend control bound to live tag, not archive | Inspect Trend control > Data Source | Re-bind the trend to the TagLogging Fast archive |
No more threads on shutdown |
Thread pool starvation from synchronous archive reads | Review C# / VBS scripts for cyclic archive queries | Refactor scripts to throttled / event-driven reads; relax Trend update cycle |
RPC server is unavailable on shutdown |
SQL Server instance orphaned or RPC endpoint blocked | Check SQL Server Configuration Manager and services.msc | Clean orphan instance; restore DCOM / RPC settings; restart RPCSS |
| Runtime starts but archives are empty | Archive option license missing | Automation License Manager status | Install / reactivate the archive license |
| Trend page works, alarm page works, history does not | TagLogging Fast not enabled under Services | Check Runtime Settings > Services | Set Tag Logging to Start automatically; recompile |
10. Preventive Hardening for Production Systems
- Pin updates. Use TIA Portal V17 Update 6 or later, and lock the engineering baseline to that update level to keep test and production aligned.
-
Use a fixed local archive path.
D:\Siemens\WinCC\Archives\[ProjectName]on a dedicated NTFS volume with a periodic backup job. - Exclude the runtime from antivirus. Add the WinCC install path, the SQL Server path, and the archive path to Defender / EDR exclusions.
- Disable sleep and hibernation on the runtime host to avoid interrupted segmentation writes.
- Schedule a daily restart on systems that cannot tolerate the rare archive segment corruption; this rolls the active segment predictably.
-
Monitor thread count and SQL Server memory with Performance Monitor: counters
.NET CLR LocksAndThreads\# of current logical ThreadsandSQLServer:Memory Manager\Total Server Memory (KB). - Apply OS updates in a controlled window; some Windows 11 cumulative updates have changed DCOM default behavior and can re-introduce the RPC error until the TIA V17 update is re-installed.
11. Quick-Reference Checklist
- [ ] Tag Logging Fast service is set to start automatically.
- [ ] Archive segmentation is
Dailywith a defined boundary time. - [ ] Archive path is a fixed local NTFS directory with
Modifypermission. - [ ] Trend control data source points to the TagLogging Fast archive, not the live tag.
- [ ] HMI tag is flagged for archiving at the intended cycle.
- [ ] Archive option license is valid in Automation License Manager.
- [ ] No orphan
sqlservr.exeorWinCCRTPro.exeafter the previous shutdown. - [ ] DCOM / RPC firewall rules and services are intact.
- [ ] Runtime host time matches the engineering station, DST-aware.
- [ ] TIA Portal and WinCC RT Pro are on the same update level (Update 6 or later).
Why does my WinCC RT Pro V17 trend log only one day and then stop?
The most common cause is an incorrect archive segmentation setting. In TIA Portal, open Runtime Settings > Archives > Tag Logging Fast > Properties > Archive and set Segmentation type to Daily with a defined Segmentation time. A value of None or Single will produce exactly the one-day symptom you are seeing. Also confirm the archive path is a writable local NTFS directory and that the archive option license is valid.
What causes "No more threads can be created in the system" when stopping WinCC RT Pro V17?
It is the .NET HRESULT 0x800700A4, raised when the WinCC shutdown path needs a worker thread but the .NET thread pool is saturated. Typical causes are C# / VBS scripts that perform synchronous archive reads inside a fast cyclic event, or Trend views with a sub-500 ms refresh cycle on a small S7-1200 tag set. Refactor the scripts to event-driven reads and lengthen the Trend update cycle to at least 500 ms.
What causes "RPC server is unavailable" (HRESULT 0x800706BA) on WinCC RT Pro shutdown?
This is the .NET exception raised when the WinCC main process loses its RPC channel to the SQL Server instance it spawned. The most common cause is a SQL Server instance orphaned from a previous hard-kill, or Windows Firewall / DCOM blocking the RPC endpoint. Stop the orphan service in services.msc, restore the File and Printer Sharing and WMI firewall rules, and reset the RPC Endpoint Mapper with net stop RPCSS && net start RPCSS.
How do I bind a Trend control to the TagLogging Fast archive in TIA Portal V17?
Open the Trend control, navigate to Properties > Trend > Data Source, and select the TagLogging Fast archive that contains the tag. Confirm that the HMI tag driving the trend has the Archive TagLogging Fast flag enabled in its properties. The full V20 reference for operating the trend and table view in runtime applies to V17 Update 6 as well: Using the trend and table view in Runtime (RT Professional).
Should I store WinCC RT Professional archives on a network share or in OneDrive?
No. WinCC RT Pro V17 expects a fixed, locally-attached NTFS volume for the SQL Server archive writer. A UNC path, a redirected profile folder, or a cloud-synced folder will break the segmentation boundary and is one of the leading causes of the one-day trend symptom. Use a dedicated local path such as D:\Siemens\WinCC\Archives\[ProjectName] and back it up with a scheduled task rather than a sync client.
Do I need a separate license for archives in WinCC RT Professional V17?
Yes. The runtime requires both the WinCC RT Professional V17 base license and the Archives option. Open the Automation License Manager on the runtime host and confirm both are present and not in a warning state before troubleshooting archive behavior further.