Fix WinCC V7.4 SP1 Trend Control Archive Tag Display Failures

David Krause16 min read
SiemensTroubleshootingWinCC
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Fix WinCC V7.4 SP1 Trend Control Archive Tag Display Failures

The WinCC Trend Control object in a WinCC V7.4 SP1 runtime is configured to display historical archive values, but the trend window only renders the present (online) value of every connected tag. This symptom typically appears in distributed, redundant WinCC installations where Tag Logging has been running for several weeks or months and where the project path or database structure has been migrated. The archived .mdf and .ldf files are physically present under the ArchiveManager folder, yet no historical data appears in the runtime picture. This reference walks through the underlying archive-segment registration mechanism, the diagnostic queries against the runtime database, the corrective procedures, and the performance constraints imposed by Microsoft SQL Server when running WinCC V7.4 SP1 on Windows Server 2012 R2 with multiple clients.

Scope. This article addresses Simatic WinCC V7.4 SP1 with the Trend Control (Classic) object, configured against the Tag Logging archive. Procedures reference the WinCC Explorer, the WinCC ArchiveManager, and SQL Server Management Studio against the WinCC runtime database. Update 6 for WinCC V7.4 SP1 is recommended and may be required on installations that exhibit archive-segment registration corruption.

1. Problem Statement and Reference Architecture

The reference installation in this troubleshooting procedure uses the following configuration:

Component Specification
HMI Software SIMATIC WinCC V7.4 SP1 (Build 7.4.1.x)
Server Pair 2 × WinCC Server, Master / Standby redundancy
Server OS Windows Server 2012 R2 (x64)
Clients 9 × Windows 7 Professional 64-bit
Archive Path \<Server>\<Project>\ArchiveManager\
Archive Subfolders AlarmLogging, TagLoggingFast, TagLoggingSlow
Trend Object WinCC OnlineTrendControl (Classic)
Trend Data Source 1 — Archive tags (Tag Logging)
Archive Storage Location Hard disk (configured in Tag Logging)

The Trend Control picture opens, the configured archive tags are bound to trend curves, the curves draw in the trend window, but the time axis only contains the current instant — historical data is not displayed even though the project clearly has accumulated archive segments.

2. WinCC V7.4 SP1 Archive System Architecture

WinCC Tag Logging stores process values into a hierarchy of files managed by the WinCC ArchiveManager service. The three top-level categories are:

  • TagLoggingFast — process values with sub-second acquisition cycles, written into the Fast archive segment.
  • TagLoggingSlow — process values with acquisition cycles of one second or longer, written into the Slow archive segment.
  • AlarmLogging — message and alarm events, not relevant to the trend display issue.

Each category is implemented as a Microsoft SQL Server database. By default the databases are split into segments named:

<Computername>_<Projektname>_TLG_F_<TimeFrom>_<TimeTo>
<Computername>_<Projektname>_TLG_S_<TimeFrom>_<TimeTo>

where F denotes the Fast archive and S denotes the Slow archive. The segment boundaries are determined by the configured "Time of the segment change" property in the Tag Logging editor. When a new segment is created, two physical files are produced:

  • <SegmentName>.mdf — primary data file
  • <SegmentName>.ldf — transaction log file

Additionally, the project directory contains two template files used as the seed for new segments:

  • <Projektname>TLG.mdf
  • <Projektname>TLG.ldf

If the template files are missing or corrupt, WinCC can still start the runtime, but the new segment creation can fail silently and the archive engine may stop registering additional values.

Archive registration model. The existence of .mdf/.ldf files on disk is not sufficient for the trend to display historical data. The archive segment must also be registered inside the WinCC runtime database in the table dbo.AMT (Archive Management Table). The trend control queries dbo.AMT to enumerate the valid archive segments; any .mdf/.ldf pair that is not listed in dbo.AMT is invisible to the runtime query layer.

3. Root Cause Analysis

Five distinct root causes have been observed on WinCC V7.4 SP1 installations where the trend control only renders current values:

