Calculating WinCC Pending Alarm Count: Filters, Locks, Archive Reload
1. Overview
The "Pending" indicator in the status bar of a WinCC Alarm Control (Classic V7 / V7.5 and WinCC Unified V17 onward) is one of the most frequent sources of confusion in operator HMIs. Operators and engineers often report that the status bar counter does not match the visible row count in the alarm list, that messages appear "stuck" after a WinCC server reboot, or that the counter grows even when filters are applied.
This reference explains the exact counting logic, the role of the Alarmlogging editor, the effects of filters and message locks, the archive-reload behavior after power failure, and how to verify and reset stranded pending states. It covers both WinCC V7 (Classic) and WinCC Unified V20 (TIA Portal V20) so that migration projects retain consistent alarm presentation.
2. Prerequisites
- WinCC V7.0 SP3 or later (Classic) or WinCC Unified V17 / V18 / V19 / V20 (TIA Portal).
- WinCC Explorer / TIA Portal with the project file open in the engineering station.
- User rights to edit the Alarmlogging editor (Classic) or HMI alarm configuration (Unified).
- Read access to the message archive database (
*.LDF/*.MDFfor Classic; SQLite*.dbfor Unified Runtime). - Optional: WinCC / TIA Portal documentation set installed locally or reachable via Siemens Industry Online Support.
3. How the "Pending" Counter Is Calculated
In WinCC Alarm Control (Classic V7 and the WinCC Unified alarm control), the status bar exposes up to four counters, configured through the control's Status Bar properties:
| Counter Label | Definition | Source |
|---|---|---|
| Pending | All unacknowledged, quittable messages — both currently shown in the active view and hidden behind filters/locks. | In-RAM message frame + archive (if reload active) |
| Not acknowledged | Subset of "Pending" that require operator acknowledgment for the configured alarm class. | Alarm class property Needs Acknowledgment |
| Displayed | Number of rows visible in the currently filtered view. | Result set of active selections |
| Locked | Messages for which the operator has disabled further triggering (comment "locked"). | Message Lock list (Classic) / Lock list (Unified) |
Counting rule (per Siemens WinCC manual, SIMATIC HMI WinCC V7.5 documentation): the pending counter equals the count of all messages currently in the system that carry the state Pending = ON and that belong to at least one alarm class flagged as acknowledgment-capable. Filters, selection lists, and lock states do not remove a message from the underlying pending pool — they merely hide it from the operator view.
MSG_COUNT() style scripts and the visible status bar.4. Filter, Selection, and Lock Behavior
The following WinCC control properties influence which messages are displayed, but they do NOT change which messages are counted as pending:
| Feature | Effect on Display | Effect on "Pending" Counter |
|---|---|---|
| Selection (time range, server prefix) | Hides rows outside the filter | No change — counter still includes hidden rows |
| Message class filter | Shows only selected classes | No change — all quittable classes still counted |
| Priority range | Limits rows by priority field | No change |
| Lock list (operator lock) | Suppresses single messages or groups | No change — locked messages are still pending until acknowledged |
| Acknowledge button | Clears the Pending bit for selected rows | Counter decreases by acknowledged rows |
| Hide Ack'd messages option | Hides acknowledged rows from view | No effect — already removed from pending pool |
This explains the question seen on the WinCC engineering floor: "the actually displayed rows are fewer than the pending counter". The "hidden" rows remain in the pending pool until acknowledged, are removed via Hide Acknowledged Messages in the Alarm Control properties, or are archived out by the runtime message wheel.
5. Archive Reload After Power Failure
Classic WinCC V7 introduced a property called "Reload after power failure" in the Alarmlogging Editor. When enabled, on a WinCC Server restart the runtime reconnects to the message archive and re-imports historic rows whose Pending state was 1 at the time of shutdown.
| Setting | Location (Classic V7) | Behavior |
|---|---|---|
| Reload after power failure = ON | Alarmlogging Editor → Message wheel properties → Alarmlogging tab | Pending bit is restored from archive; rows reappear in runtime after server boot |
| Reload after power failure = OFF | Same path | Pending state is lost on power failure; counter starts at zero after restart |
On a Unified runtime (V17+), the equivalent behavior is controlled by the Alarms - archived and Alarms - history settings in the alarm control configuration (see Configuring the alarm control (RT Unified)).
6. Why Messages Stay "Stuck" Pending
The "stuck pending" symptom has three principal causes. Diagnose each before applying a workaround.
| Cause | Indicator | Diagnostic Path |
|---|---|---|
| Archive reload active; PLC trigger was masked during downtime | Strikethrough timestamp on rows that returned from disk after reboot | Alarmlogging Editor → Reload after power failure |
| Held locks / active selections in the Alarm Control | Pending counter > visible row count | Open Alarm Control → Selection dialog, clear all selections |
| Multiple HMI stations | One station shows old pending count, another shows current | Verify project consistency, redeploy alarm configuration |
6.1 Step-by-Step: Clearing Stranded Pendings
- Open the WinCC Explorer on the server hosting the Alarm Control.
- Open the affected picture and double-click the Alarm Control to launch the WinCC Alarm Control configuration dialog.
- Under Toolbar, click "Selections" and remove every active selection, time range filter, and message-class filter.
- Click Locks and clear every active lock entry (operator lock list).
- Click Acknowledge visible to mark all currently visible rows as acknowledged. Acknowledged rows exit the pending pool and the status bar counter drops by their quantity.
- For rows still pending because they originated from a PLC trigger that has since cleared, use Acknowledge all with administrator rights. In WinCC V7.5 this requires
@Alarm_AcknowledgeAllscript action or the equivalent DCS user right. - If a strikethrough row remains, open the Alarmlogging Editor and either disable Reload after power failure for the affected message wheel, or accept the strikethrough as a documented behavior and provide operators an Acknowledge hotkey.
7. WinCC Unified (TIA V20) Alarm Control
WinCC Unified takes the same pending concept and exposes finer-grained configuration objects. The two settings that map directly to the V7 behavior are:
- Miscellaneous → Alarms - current — selection list of message classes that count toward the pending counter. By default, all classes that support acknowledgment are included. See Configuring the alarm control (RT Unified).
- Miscellaneous → Alarms - pending — which subset of the current alarms is to be acknowledged as pending events. See Acknowledging alarms (RT Unified).
Unified also introduces a per-class visibility flag and a server-side PendingHidden attribute referenced in TIA Openness V20. A pending alarm whose alarm class is set to Hidden in the HMI device configuration is removed from both the visible result set and the pending count.
7.1 Unified Status Bar Configuration
- In TIA Portal, open the Unified HMI device and switch to Rt Alarm Control under the screen tree.
- Open Properties → Status bar.
- Tick Pending, Not Acknowledged, Displayed, and Locked as needed.
- Under Miscellaneous → Alarms - current, choose All or restrict to a class group.
- Under Miscellaneous → Alarms - pending, confirm whether only "alarm" classes or additionally "warning" classes contribute to the count. This is project-specific.
8. Key Configuration Parameters (Classic V7 vs Unified V20)
| Setting | WinCC V7 (Classic) | WinCC Unified V20 |
|---|---|---|
| Pending counter toggle | Control properties → Status bar → Pending | Properties → Status bar → Pending |
| Archive reload | Alarmlogging Editor → Reload after power failure | Alarms - archived selection list |
| Lock list | Alarm Control toolbar → Locks | Locks sub-object under HMI alarms |
| Ack class definition | Alarm class → Acknowledgment required | Alarm class → Needs acknowledgment |
| Strikethrough timestamp | Yes, when archive reload active | Yes, when reloaded from history DB |
| Hide acknowledged option | Control properties → Acknowledged messages → Hide | Alarm control → Acknowledged = filter off |
9. Diagnostic Script Examples
WinCC V7 supports VBScript on the Alarm Control to introspect the live state. The following illustrative function returns the total pending count for the active control, useful for cross-checking against the status bar:
' WinCC V7 VBScript - reads pending count via underlying Alarm OCX
Function GetPendingCount(objAlarmControl)
Dim count, i, msgStates
count = 0
' HMIRuntime.Alarm object exposes the internal message list
For i = 1 To objAlarmControl.MsgCount
If objAlarmControl.MsgState(i) = &H00000001 Then ' 0x01 = Pending bit
count = count + 1
End If
Next
GetPendingCount = count
End Function
' Typical call from a button:
' MsgBox "Pending: " & GetPendingCount(ScreenItems("AlarmControl_1"))
On Unified V20, the same data is exposed through the IHmiAlarm JavaScript API. Iterate Screen.Items('AlarmControl_1').ProcessValues and read the State bitmask for each row; bit 0x01 again represents "Pending".
0x01 for "Pending" are part of the WinCC alarm message-state bitmask documented in the WinCC V7.5 manual (function reference → Alarm Control → State bits). Always confirm against the documentation set installed with your specific build before committing to a script.10. Verification
After any change to filters, locks, or archive settings, verify the pending counter as follows:
- Open the runtime picture containing the Alarm Control.
- Read the Pending and Displayed values from the status bar.
- Remove all selections and all locks.
- Acknowledge every visible row.
- Confirm that Pending = 0 AND Displayed = 0. If they differ, run the diagnostic script from Section 9 and capture the script output for trending.
- Reboot the WinCC server with archive-reload enabled. Confirm that historical pending rows return with strikethrough timestamps and that Pending reflects the recovered count.
- Cross-check with the archived values via WinCC Archive Viewer or
SQL> SELECT COUNT(*) FROM ALGV_VF_BLOB_DATA WHERE STATE & 1 = 1(Classic, MS SQL backend).
11. Common Pitfalls
- Mixing filters and counts. Operators may believe that switching off a filter "creates" pending alarms. The alarms were already pending; they were simply hidden.
- Non-quittable alarm classes. PLC-driven status messages (e.g., class "Status") set the pending bit but the Alarm Control excludes them from the counter unless the class is configured as Acknowledgment-capable.
- Multiple servers. In a redundant WinCC server pair the pending count is per server. If the project only displays one server's control, the count represents that server's view, not the plant-wide total.
- Strikethrough rows after archive reload. Clear them with Acknowledge all once power is restored or accept them as historical recoveries.
- Misconfigured message wheels. If the alarm archive wheel is shorter than the running time of the process, the archive may evict pending rows before they are acknowledged. Extend the AlarmLogging archive retention period in the Alarmlogging Editor.
12. Field-Commissioning Checklist
- Define, on paper, the alarm classes that count toward Pending for the operator view.
- Decide whether Reload after power failure (V7) / Alarms - archived (Unified) is required. For 24/7 plants without UPS-backed servers, leaving it off avoids revived pendings.
- Configure Alarm Control status bar with Pending, Displayed, Locked, and Not acknowledged.
- Provide operators a documented acknowledgment procedure covering filters, locks, and strikethrough rows.
- Add an event-triggered script that logs the pending count once per minute to an internal tag for historical trending.
Frequently Asked Questions
Why does the WinCC alarm status bar show more "Pending" alarms than visible rows?
The counter includes every unacknowledged quittable message in the runtime, including rows hidden by selection filters, time-range filters, message-class filters, and operator locks. Remove the filters in the Alarm Control toolbar and re-check the value.
What causes WinCC alarms to display with a strikethrough (lined-out) timestamp?
Strikethrough rows are reloaded from the alarm archive after a server power failure when Reload after power failure is enabled in the Alarmlogging Editor (V7) or the equivalent Alarms - archived setting (Unified). Acknowledge them once power is stable, or disable archive reload if strikethrough is unwanted.
Does rebooting the WinCC Server or the PLC clear stranded pending alarms?
No. With Reload after power failure active, WinCC reads the archive and restores pending bits on every restart. To clear them, remove all filters and locks, then use Acknowledge visible or Acknowledge all in the Alarm Control.
Are non-quittable (status) messages included in the pending count?
No. Only messages belonging to alarm classes flagged as Acknowledgment-capable (or Needs acknowledgment in Unified) contribute to the pending counter. Pure status messages are excluded.
How do I configure the pending counter in WinCC Unified V20 (TIA Portal)?
Open the HMI device → Alarm Control → Properties → Status bar, tick Pending, and define which alarm classes qualify under Miscellaneous → Alarms - current. See the Siemens documentation — Configuring the alarm control (RT Unified).