Resolving One-Hour Alarm Timestamp Offset (UTC vs Local Time) in SIMATIC PCS 7 After Migration

Resolving One-Hour Alarm Timestamp Offset (UTC vs Local Time) in SIMATIC PCS 7 After Migration

A one-hour alarm timestamp offset following migration to SIMATIC PCS 7 V9.0 occurs when the S7-400 controller hardware clock is configured to Local Time instead of Universal Time Coordinated (UTC). In PCS 7, chronological event blocks (ALARM_8P, ALARM_SQ, SFC17/18) stamp alarms directly in the AS using the CPU system clock, which must strictly run on UTC. The WinCC OS receives the UTC timestamp and applies the local operating system time zone and Daylight Saving Time (DST) offset before display. If the CPU clock is erroneously set to Local Time (e.g. UTC+1), WinCC applies the offset twice, displaying alarms one hour in the future. To resolve this, configure the CPU clock to UTC and synchronize it via a central NTP time master.

Table of Contents

PCS 7 Time Synchronization Architecture: S7-400 AS vs WinCC OS

In SIMATIC PCS 7 (including V7, V8, and V9.0), alarm management complies with strict sequence-of-events (SOE) standards requiring sub-millisecond chronological precision. Technological blocks (e.g., MonAnL, PIDConL, MotL) generate process alarms directly within the S7-400 CPU using integrated alarm blocks (ALARM_8P / FB19, ALARM_SQ / SFC17, ALARM_S / SFC18).

The fundamental architectural principle governing PCS 7 time synchronization is:
1. The AS Clock Always Operates in UTC: The hardware clock of every S7-400 CPU (e.g. CPU 410-5H 6ES7410-5HX08-0AB0 or CPU 416-3 PN/DP 6ES7416-3ES07-0AB0) and CP 443-1 (6GK7443-1EX30-0XE0) must be synchronized strictly to Universal Time Coordinated (UTC) without Daylight Saving Time adjustments.
2. WinCC SQL Database Stores UTC: All historical process tags, audit trails, and alarm logs are stored inside Microsoft SQL Server in UTC format.
3. WinCC Client Display Converts to Local Time: The WinCC Alarm Control and Graphics Runtime translate the stored UTC timestamp to the operator workstation's configured local Windows time zone, automatically applying Daylight Saving Time (DST) offsets.

Root Cause of the One-Hour Forward Alarm Timestamp

When migrating legacy systems (such as PCS 7 V6.0 or early STEP 7 installations) to PCS 7 V9.0, commissioning engineers frequently notice that new alarms appear with timestamps exactly one hour ahead of current plant time (e.g., an alarm triggered at 14:00:00 displays as 15:00:00).

This discrepancy occurs through the following mechanism:
- In legacy systems or non-standard configurations, engineers sometimes manually set the S7-400 CPU hardware clock to match plant local wall-clock time (e.g., Central European Time UTC+1).
- When the alarm block (ALARM_8P) triggers, it reads the CPU hardware clock (which is currently 14:00:00) and transmits this numeric value to the WinCC OS Server tagged as UTC.
- WinCC OS processes the incoming alarm, assumes 14:00:00 is UTC, and converts it to local time by adding the workstation's time zone offset (+1 hour for CET). The resulting alarm is displayed as 15:00:00—exactly one hour in the future!

Attempting to fix this by adjusting the Windows client clock or manipulating the PLC clock manually creates continuous synchronization jitter, corrupts historical trend curves, and invalidates chronological event sorting.

Comparison of Time Base Modes in SIMATIC PCS 7 and WinCC

The following table compares the configuration and behavioral impact of time base settings across system components:

ComponentParameter SettingIntended Time StandardConsequence of MisconfigurationS7-400 CPU Hardware ClockSet to UTC via NTP or Plant Bus SyncUTC (No DST shift)If set to Local Time, alarms shifted +1 or +2 hours into futureCP 443-1 Industrial EthernetTime synchronization: NTP mode enabledUTC broadcast from time masterBus communication faults if time packets drift > 60sWinCC Computer PropertiesParameters Tab: 'PLC Time Base' = UTCTreats AS incoming time as UTCIf changed to Local, historical alarms display incorrectly during DST shiftsWinCC Alarm ControlProperty: 'Time Format' = Local TimeDisplays operator local timeIf set to UTC, operators see alarms 1 hour in the pastWindows OS Operating SystemCorrect Time Zone + 'Adjust for DST automatically'Matches plant geographic locationTrend curves show 1-hour gaps or duplicate hours at DST change