ID Root Cause Diagnostic Indicator
RC-1 Archive segments exist on disk but are not registered in dbo.AMT SQL query against dbo.AMT returns fewer rows than the number of .mdf files on disk
RC-2 Template database <Projektname>TLG.mdf/ldf is corrupt New tag logging values are not stored after WinCC restart
RC-3 Trend control is bound to Online Tags instead of Archive Tags Trend curves update live but historical time range is empty
RC-4 Excessive number of single segments attached to SQL Server SQL Server response time degrades; archive engine stops writing
RC-5 Time synchronization via System Bus corrupts tag acquisition timestamps S7 Protocol Suite tags stop archiving while Modbus/TCP tags continue

The first three causes account for the majority of cases. The fourth cause manifests as a performance problem that eventually produces a data-management error. The fifth cause is specific to installations with both S7 Protocol Suite and Modbus/TCP channels and a redundant server pair where the System Bus time-synchronization setting has been enabled on the OS level.

3.1 How Archive Registration Works

When the WinCC runtime starts, the Tag Logging service enumerates the files inside \ArchiveManager\TagLoggingFast and \ArchiveManager\TagLoggingSlow and attempts to attach each .mdf/.ldf pair as a SQL Server database. The successful attachment writes one row per segment into dbo.AMT. Failed attachments (corrupt files, version mismatch, missing LDF) are silently skipped and the segment remains "orphaned" on disk.

If the runtime is running and a new segment file is dropped directly into the ArchiveManager subfolder, the runtime will not auto-register it. The runtime only registers files that are placed into the CommonArchiving folder of the local server, not the per-category subfolders. This is the single most common cause of the symptom described in this article.

4. Pre-Diagnosis Checklist

Before opening SQL Server Management Studio or moving files, verify the following configuration items in WinCC Explorer on the active server:

  1. Open Tag Logging → select the affected archive tag → PropertiesArchive tab. Confirm:
    • Archive = activated
    • Storage location = Hard disk (not "Main memory")
    • Acquisition cycle matches the expected resolution
  2. Open the Trend Control configuration → Data source property. Confirm the value is 1 - Archive tags and not 0 - Online tags.
  3. Open ComputerPropertiesArchive tab. Confirm the configured path of the archive matches the actual project path.
  4. Check the segment change time. If Time of the segment change is set in the past, WinCC will immediately rotate to a new segment on startup and leave the previous one as an orphan.
  5. Check the Windows Event Viewer (Application log) for SQL Server errors and WinCC ArchiveManager errors with Event IDs 10100, 10102, 10110.
Trend Data Source reference. The Trend Control offers three data sources: 0 - Online tags (live values only), 1 - Archive tags (values from the Tag Logging archive), and 2 - Online tags with swap. Source 1 is mandatory for any historical trend display.

5. Diagnostic Procedure — Inspecting the Runtime Database

The runtime database can be inspected with SQL Server Management Studio. Connect to the WinCC runtime instance (default instance name is the local computer name, e.g. WINCCSERVER\WINCC) using Windows authentication.

5.1 List registered archive segments

USE [CC_<Computername>_<Projektname>_R]
GO
SELECT [Id], [SegmentName], [Type], [TimeFrom], [TimeTo], [State]
FROM dbo.AMT
ORDER BY [TimeFrom] DESC;
GO

The result set should contain one row per archive segment currently attached to SQL Server. Compare the count of rows against the count of .mdf files inside \ArchiveManager\TagLoggingFast and \ArchiveManager\TagLoggingSlow. A discrepancy confirms root cause RC-1.

5.2 Verify values exist in a specific segment

USE [<Computername>_<Projektname>_TLG_S_20171221_20180121]
GO
SELECT TOP 100 [Id], [ValueName], [TimeStamp], [RealValue]
FROM dbo.Archive
ORDER BY [TimeStamp] DESC;
GO

This query lists the most recent values stored in the named Slow archive segment. An empty result set means the segment exists but no values have been written to it for the affected tag.

5.3 Determine whether the tag has compressed entries

