Resolving Stuck Alarms with Corrupted 1980 Timestamps in SIMATIC PCS 7 WinCC

Resolving Stuck Alarms with Corrupted 1980 Timestamps in SIMATIC PCS 7 WinCC

In SIMATIC PCS 7 WinCC operator stations, active alarms that display an invalid 1980 timestamp and remain permanently locked in the alarm list despite equipment running normally and being acknowledged stem from controller clock synchronization lapses or disrupted message state transactions. Year 1980 is the default zero-epoch for S7 controllers; if an ALARM_8P block fires before CPU time-of-day synchronization is established, subsequent outgoing events at current time cannot resolve the original message transaction. Purging the stuck alarm requires resetting the active Alarm Logging runtime cache or removing the orphan record using Microsoft SQL Server Management Studio.

Table of Contents

Root Causes of S7 Year 1980 Message Timestamps

In SIMATIC S7-400 and CPU 410-5H controllers, the standard DATE_AND_TIME (DT) data type initializes to DT#1980-01-01-00:00:00.000 following a power cycle or memory reset. If the controller starts up and processes alarm blocks before the plant master clock (via SICLOCK, central NTP server, or WinCC time synchronization) broadcasts the current date and time, any event generated by an ALARM_8P block receives a timestamp dated January 1, 1980.

A secondary cause occurs in WinCC Bit Messages if a workstation's local Windows clock transiently rolls back to the year 1980 due to CMOS battery failure or incorrect network domain time synchronization policies. The generated message enters the WinCC Alarm Logging database stamped with the year 1980.

Why Corrupted Timestamps Freeze the Alarm State Machine

The WinCC Alarm Logging engine evaluates alarms through a strict finite state machine:
Incoming (I) -> Acknowledged (A) -> Outgoing (O)

To clear an alarm from the active alarm banner (@AlarmActive.pdl), the system must record an Outgoing transition whose timestamp is chronologically subsequent to the Incoming event:
- Timestamp Discontinuity: When the motor or equipment fault clears, the controller sends an Outgoing telegram with the current date (e.g. 2017). Because the incoming event was recorded in 1980 or the internal transaction ID was corrupted during an uncoordinated AS download, the Alarm Logging engine fails to match the outgoing event with the original incoming record.
- Permanent State Lock: The alarm transitions to 'Acknowledged' status but remains tagged as 'Still Present', locking it onto the active alarm screen indefinitely.

Remediation Methods: Cache Reset vs SQL Database Clean-Up

Engineers can resolve the locked alarm through two approved procedures:

  • Method 1: WinCC Runtime Alarm Cache Reset (Non-Destructive):
    1. Deactivate WinCC Runtime on the OS Server.
    2. In the OS project directory, navigate to the ArchiveManager\AlarmLogging folder.
    3. Delete or move the active temporary segment files (files ending in .mdf and .ldf without historical timestamps, or use the WinCC Archive Configuration Tool).
    4. Reactivate WinCC Runtime. WinCC recreates fresh active segments, clearing the orphan 1980 alarm.

  • Method 2: Direct SQL Record Deletion via Management Studio:
    1. Open Microsoft SQL Server Management Studio on the OS Server.
    2. Connect to the local WINCC database instance.
    3. Expand Databases and locate the active Alarm Logging database segment:
    <ComputerName>_<ProjectName>_ALG_<Timestamp>
    4. Open the table dbo.MsArc_Long.
    5. Execute an SQL query to locate and remove the corrupted entry:
    sql DELETE FROM dbo.MsArc_Long WHERE DateTime < '1990-01-01'
    6. In WinCC Graphics Designer, refresh the alarm screen; the stuck record disappears immediately.

Comparison of Alarm Purging and Reset Procedures

The following table compares methods for clearing stuck alarms in WinCC:

Purging TechniqueDowntime RequiredData Loss ImpactComplexityRecommended ApplicationWinCC Runtime Deactivation & Cache Purge5–10 Minutes (Server restart)None (Historical archives intact; resets current alarm list)LowStandard plant maintenance windowDirect SQL Record Deletion (SSMS)Zero Runtime DowntimeDeletes only the corrupted orphan rowHigh (Requires SQL expertise)Live running plants where server shutdown is prohibitedFull OS Project Recompilation & Download15–30 MinutesRe-initializes all tag and message structuresModerateWhen multiple database inconsistencies exist

Warning: Always create a complete project archive prior to modifying SQL tables directly.

Verification

Verify that the stuck alarm is eliminated and time synchronization is robust:
1. In WinCC Runtime, open the active alarm list; verify that the motor shutdown alarm with the 1980 timestamp has vanished.
2. In SIMATIC Manager, right-click the AS CPU and select PLC > Set Time of Day; verify that CPU time matches UTC/Local plant time within milliseconds.
3. Test time-stamped alarm generation: Force a temporary trip on the test drive, acknowledge the alarm, and clear the trip; verify that incoming and outgoing events show current valid timestamps and clear cleanly from the screen.

Limitations and Operational Precautions

Essential operational rules for alarm time synchronization:
- Always configure the AS CPU clock synchronization in HW Config (CPU Properties > Diagnostics/Clock > Synchronization mode: As slave on Industrial Ethernet) to prevent the CPU from running unsynchronized.
- Never use SQL DELETE commands indiscriminately; deleting valid active alarm records can corrupt relational index pointers across the WinCC SQL database.
- If redundant OS servers are utilized, execute the SQL deletion on both Server Master and Server Standby to prevent archive synchronization from restoring the orphan row.

Engineer FAQ

Why did the alarm show a strikethrough across the timestamp?

A strikethrough in WinCC AlarmControl indicates that the timestamp is flagged as invalid or unacknowledged by the system time-master.

Can a dying CMOS battery on the PC cause 1980 timestamps?

Yes. If the PC hardware clock resets to 1980 on boot before the Windows Time service syncs with the domain controller, any local bit message triggered during boot will record the 1980 timestamp.

Does deleting the row in dbo.MsArc_Long delete historical plant data?

No. dbo.MsArc_Long in the active runtime segment only stores active and unacknowledged messages; long-term historical records reside in detached archive segments.

Technical References

Related Articles

Related Tags

  • Alarm Logging
  • Stuck Alarms
  • Timestamp 1980
  • WinCC SQL
  • Time Synchronization
6 respuestas