Resolving Frozen WinCC Archive Trends Caused by Future Timestamps in SIMATIC PCS 7

Resolving Frozen WinCC Archive Trends Caused by Future Timestamps in SIMATIC PCS 7

When WinCC archive trends freeze and hold a static flatline value after the system date was modified (e.g., mistakenly set to a future date like 13/08/2021 and then reset to 01/01/2021), the failure occurs because the WinCC Trend Control interpolates a continuous line between the current point and the future-dated database record. To resolve this, reset the corrupted short-term archive buffers by opening Tag Logging in WinCC Explorer, right-clicking 'Archive configuration', selecting 'TagLogging Fast' -> 'Archive reset', and repeating for 'TagLogging Slow'.

Table of Contents

Executive Summary

A frequent operational disturbance during commissioning or plant clock adjustments in SIMATIC PCS 7 occurs when an engineer manually advances the operating system clock to a future date to test scheduled batch routines or time-based triggers, and subsequently rolls the date back to real time. While real-time tags continue updating, historical archive trends appear completely unresponsive or stuck on a single flat value. This guide explains the mathematical interpolation behavior of the WinCC Online Trend Control, analyzes SQL archive segmentation, and provides step-by-step instructions to clear future records.

Architectural and System Mechanics

WinCC Archive Segmentation and Trend Interpolation Mechanics:

  • Cyclic Archive Segmentation: Microsoft SQL Server in WinCC partitions Tag Logging data into discrete database segments (*.mdf / *.ldf) bounded by StartTime and EndTime.
  • The Future Timestamp Trap: When data is logged while the PC clock is set to a future date, SQL writes rows with timestamps far in advance of actual time. When the clock is reset to the current date, WinCC continues logging new records. However, the database index now spans from the current date all the way to the future date.
  • Trend Control Display Logic: The WinCC Online Trend Control queries the archive for the active viewing time window. When it encounters the future point, it connects the last current data point to the future point using linear interpolation. This produces an apparently frozen, horizontal flatline that refuses to show real-time fluctuations until real-world time catches up to the future timestamp.
  • Fast vs. Slow Logging:
  • TagLogging Fast: Stores cyclic tags with acquisition times <= 1 minute.
  • TagLogging Slow: Stores cyclic tags with acquisition times > 1 minute and acyclic tags.

Step-by-Step Engineering and Implementation Procedure

Step 1: Confirm the Clock Rollback and S7 Time Status

  1. Verify that the Windows operating system date and time on the OS Server are currently set to the correct local time and UTC offset.
  2. Confirm that the automation station (AS) controller clock is synchronized and reporting real-time timestamps (PLC -> 'Set Time of Day').

Step 2: Stop WinCC Graphics Runtime

  1. On the affected WinCC OS station, deactivate Graphics Runtime via WinCC Explorer -> 'Deactivate'.
  2. Wait until all database processes detach cleanly.

Step 3: Perform Tag Logging Archive Resets

  1. Open WinCC Explorer.
  2. In the navigation tree, expand Tag Logging.
  3. Right-click Archive configuration -> select TagLogging Fast -> click Archive reset.
  4. A modal warning appears: 'This action will delete all existing archive data in the short-term buffer. Do you want to continue?'. Click 'Yes'.
  5. Right-click Archive configuration -> select TagLogging Slow -> click Archive reset. Click 'Yes'.

Step 4: Purge Orphaned MDF Files (If Necessary)

  1. In Windows Explorer, navigate to the OS project directory -> ArchiveManager/TagLoggingFast.
  2. Verify that future-dated .mdf and .ldf files are removed. If any remain locked, delete them manually while runtime is stopped.
  3. Check ArchiveManager/TagLoggingSlow as well.

Step 5: Restart WinCC Runtime

  1. Activate WinCC Runtime.
  2. Open the process display containing the trend control.

Verification

To verify trend restoration:
1. Monitor the trend display for 2 to 5 minutes.
2. Verify that the trend curve updates continuously with live process variations.
3. Switch between 'Archive Tag' and 'Online Tag' views; confirm that both display identical current values.
4. Verify in ArchiveManager that newly created .mdf files carry current date stamps.

Limitations and Operational Precautions

Operational precautions:
- Performing an Archive Reset permanently clears all short-term process value history stored on that local server. Ensure any required historical compliance records have been backed up before resetting.
- Never change the date on a production server while chemical batches or safety-critical sequences are active.
- In redundant OS server pairs, perform the archive reset on the standby server first, synchronize, and then repeat on the master server to minimize operator disruption.

Engineer FAQ

Q: Why did the trend show a flat line instead of an error message?

A: WinCC Trend Control treats future timestamps as valid data points and draws a linear interpolation line connecting them to the present.

Q: Will an Archive Reset delete process alarms in Alarm Logging?

A: No. Alarm Logging uses separate database segments (ArchiveManager/AlarmLog) and is unaffected by Tag Logging resets.

Q: Can I delete only the future-dated records without resetting the whole archive?

A: While technically possible using custom SQL scripts, Siemens does not support manual SQL row deletions in WinCC databases as it can corrupt index tables. Archive reset is the certified method.

Q: Does this issue occur on OS Clients?

A: OS Clients read archive data from the OS Server. If the OS Server has future-dated records, all connected OS Clients will display frozen trends.

Q: What is the difference between TagLogging Fast and Slow?

A: TagLogging Fast stores values sampled at 1 minute or less; TagLogging Slow stores values sampled at intervals greater than 1 minute.

Technical References

Related Articles

Related Tags

Tag Logging, Archive Reset, Future Timestamps, Online Trend Control, WinCC Database

20 respuestas