Process Historian Architecture and Store & Forward Recovery Methodology in SIMATIC PCS 7

Process Historian Architecture and Store & Forward Recovery Methodology in SIMATIC PCS 7

In SIMATIC PCS 7, when a Process Historian (PH) suffers database synchronization halts or desynchronization from redundant WinCC OS Servers, long-term archiving freezes. Recovering the connection without permanent data loss requires managing the Store and Forward (S&F) cache and ProcessHistorian.cfg. The verified restoration sequence is: 1) Verify prerequisites: ensure Microsoft Message Queuing (MSMQ) is running, time synchronization is active via NTP, and CCAPHServer has local administrative rights; 2) On the standby OS server, rename ProcessHistorian.cfg to .old, restart the station, activate runtime, and let redundancy synchronize; 3) Repeat on the master OS server; 4) Purge corrupted MSMQ queues from C:\ProgramData\Siemens\SFCache; 5) Restore the original ProcessHistorian.cfg files; and 6) Re-activate runtime to allow automatic S&F recovery of historical archives.

Table of Contents

Executive Summary

In enterprise-level industrial process plants automated with SIMATIC PCS 7, the Process Historian (PH) and Information Server (IS) handle long-term archiving, regulatory compliance reporting, and batch auditing. Following system maintenance, operating system patching, or database resets, engineers frequently encounter situations where the PH plant structure detects only a single OS server, or where historical archive queues freeze completely. This technical guide provides the complete architectural framework for PH-OS communication, details mathematical formulas for sizing TagLogging and AlarmLogging cache volumes, and outlines the step-by-step Store and Forward recovery procedure.

Architecture and Fundamental Mechanics

Process Historian Data Flow and Store & Forward Architecture

+-------------------------------------------------------------------------+
|                        SIMATIC PCS 7 OS Server                          |
|                                                                         |
|   WinCC Tag Logging & Alarm Logging Runtime                             |
|   - Generates process archive values and alarm events                   |
+-----------------------------------|-------------------------------------+
                                    |
                                    v CCAPHServer (PH-Ready)
+-------------------------------------------------------------------------+
|                   Store & Forward (S&F) Local Cache                     |
|                   (C:\ProgramData\Siemens\SFCache)                      |
|                                                                         |
|   MSMQ Queues:                                                          |
|   - AlgCSDataQueue (Alarms)        - TagCSDataQueue (Process Values)    |
|                                                                         |
|   [Normal Link Active]            [Network Interruption / DB Offline]   |
|   -> Real-time streaming to PH     -> Archives buffer locally to disk   |
+-----------------------------------|-------------------------------------+
                                    | MSMQ over TCP Port 1801 / 4224
                                    v
+-------------------------------------------------------------------------+
|                    Siemens Process Historian Server                     |
|                                                                         |
|   - High-Performance Microsoft SQL Server Enterprise Instance           |
|   - Multi-disk storage architecture (Data, Logs, Fast, Slow)            |
|   - Receives, decompresses, and permanently catalogs historical data    |
+-------------------------------------------------------------------------+

Mathematical Principles for Archive Cache Sizing

  1. Alarm Logging Sizing Formula:
    $$\text{Size}_{\text{Alarms}} = \text{MsgRate} \cdot 4000\text{ bytes} \cdot 60\text{ s/min} \cdot 60\text{ min/h} \cdot 24\text{ h/day} \cdot 31\text{ days/mo} \cdot M$$
    At a rate of $1\text{ message/s}$, the memory required for a 2-month local buffering window is approximately $20\text{ GB}$ (daily rate: $\approx 330\text{ MB/day}$).
  2. TagLogging Fast Sizing Formula:
    At a rate of 750 values/second with 16 bytes per value:
    $$\text{Size}_{\text{TL Fast}} = 750 \cdot 16 \cdot 60 \cdot 60 \cdot 24 \cdot 30 \cdot 2 \approx 60\text{ GB (2 months)}$$
  3. TagLogging Slow Sizing Formula:
    At a rate of 100 values/second with 16 bytes per value:
    $$\text{Size}_{\text{TL Slow}} = 100 \cdot 16 \cdot 60 \cdot 60 \cdot 24 \cdot 30 \cdot 2 \approx 8\text{ GB (2 months)}$$

Step-by-Step Implementation Procedure