Step-by-Step Procedure to Align AS Clock and WinCC Time Synchronization

Follow this procedure to eliminate timestamp offsets and establish standard PCS 7 time synchronization:

  1. Establish Central UTC Time Master:
    - Deploy a central hardware time master (such as a GPS-synchronized SICLOCK TC400, 2XV9450-1AR23) or configure the primary OS Server as the NTP master.
    - Ensure the time source transmits pure UTC time across the Plant Bus and Terminal Bus.

  2. Configure S7-400 CPU Time Synchronization in HW Config:
    - Open HW Config for the S7-400 station.
    - Double-click the CPU to open Object Properties. Navigate to the Diagnostics/Clock tab.
    - Under 'Synchronization in AS', select As Slave.
    - Open Object Properties of the CP 443-1 communication processor. Navigate to the Time-of-Day Synchronization tab.
    - Check Activate NTP time-of-day synchronization. Enter the IP address of your NTP time server (SICLOCK or OS Server).
    - Check Forward time of day to station so the CP synchronizes the CPU backplane clock.
    - Save and compile HW Config, and download to the controller.

  3. Verify WinCC Server Time Parameters:
    - Open the WinCC project in WinCC Explorer on the OS Server.
    - Right-click the computer object and select Properties.
    - Navigate to the Parameters tab.
    - Under 'Time Base for Time Display in Runtime', select Local Time Zone (or verify that 'PLC Time Base' is set to UTC).

  4. Synchronize AS Hardware Clock to UTC:
    - In SIMATIC Manager, select PLC -> Set Time of Day.
    - Verify that the Module Time is set to UTC (do not check 'Take from PG/PC' if the PG is set to local time unless the UTC checkbox is selected).
    - Click Apply to align the hardware clock with the central NTP server.

Verification

Verify accurate timestamping in WinCC Runtime:
1. In SIMATIC Manager, open PLC -> Diagnostic/Setting -> Module Information -> Time System on the S7-400 CPU. Confirm that the clock reports UTC and synchronization status is 'Synchronized'.
2. Trigger a process alarm on a field transmitter or test block in CFC.
3. Observe the WinCC Alarm Logging banner. Confirm that the alarm arrival time (Date / Time) matches the operator station's current local wall-clock time within milliseconds.
4. Inspect historical trend displays in WinCC Tag Logging; confirm that real-time trend pens update at the current time line without leading or lagging by one hour.

Limitations and Operational Precautions

  1. Never Change CPU Clock Backwards During Active Production: Changing the controller or OS clock backwards (e.g. by one hour) causes duplicate timestamps in Microsoft SQL Server archives, leading to database index collisions and missing historical trends. Always perform time adjustments during a planned maintenance window.
  2. Mixed Time Zones on Multi-Clients: In distributed architectures spanning different geographic time zones, all controllers and servers must operate in UTC, while individual OS Clients display alarms adapted to their local regional time zone.
  3. Daylight Saving Time (DST) Transitions: True UTC has no DST transitions. Running the AS clock in UTC guarantees that during the autumn 1-hour fallback transition, no chronological data inversion occurs in the process historian.

Engineer FAQ

Why does changing the PLC clock directly affect the alarm timestamp?

In PCS 7, chronological alarms are generated by ALARM_8P blocks inside the S7-400 CPU. The CPU stamps each alarm event with its internal hardware clock before transmitting the message to WinCC. Therefore, the CPU clock dictates the initial timestamp.

Can I configure WinCC to display alarms in UTC instead of Local Time?

Yes. In WinCC Alarm Control properties, under the 'Message Blocks' or 'Columns' configuration, you can change the format of the Date/Time column from 'Local Time' to 'UTC Time'.

What happens during Daylight Saving Time if the PLC runs on local time?

If the PLC runs on local time, when clocks fall back by one hour in autumn, the PLC will generate timestamps identical to those generated an hour earlier. This causes database primary key collisions and corrupts chronological sequence-of-events analysis.

Technical References

Related Articles

Related Tags

  • Time Synchronization
  • Alarm Timestamp
  • UTC vs Local Time
  • ALARM_8P
  • PCS 7 V9.0
  • SICLOCK TC400
6 respuestas