USE [<Computername>_<Projektname>_TLG_S_20171221_20180121]
GO
SELECT a.[ValueName], c.[Id], c.[TimeBegin], c.[TimeEnd]
FROM dbo.Archive a
INNER JOIN dbo.TagCompressed c ON c.[ArchiveId] = a.[Id]
WHERE a.[ValueName] LIKE '%<TagName>%';
GO

If dbo.TagCompressed contains rows but dbo.Archive shows no values in the trend time range, the archive engine has compressed the values out of the live window. Check the configured compression cycle versus the trend time range.

6. Solution 1 — Register Archive Segments via CommonArchiving

This procedure addresses root cause RC-1 (segments orphaned on disk). Perform the actions on the active WinCC server only, with the WinCC runtime running.

  1. Open Windows Explorer on the active WinCC server.
  2. Navigate to the project archive path, e.g. \<Projektpfad>\ArchiveManager\.
  3. Identify the three subfolders: AlarmLogging, TagLoggingFast, TagLoggingSlow.
  4. For each .mdf/.ldf pair inside TagLoggingFast and TagLoggingSlow that is not registered in dbo.AMT, copy the pair (both files) into the runtime folder:
    \<Projektpfad>\ArchiveManager\CommonArchiving\
  5. The WinCC ArchiveManager service will detect the new files within a few seconds and write the corresponding row into dbo.AMT. The runtime attaches the segment as a SQL Server database.
  6. Verify with the diagnostic query from section 5.1 that the segment count has increased by the expected number.
  7. Reload the picture with the Trend Control. Historical data should now appear.
Do not move the original files. Copy them. The original files remain the source of truth; the CommonArchiving copy is what the runtime will register. After successful registration the copies can be deleted from CommonArchiving if desired, but the originals must stay in place.

7. Solution 2 — Rebuild the Template Database

This procedure addresses root cause RC-2 (corrupt <Projektname>TLG.mdf/.ldf template). Stop the runtime before performing these actions.

  1. Close WinCC Explorer on the active server.
  2. Stop the WinCC Runtime on both servers (active and standby).
  3. Open the project directory and delete the following files:
    • <Projektname>TLG.mdf
    • <Projektname>TLG.ldf
    • All files matching the pattern <Projektname>.dc* (these are DataCycle cache files)
  4. Restart the WinCC Runtime. The template database will be re-created from the project configuration.
  5. Verify with the diagnostic query from section 5.1 that dbo.AMT now contains rows for newly created segments.
  6. Wait one full segment-change cycle (configured value, typically one day, one week, or one month) and confirm new values are written.
Redundancy warning. If a redundant server pair is in use, perform the template rebuild on the standby server first, allow it to come back online, then repeat on the active server during a controlled failover window. Otherwise the archive engine may complain about a duplicate database on the partner server.

8. Solution 3 — Apply WinCC V7.4 SP1 Update 6

Siemens has released Update 6 for WinCC V7.4 SP1 which contains archive-engine fixes. The entry ID is 109757608 on the Siemens Industry Online Support portal:

Procedure:

  1. Download the update package from the Siemens support portal.
  2. Stop the WinCC Runtime on both servers.
  3. Run the setup on the active server. The installer will detect the existing V7.4 SP1 installation and apply the patch.
  4. Reboot the active server.
  5. Fail over to the standby server and apply the patch on the standby server.
  6. Restart both runtimes and verify archive registration using the diagnostic query from section 5.1.
Compatibility. Update 6 for WinCC V7.4 SP1 is a cumulative update and supersedes all prior updates for V7.4 SP1. Apply on both the master and standby servers and verify that the WinCC Explorer version (Help → About) reports 7.4.1.6 or higher.

9. SQL Server Performance Constraints

WinCC attaches each archive segment as a separate SQL Server database. Microsoft SQL Server Express, Standard, and Enterprise all have documented limits on the number of databases that can be attached to a single instance without performance degradation. Siemens has documented a practical upper bound of 200 single elements connected to the WinCC SQL Server in the context of PCS 7 — see:

The 200-element count covers the combined total of:

  • Tag Logging Fast segments
  • Tag Logging Slow segments
  • Alarm Logging segments
  • User Archive tables and templates