Step 1: Execute Pre-Check Verification

  1. Confirm that Microsoft Message Queuing (MSMQ) is installed and running on PH and both OS servers.
  2. Confirm that the CCAPHServer service is running under a user account with local administrator rights and membership in SIMATIC HMI.
  3. Test bidirectional hostname resolution via command prompt: ping [OS_Hostname] from PH and ping [PH_Hostname] from OS.
  4. In SIMATIC Manager on the ES, open OS Object Properties and verify that Transfer to external archive server is checked.
  5. Verify that NTP time synchronization is operational, maintaining less than 100 ms time drift between all nodes.

Step 2: Backup Local OS Server Archives

  1. On the standby OS server, open Windows Explorer and locate the WinCC project folder.
  2. Copy the contents of the ArchiveManager directory to an external backup storage medium.
  3. Repeat the backup on the master OS server.
  4. On the Engineering Station, open Tag Logging and Alarm Logging in WinCC Explorer, and extend the maximum segment duration (e.g., from 2 months to 6 months) to provide buffering headroom during recovery.

Step 3: Phased S&F and PH-Ready Reset Procedure

  1. Deactivate WinCC Runtime on the standby OS server.
  2. In the WinCC project directory of the standby server, rename ProcessHistorian.cfg to ProcessHistorian.cfg.old.
  3. Restart the standby OS computer.
  4. Activate WinCC Runtime on the standby OS and wait until redundancy synchronization completes.
  5. Deactivate WinCC Runtime on the master OS server.
  6. In the WinCC project directory of the master server, rename ProcessHistorian.cfg to ProcessHistorian.cfg.old.
  7. Restart the master OS computer and activate runtime.
  8. On both OS servers, navigate to C:\ProgramData\Siemens\SFCache.
  9. Backup and delete all files inside the queue folders (AlgCSDataQueue, TagCSDataQueue).
  10. Rename ProcessHistorian.cfg.old back to ProcessHistorian.cfg on both servers.
  11. Cycle runtime on standby, wait for sync, then cycle runtime on master to restore full redundant archiving.

Step 4: Verify Database Reconstruction and Re-Registration

  1. On the Process Historian server, open Process Historian Management Console.
  2. Click the Update button under Detailed Plant Structure Information.
  3. Verify that both OS servers transition to green active status and that Store and Forward queues on the OS servers begin draining into the historian database.

Verification

  1. Plant Structure Status Check: In the Process Historian Management Console, verify that both redundant OS servers display active green checkmarks.
  2. Queue Draining Inspection: On both OS servers, monitor C:\ProgramData\Siemens\SFCache. Confirm that queue sizes decrease to near zero as buffered transactions are committed.
  3. Historical Data Query Test: In WinCC Information Server or WinCC Trend Control on an OS Client, query an analog tag across the maintenance period. Verify that trend data displays without missing intervals.

Limitations and Operational Precautions

  1. Disk Capacity Watch: S&F caching requires adequate free space on the OS server system drive (typically C:). If disk space falls below 10%, WinCC halts archiving to protect the operating system.
  2. Database Reset Precautions: Using the Database Wizard to recreate the PH database permanently clears all unbacked-up historical plant data; execute only during initial commissioning or after a full database backup.

Engineer FAQ

What is the purpose of the Store & Forward (S&F) cache?

It buffers process values and alarms locally on the OS Server during network interruptions, preventing data loss until the Process Historian reconnects.

Where is the S&F cache located on the OS Server?

In C:\ProgramData\Siemens\SFCache.

What protocol transmits data between OS Servers and PH?

Microsoft Message Queuing (MSMQ) over TCP port 1801 and proprietary Siemens services over TCP port 4224.

Why must time synchronization be configured?

Process Historian rejects incoming archive records if timestamps drift significantly from the PH system clock.

What does CCAPHServer do?

It is the PH-Ready background service that packages WinCC archive data and routes it into the local MSMQ queue.

How do I calculate required disk space for TagLogging Fast?

Multiply archive rate (values/s) by 16 bytes, multiplied by the required retention seconds.

Can I reset the PH connection while the plant is operating?

Yes, by performing the reset sequentially on the standby OS server first, then the master OS server.

What is ProcessHistorian.cfg?

A configuration file in the WinCC project directory that binds the OS server to the specific Process Historian database GUID.

What happens if SFCache is deleted without backup?

Any buffered historical data that was not yet transferred to the PH is permanently lost.

Where can I verify PH software update compatibility?

Check SIOS Entry ID 109780528 for Process Historian and PH-Ready update compatibility matrices.

Technical References

Related Articles

Related Tags

  • Process Historian
  • Store and Forward
  • SFCache
  • TagLogging Fast
  • MSMQ
  • ProcessHistorian.cfg
  • CCAPHServer
20 respuestas