Troubleshooting Missing Historical Alarms from Process Historian in SIMATIC PCS 7 WinCC AlarmControl

Troubleshooting Missing Historical Alarms from Process Historian in SIMATIC PCS 7 WinCC AlarmControl

In SIMATIC PCS 7 systems operating with SIMATIC Process Historian (PH), when historical process tag values load correctly in WinCC OnlineTrendControl past the local 8-week buffer but historical alarms older than 8 weeks fail to appear in WinCC AlarmControl, the fault is caused by incorrect data source selection or unconfigured archive query parameters within the WinCC AlarmControl properties. While WinCC OnlineTrendControl queries historical archive tags seamlessly through its archive provider, the WinCC AlarmControl defaults to reading exclusively from the local short-term circular message buffer unless explicitly configured to query the 'Long-Term Archive / Process Historian' message list with defined SQL filter bounds.

Table of Contents

Process Historian Dual-Archiving Mechanism (Tags vs Alarms)

In SIMATIC PCS 7, short-term and long-term archiving operate in a tiered architecture:
- Local WinCC OS Server: Maintains local circular archives in Microsoft SQL Server. In this specific plant configuration, local Tag Logging and Alarm Logging are configured for an 8-week retention buffer.
- Process Historian (PH): Functions as the central enterprise repository, continuously extracting telemetry via MSMQ and archiving process tags and alarm events permanently into multi-year SQL database segments.

When an operator requests historical records within the 8-week window, the OS Server serves the request from its local database. When requesting records older than 8 weeks, the query must be routed across the terminal bus to the Process Historian server via the OLE-DB / Connectivity provider.

Why OnlineTrendControl Functions While AlarmControl Fails

Engineers are often perplexed why trends display 6-month-old data while the alarm control remains completely empty prior to 8 weeks ago:
- WinCC OnlineTrendControl: Transparently integrates archive tags. When the user pans the time axis backward, the control automatically detects that the requested time range exceeds local segments and dispatches an OLE-DB query to the linked Process Historian.
- WinCC AlarmControl: By default, the AlarmControl operates in Message List mode (active alarms) or Short-Term Archive List mode. The short-term archive list is hardcoded to parse only local SQL message segments (<Project>_ALG_...). It will never query the Process Historian unless the control is placed into Long-Term Archive List mode with historical SQL selection filters active.

Configuring WinCC AlarmControl for Process Historian Queries

To allow operators to view historical alarms older than the local 8-week buffer:

  1. Long-Term Archive Selection: The AlarmControl must be configured with a dedicated tab or toolbar button for the Long-Term Archive List.
  2. Explicit Time Range Filter: Unlike short-term lists that display data cyclically, queries to Process Historian must specify explicit time boundaries (e.g., 'From: 2016-01-01 To: 2016-03-01') to prevent unconstrained SQL queries from overloading the Historian server.
  3. OLE-DB Provider Verification: The Process Historian OLE-DB Provider must be active and registered on the OS Server/Client station.

Diagnostic Matrix for Missing Historical Alarm Records

The table below outlines common failure modes when querying historical alarms:

SymptomProbable CauseCorrective ActionTrends load from PH, alarms blank past 8 wksAlarmControl set to Short-Term Archive listSwitch AlarmControl view to Long-Term Archive listLong-Term Archive list returns SQL errorProcess Historian OLE-DB provider unregisteredRe-register CCPHOledbProvider.dll on WinCC stationQuery hangs indefinitelyQuery time range too broad (> 1 year)Restrict filter to specific date range (e.g., 7-day window)No alarms present on PH serverWinCC PH-Ready failed to transfer alarm segmentsInspect MSMQ queues on WinCC OS Server and PH console

Step-by-Step Configuration: Enabling Long-Term Alarm Retrieval

Follow this procedure in the Graphics Designer on the Engineering Station:

Step 1: Open the Alarm Screen in Graphics Designer

  1. In SIMATIC Manager / WinCC Explorer, open the screen containing the WinCC AlarmControl (@AlarmJournal.pdl or custom alarm picture).
  2. Double-click the WinCC AlarmControl object to open Properties.

Step 2: Configure Archive Data Source

  1. Switch to the General tab.
  2. Under Message Blocks / Lists, ensure the Long-Term Archive List is enabled.
  3. Switch to the Toolbar tab and enable the button:
    - Select Data... (allows operator to set historical date/time filters).
    - Long-Term Archive (switches view to Historian records).

Step 3: Configure Query Bounds

  1. In the Selection tab, configure default query boundaries (e.g., 'Last 3 months' or 'User-defined time period').
  2. Save the .pdl picture and run OS Compilation (or transfer the picture to the OS Servers).

Step 4: Verify Runtime Operation

  1. Activate WinCC Runtime.
  2. Navigate to the Alarm screen and click the Long-Term Archive button.
  3. Set the date filter to 12 weeks ago and click Apply. The AlarmControl retrieves and displays historical alarms directly from Process Historian.

Verification

To confirm that historical alarm retrieval is fully operational:
1. Historical Query Execution: In WinCC Runtime, open the AlarmControl long-term archive view; specify a date range from 12 weeks ago; confirm that alarm rows populate within 5 seconds.
2. Alarm Attribute Parity: Verify that historical alarm rows display valid timestamps, event texts, tag origins, and acknowledge states identical to the original events.
3. PH SQL Query Audit: On the Process Historian server, open SQL Server Profiler; verify that an incoming SELECT query originates from the WinCC OS station during historical alarm retrieval.

Limitations and Operational Precautions

Engineering teams must observe the following precautions:
- Unconstrained queries spanning millions of historical alarms will degrade Process Historian performance and temporarily freeze the WinCC client; always educate operators to query discrete time windows.
- Process Historian requires valid archive licenses; verify that the Process Historian Basic Package license is active in Automation License Manager.
- Always validate final license quantities and MLFBs against the applicable Siemens catalog and authorized distributor quotation when procuring long-term archiving options.

Engineer FAQ

Why does WinCC limit local alarm archives to 8 weeks?

Local circular archives are constrained by hard disk capacity and real-time SQL execution performance. Keeping local archives lean ensures rapid alarm generation during active plant emergencies.

Can operators export historical alarms retrieved from PH to CSV?

Yes. The WinCC AlarmControl toolbar includes an export button ('Export Data') that exports currently displayed historical alarm records directly to CSV or text format.

Does querying Process Historian interrupt ongoing real-time logging?

No. Microsoft SQL Server executes read queries in separate transaction threads, allowing real-time archive writes from WinCC to proceed without interruption.

Technical References

Related Articles

Related Tags

  • Process Historian
  • WinCC AlarmControl
  • Historical Alarms
  • Long-Term Archiving
  • Alarm Logging
6 respuestas