When the count exceeds approximately 200, the SQL Server response time begins to climb measurably. When it exceeds roughly 400, archive writes can stall and the WinCC ArchiveManager logs Event ID 10102 ("Database is full" or "Timeout occurred") in the Windows Application log. The symptom seen by the operator is that the trend control displays only the current value because no new values are written to the segment, and the segment rotation logic cannot complete.

9.1 Reducing the Segment Count

Configuration Lever Effect on Segment Count
Increase segment-change interval from daily to weekly Reduces segment count by 7×
Increase segment-change interval from weekly to monthly Reduces segment count by ~4×
Reduce the configured archive retention time (Time period of all segments) Limits how many segments coexist
Enable archive backup and move closed segments to backup path Removes closed segments from the live database

9.2 Archive Sizing Reference Configuration

A practical archive configuration for a nine-client, two-server WinCC V7.4 SP1 installation is:

Property Recommended Value
Storage location Hard disk
Time period of all segments 1 month (configurable to 3 months if disk permits)
Max size of all segments 1000 MB per archive category (Fast and Slow)
Time of segment change Aligned with shift boundary (e.g. Monday 00:00 for weekly)
Signing activated Optional; enable only for regulated environments
Activate backup Recommended; route to NAS path
Trend Control Data source 1 - Archive tags

10. S7 Protocol Suite Time-Synchronization Edge Case

A specific failure mode appears on installations that combine an S7 Protocol Suite channel and a Modbus/TCP channel on the same WinCC server pair. After enabling Time Synchronization via System Bus on the WinCC computer properties and downloading the configuration to both servers, the S7 Protocol Suite tags stop archiving while the Modbus/TCP tags continue to archive normally.

Root cause: the System Bus time-synchronization driver can produce timestamp discontinuities if the System Bus master clock and the local server clock drift beyond the configured tolerance. The S7 Protocol Suite applies a stricter timestamp validation than the Modbus/TCP channel, so values that arrive with a non-monotonic timestamp are dropped silently by the archive engine.

Resolution procedure:

  1. Open WinCC Explorer on the active server.
  2. Open ComputerPropertiesTime Synchronization tab.
  3. Disable Time Synchronization via System Bus if the requirement is purely OS-level time sync. Use Windows Time Service (w32time) pointing at a domain controller or an NTP source instead.
  4. If System Bus time sync is mandatory, verify that the System Bus master clock has a stable, battery-backed time source.
  5. Reset the WinCC Tag Logging and Alarm Logging as described in section 7.
  6. Restart the WinCC Runtime on both servers.
  7. Verify that both S7 Protocol Suite tags and Modbus/TCP tags accumulate values in the Slow archive.

11. Verification Procedure

After applying any of the corrective actions above, run the following verification sequence:

  1. Segment registration count: re-execute the diagnostic query from section 5.1 and confirm the row count matches the file count on disk.
  2. Value presence: re-execute the diagnostic query from section 5.2 against the most recent segment and confirm rows are returned for each configured archive tag.
  3. Trend Control render: open the trend picture in runtime. Drag the time-axis slider back by 24 hours. Confirm historical curves render.
  4. Alarm logging integrity: open the alarm picture and confirm historical alarms are still displayed (the corrective actions should not have touched the Alarm Logging path, but verify nonetheless).
  5. SQL Server error log: open SQL Server Management Studio → Management → SQL Server Logs and confirm no archive-related errors have been logged since the corrective action.
  6. Performance check: open Task Manager on the active server and confirm that the SQL Server process is not consuming more than 25 % CPU on a sustained basis.

12. Troubleshooting Matrix

