WinCC 7.4 Process Historian Tag Data Missing After Project Duplication
When a WinCC 7.4 system with a redundant pair of OS servers, an Engineering Station (ES), and a Process Historian server is updated through the WinCC Project Duplicator tool, a well-known cache-synchronization defect can leave the Historian receiving alarm messages while refusing to accept runtime tag values. This article documents the exact symptom, the underlying cache-architecture cause, the official SFCache/PHReady cache recovery procedure, the version-precondition checks that must be in place before the procedure is run, and the verification sequence that proves recovery has succeeded.
1. Problem Definition and Symptom Matrix
The defect presents itself as a partial Historian feed rather than a complete outage. Before starting any recovery procedure, capture the symptom precisely so that the wrong fault path is not entered.
| Symptom | Observed On | Initial Diagnosis |
|---|---|---|
| Alarm messages written to PH tables correctly | PH Server / Information Server | Database, SQL Writer, PH Service are healthy |
| Runtime tag values not written to PH | OS Master + OS Standby | Tag recovery queue is stuck |
| Tag recovery column in PH Management Console shows Needed | PH Management Console → Data Sources | OS server holds unrecovered compressed data |
Processhistorian.cfg timestamp older than current OS project |
OS server project folder | PH handshake config did not refresh after duplication |
| SFCache / PHReady Cache folders contain *.dat or queue files | C:\ProgramData\Siemens\SFCache |
Sync between OS and PH is blocked |
| Redundancy control shows both OS as connected and online | WinCC Redundancy Diagnostics | WinCC redundancy layer itself is fine |
The single most diagnostic entry is the Tag recovery: Needed field under PH Management Console → Data Sources. If alarms are present but tag recovery has not flipped to Not needed after the redundancy handover is complete, the OS-to-PH handshake is in a corrupted state and the SFCache/PHReady cache recovery procedure must be executed.
2. Affected Versions, Topology, and Architectural Constraints
The defect is reproducible on the following baseline. Use this as the precondition filter before applying the procedure; other versions may have different cache layouts.
- WinCC: V7.4 (any Update, including Update 9 and later). Compatible bases: V7.3, V7.4, V7.4 SP1. V7.5 introduces a different PH Ready cache structure (PHReadyConfigV2).
- Process Historian: 2014 SP2 (build 7.4.1.x) and Information Server 2014 SP2. Note: PH 2014 SP2 is the matching revision for WinCC V7.4; mismatched PH Ready component versions are the most common cause of “Tag recovery: Needed” not clearing.
- SQL Server used by PH: as required by the PH 2014 SP2 setup (SQL Server 2014 SP2 standard or higher is typical).
- Topology: 1 × ES (Engineering Station) with WinCC Explorer only (no SIMATIC Manager), 2 × OS Servers with one designated as Redundancy partner, N × WinCC Clients always connected, 1 × Process Historian Server (separate machine), 1 × Information Server optional.
- Project transfer mechanism: WinCC Project Duplicator (Save As from ES to OS), used because the ES does not have SIMATIC Manager and the project must be transported without deactivating both OS servers simultaneously (clients must stay online).
3. Root Cause Analysis
The tag-value write path from an OS server to the Process Historian consists of three queues that must be synchronized with the active PH Ready configuration:
-
PH Ready Cache (AlgCSDataQueue family) — OS-side compressed tag data, located under
C:\ProgramData\Siemens\SFCachein folders whose names end with Queue. These files hold the compressed tags waiting to be shipped to PH. - S&F Cache (Store and Forward Cache) — OS-side pending segments queued for delivery to PH when the PH Server is offline or slow.
-
Processhistorian.cfg — OS-side handshake file that identifies the PH Server, database, port, and segment format. Located in the active WinCC project folder of the OS server (typically
<ProjectPath>\<ComputerName>\Processhistorian.cfg).
When the WinCC project is overwritten by the Project Duplicator on the active OS server, the project folder content is replaced but two side-effects occur:
- The
Processhistorian.cfgreferenced by the active WinCC Runtime is the file the runtime opened on activation. Project Duplicator overwrites it on disk, but the OS Runtime keeps the previous in-memory handle and writes compressed tag data into the old SFCache/PHReady cache mapping until the next restart. - The standby OS server is duplicated next, restarting the redundancy handover. The standby now runs with the new
Processhistorian.cfg, but the master has not been bounced and still points to the old cache schema. The PH server sees inconsistent writers, drops the tag-value stream, and only accepts the alarm stream because alarms are routed through a different DLL (CCAlgCSData.dllalarm path) that does not depend on the PH Ready cache.
Result: the PH database receives alarms but no tag values; the Tag recovery field remains Needed indefinitely.
4. Pre-Procedure Safety Checks
Before any cache manipulation, perform the following verifications to avoid corrupting the PH database or losing buffered segments.
| Check # | Action | Pass Criterion |
|---|---|---|
| 1 | Verify PH Ready component version on every OS server | Identical to the version installed on the PH server. Open Programs and Features on each OS and the PH; look for “SIMATIC WinCC/Process Historian Ready” entries. |
| 2 | Verify redundancy state | WinCC Redundancy Diagnostics → both OS servers show Connected and WinCC is Sync. |
| 3 | Verify clients are connected | No planned maintenance on clients. Clients must remain online through the procedure. |
| 4 | Backup project folder on both OS servers | Full copy of <ProjectPath>\<ComputerName>\* saved externally. |
| 5 | Backup SFCache folder | Copy C:\ProgramData\Siemens\SFCache to D:\backup_SFCache_<timestamp> before any deletion. |
| 6 | Confirm PH database is online | SQL Server service for PH database is Running; PH Management Console connects without red-banner errors. |
| 7 | Capture current Tag recovery state | Screenshot PH Management Console → Data Sources for post-procedure comparison. |
5. SFCache and PHReady Cache Recovery Procedure
The procedure below is the field-proven recovery sequence. It forces both OS servers to drop their in-memory PH handshake, regenerate Processhistorian.cfg from the freshly duplicated project, and flush the PHReady Cache and S&F Cache so the PH server can rebuild the tag-value stream.
5.1 Phase A — Standby OS Cache Flush
- On the standby OS server, deactivate WinCC Runtime. Do not shut down the OS. Use WinCC Explorer → File → Activate to deactivate.
- Rename
Processhistorian.cfgin the standby OS project folder toProcesshistorian.cfg.old. Example path:D:\WinCCProjects\PlantA\OS_STANDBY\Processhistorian.cfg→Processhistorian.cfg.old. - Restart the standby OS server (full reboot, not just WinCC Runtime restart). This is required because the PH Ready service holds open file handles into the PHReady Cache.
- After reboot, activate WinCC Runtime on the standby OS.
- Open WinCC Redundancy Diagnostics on the standby OS. Wait until the redundancy check completes and the standby reports Connected to the master.
5.2 Phase B — Master OS Cache Flush
- On the master OS server, deactivate WinCC Runtime.
- Rename
Processhistorian.cfgin the master OS project folder toProcesshistorian.cfg.old. - Restart the master OS server.
- Activate WinCC Runtime on the master OS. WinCC will detect the missing
Processhistorian.cfgand regenerate it from the duplicated project.
5.3 Phase C — PHReady Cache and S&F Cache Deletion
- Backup the SFCache folder from both OS servers:
robocopy "C:\ProgramData\Siemens\SFCache" "D:\backup_SFCache_<timestamp>" /E /ZB /R:1 /W:1 - On both OS servers, navigate to
C:\ProgramData\Siemens\SFCache. - Delete the PHReady Cache folders: any folder whose name ends with Queue, for example
AlgCSDataQueue,AlgCSAlarmQueue,MsgArchiveQueue. The PHReady Cache is the OS-side buffer of compressed tag data waiting to be shipped to PH. - Delete the S&F Cache files: typically
*.dat,*.idx,*.hdrin the SFCache root. These are Store-and-Forward segments held when PH is unreachable. - Do not delete the parent
SFCachefolder itself — only its contents.
5.4 Phase D — Restore Handshake Files
- On the standby OS, rename
Processhistorian.cfg.oldback toProcesshistorian.cfg. - On the master OS, rename
Processhistorian.cfg.oldback toProcesshistorian.cfg. - Deactivate the WinCC Runtime on the standby OS.
- Activate the WinCC Runtime on the standby OS.
- Wait until redundancy check completes on the standby OS (Redundancy Diagnostics tool, both servers tick Connected).
5.5 Phase E — Final Master Cycle and Recovery Wait
- Deactivate the WinCC Runtime on the master OS.
- Activate the WinCC Runtime on the master OS.
- Wait for the S&F recovery to complete. Open WinCC Redundancy Diagnostics and monitor the S&F Status field; it transitions from Recovery to Synchronized when all segments have been delivered to PH.
- Open the Process Historian Dashboard and confirm both Tag Data Transfer and Alarm Data Transfer indicators are green.
6. Verification Procedure
Recovery is confirmed by four independent checks. If any check fails, return to Phase A and inspect the version pre-condition in section 4, check #1.
| Check | Tool | Expected Result |
|---|---|---|
| Tag recovery status | PH Management Console → Data Sources | Tag recovery: changes from Needed to Not needed |
| Redundancy sync | WinCC Redundancy Diagnostics (both OS) | Tick boxes on WinCC is Sync for both servers |
| Tag data arrival | PH Dashboard → Tag Data Transfer | Indicator green; sample tag value appears within one PH segment interval (typically 60 s) |
| Alarm data arrival | PH Dashboard → Alarm Data Transfer | Indicator green (should already be green — confirms alarm path unaffected) |
| PHReady Cache repopulation | File explorer on both OS | New *Queue folders appear under C:\ProgramData\Siemens\SFCache and grow in size; S&F cache remains small or empty |
| SQL data presence | SQL Management Studio on PH database | Rows in the runtime tag archive table increase by one segment per cycle |
7. Common Fault Conditions That Mimic This Defect
If the recovery procedure completes without errors but tag data still does not arrive, one of the following hidden conditions is typically present. Treat this as a differential diagnosis matrix.
| Symptom Variant | Root Cause | Distinguishing Evidence | Resolution |
|---|---|---|---|
| Tag recovery remains “Needed” after procedure, PH Ready version was checked and matches | Antivirus is locking or deleting SFCache files on write | Windows Security event log shows Detection entries for C:\ProgramData\Siemens\SFCache\*.dat
|
Add exclusions for C:\ProgramData\Siemens\SFCache and the WinCC project folder on both OS servers and the PH server |
| Tag recovery oscillates between “Needed” and “Not needed” every few minutes | OS master and standby have different PH Ready component versions |
Programs and Features shows different SIMATIC WinCC Process Historian Ready versions |
Reinstall PH Ready component from the matching PH media on the offending server |
| Tag recovery permanently “Not needed” but no data in PH database | SQL transaction log full or PH database in simple recovery mode with disk full | SQL error log shows 9002 or disk space errors | Free disk, expand transaction log, rebuild PH segments |
| Procedure fails at Phase C with file-in-use error | WinCC Runtime not fully deactivated; PHReady service still running | Task Manager shows CCAlgCSData.exe still resident |
Stop SIMATIC WinCC Process Historian Ready service manually before deletion |
| Alarm data also stops after procedure |
Processhistorian.cfg.old rename was skipped and PH now has no handshake |
PH Management Console → Data Sources shows Offline | Stop WinCC Runtime on both OS, restore the .cfg.old file, repeat Phases D and E |
| Clients lose connection during Phase A | Both OS were inadvertently deactivated in parallel | WinCC Redundancy Diagnostics shows Disconnected on both | Activate one OS immediately, reactivate second, then re-execute procedure serially |
8. Preventive Measures for Future Project Transfers
The defect recurs whenever the Project Duplicator is used without a coordinated OS runtime cycle. Apply the following sequence on every future transfer to keep the PH handshake consistent.
- Before starting the duplication, deactivate only the standby OS Runtime. Keep the master OS Runtime active and clients connected.
- Run the WinCC Project Duplicator from the ES against the standby OS first.
- Activate the standby OS Runtime and wait for redundancy to resync (WinCC is Sync tick on both).
- Perform a controlled redundancy switchover: deactivate the current master, allow the standby to assume master role, then activate the new standby (the original master).
- Repeat the Project Duplicator against the new standby.
- After the final duplicate, perform a Phases A–E SFCache and PHReady cache flush only if Tag recovery: Needed appears in PH Management Console. If it does not appear, no cache flush is required — the duplicate landed cleanly.
- Always confirm that the PH Ready component version is identical on both OS servers and the PH server before, not after, the transfer.
- Maintain a scheduled task on the ES that captures
Processhistorian.cfgchecksums from both OS servers and compares them after every transfer; mismatches are an early warning of the impending tag-data outage.
9. Related System Tags and Diagnostic Surfaces
For Information Server dashboards or WinCC Online Trend Controls that need to surface PH health to operators, the following internal WinCC system tags can be referenced. Note that the status tags exposed by PH must be entered as raw tag names; they are not browseable through the standard tag dialog.
-
@PHConnectState— connection state to PH server (0 = disconnected, 1 = connected). -
@PHRecoveryState— tag recovery state (0 = not needed, 1 = needed, 2 = in progress). -
@PHServerName— configured PH server name string. -
@PHDatabaseName— configured PH database name string.
These tags can be wired into a WinCC Alarm or shown on a WinCC picture via direct tag entry. For TIA Portal-based RT Professional installations, the equivalent tag interface is documented under “Configuring runtime settings for Process Historian (RT Professional)” in the official Siemens documentation, available at docs.tia.siemens.cloud.
10. Field-Proven Notes and Caveats
- Do not interrupt Phases A–E with project changes. Each Phase must complete before the next is started, otherwise the S&F Cache and the
Processhistorian.cfghandshake can drift further out of sync. - If the system uses WinCC V7.5 or later, the PHReady cache folder layout changes to
PHReadyConfigV2; the procedure above remains valid but the cache folder names differ. Always verify the cache folder naming on a test system before executing on production. - If a third-party backup tool is configured to snapshot
C:\ProgramData\Siemens\SFCachewhile WinCC is running, it can cause partial writes that look identical to the cache-corruption symptom described in section 3. Disable file-level backup of the SFCache path and rely on SQL-level backup of the PH database only. - The Information Server 2014 SP2 add-on is independent of the PH Ready cache. If the Information Server also stops displaying tag trends after the procedure, check the Information Server data source refresh schedule rather than re-running the SFCache procedure.
- Never delete
C:\ProgramData\Siemens\SFCacheitself; only its contents. Deleting the folder itself removes Windows ACL permissions that the WinCC installer restores only on full reinstall. - The two OS servers must be rebooted in Phases A and B — not just WinCC Runtime restarted. The PH Ready service retains file handles into the cache until OS reboot.
Why does Process Historian receive alarms but not tag values after WinCC Project Duplicator transfer?
The alarm write path uses the CCAlgCSData.dll alarm routing which does not depend on the PHReady Cache. The tag-value path writes compressed data into C:\ProgramData\Siemens\SFCache\*Queue folders keyed by Processhistorian.cfg. When Project Duplicator overwrites the project, the running OS keeps the old in-memory mapping, while the standby OS picks up the new mapping. The PH server receives inconsistent writers and discards the tag stream, leaving Tag recovery: Needed in PH Management Console.
What is the correct location of the SFCache folder on Windows for WinCC V7.4 with Process Historian 2014 SP2?
C:\ProgramData\Siemens\SFCache on every OS server. Subfolders ending in Queue are the PHReady Cache; loose *.dat, *.idx, *.hdr files are the S&F Cache. The PHReady Cache and SFCache live in the same parent folder; both must be flushed.
Can I skip the OS server reboot in Phase A and Phase B?
No. The PH Ready service holds open file handles into the PHReady Cache and into Processhistorian.cfg. A WinCC Runtime restart alone does not release those handles. The OS-level reboot is mandatory; otherwise the rename of Processhistorian.cfg to .old will fail with a sharing-violation error on the first attempt.
How long should I wait for Tag recovery to flip from Needed to Not needed after the procedure?
Allow one full PH segment cycle, typically 60 to 120 seconds. If Tag recovery: Needed persists beyond 10 minutes, check the PH Ready component version on both OS servers (section 4, check #1) and confirm the S&F Cache is not being intercepted by antivirus (section 7).
Do I need to stop the Process Historian service during the procedure?
No. The PH server and the OS servers communicate over TCP using the S&F protocol. The PH service must remain Running so that when the OS servers restart with a fresh handshake, they can immediately open a connection. Stopping the PH service only extends the outage.