Symptom Likely Root Cause Section Reference Resolution Path
Trend shows only present value, archive files visible in ArchiveManager RC-1: orphan segments §6 Copy .mdf/.ldf into CommonArchiving
Trend shows only present value, no new values written after WinCC restart RC-2: corrupt template DB §7 Delete <Projektname>TLG.mdf/ldf and .dc* files
Trend updates live but historical time range is empty RC-3: Trend Data Source misconfigured §4 Set Trend Data Source to 1 — Archive tags
SQL Server response time degrades over weeks RC-4: segment count exceeds 200 §9 Increase segment-change interval, enable backup
S7 tags stop archiving after time-sync change RC-5: System Bus timestamp discontinuity §10 Switch to Windows Time Service, reset Tag Logging
Archive event ID 10102 in Windows Application log RC-2 or RC-4 §7 / §9 Rebuild template DB; reduce segment count
Archive event ID 10110 in Windows Application log RC-1 §6 Re-register segments via CommonArchiving

13. Preventive Best Practices

  • Always restart WinCC Runtime with the project closed in WinCC Explorer. Restarting only the runtime service while the project remains open in the editor can leave the template database in an inconsistent state.
  • Standardize the segment-change time across the project. Avoid setting the segment-change time in the past; WinCC will immediately rotate to a new segment on startup and the previous segment becomes an orphan.
  • Enable archive backup to a network share. The backup routine moves closed segments to the backup path and detaches them from the live SQL Server instance, which keeps the segment count within the 200-element practical limit.
  • Apply Update 6 for WinCC V7.4 SP1. The update contains archive-engine fixes that resolve several orphan-segment scenarios that cannot be recovered by the CommonArchiving workaround alone.
  • Document the WinCC build number. Record the build number from WinCC Explorer → Help → About on every server. This accelerates Siemens support requests and KB article matching.
  • Monitor the ArchiveManager folder size weekly. A sudden jump in folder size after a Windows update or a domain-controller time change is an early indicator of the timestamp-discontinuity issue described in section 10.
  • Test the failover. After any archive-engine corrective action, fail over to the standby server and confirm that the trend picture on the standby renders the same historical data. The redundancy replication path can mask archive registration issues on the active server.
Additional reference. For Trend Control (RT Unified) in TIA Portal / WinCC Unified V20, see the official configuration guide at Trend control (RT Unified) — TIA Portal V20 documentation. For WinCC V7.4 operating procedures including the Online Trend Control toolbar, see the Working with WinCC manual at WinCC V7.4: Working with WinCC — Entry ID 109736220.

FAQ

Why does the WinCC Trend Control only show the current value of my tags?

The Trend Control is most likely bound to the Online Tags data source instead of the Archive Tags data source, or the archive segments on disk are not registered in the runtime database table dbo.AMT. Verify the Trend Data Source property is set to 1 - Archive tags and run the dbo.AMT diagnostic query to confirm the segment count matches the number of .mdf files on disk.

How do I re-register orphaned archive segments in WinCC V7.4 SP1?

With the WinCC Runtime running, copy the orphaned .mdf/.ldf pair from \ArchiveManager\TagLoggingFast or \ArchiveManager\TagLoggingSlow into \ArchiveManager\CommonArchiving. The ArchiveManager service registers the new database in dbo.AMT within seconds; do not move the originals.

How many archive segments can a WinCC V7.4 SP1 SQL Server attach without performance issues?

Siemens documents a practical limit of about 200 single elements (Fast segments + Slow segments + Alarm Logging segments + User Archive tables) per SQL Server instance on PCS 7; the same guidance applies to WinCC V7.4 SP1. Above roughly 400 segments the SQL Server response time degrades sharply and archive writes can stall.

What does WinCC Update 6 for V7.4 SP1 fix in the archive engine?

Update 6 (Siemens Entry ID 109757608) includes archive-engine patches that resolve several orphan-segment scenarios and timestamp-validation issues. Apply on both the master and standby servers, reboot, then run the dbo.AMT diagnostic query to confirm registration.

Why did my S7 Protocol Suite tags stop archiving after enabling System Bus time synchronization?

System Bus time sync can produce timestamp discontinuities when the bus master clock drifts. The S7 Protocol Suite applies stricter timestamp validation than the Modbus/TCP channel and drops values with non-monotonic timestamps silently. Switch to Windows Time Service pointing at an NTP source, reset the WinCC Tag Logging, and restart the Runtime on both servers.

Back to blog