WinCC 7.4 SP1 Tag Logging Skips Unchanged Archives: VONCHANGE Fix

David Krause17 min read
SCADA ConfigurationSiemensTroubleshooting
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

WinCC 7.4 SP1 Tag Logging Skips Unchanged Archives: VONCHANGE Fix

Problem Description

Tag logging in a WinCC V7.4 SP1 Update 12 project fails to insert a new archive record during a cyclic archive interval whenever the process value of the tag has not changed since the last archive event. The Tag Logging editor displays the archiving method as Cyclic Continuous for the affected tag, the cycle value matches neighboring tags that archive correctly, and the runtime connection is healthy. The symptom is selective: only specific tag groups (or individual tags) exhibit the skip behavior while neighboring tags in the same archive container archive normally under identical conditions.

The behavior is consistent with the runtime treating the affected tags as archive on change even though the editor reports them as cyclic. The trigger condition for a new archive record is never satisfied when the value remains constant, and the runtime then suppresses the cyclic record entirely.

Symptom Summary

  • Archive gaps appear in the Tag Logging runtime database for tags whose value is constant between two archive events.
  • The cyclic archive trigger does not fire on the next cycle when the process value is unchanged.
  • The Tag Logging editor shows Cyclic Continuous for the affected tag with no visible error or warning.
  • The issue can manifest for a single tag, a tag group, or several tag groups inside the same WinCC project.
  • Value changes above the process noise floor do produce an archive record, confirming that the channel, connection, and trigger logic are otherwise healthy.
  • Generated reports and trend views show horizontal flat lines with no intermediate archive samples.

Operational Impact

  • Loss of trend history resolution in WinCC Online Trend Control, WinCC Online Table Control, and WinCC Function Trend Control.
  • Missing samples in the archive database lead to incorrect average, minimum, and maximum calculations when the process is held constant.
  • Time-based reports (Excel, PDF, print job) print with empty rows or compressed time stamps.
  • Audit trail gaps if the tag logging database is the system of record for a regulated process.
  • False positives in condition monitoring that depends on regular sample arrival to detect stuck or frozen signals.

Root Cause Analysis

The issue is a known configuration inconsistency in the WinCC project configuration database. The Tag Logging editor reads and writes a subset of fields in the project database, but the runtime uses an internal switch column called VONCHANGE in the dbo.PDE#TAGs table to decide whether a tag archives cyclically or on value change. The two representations can drift out of sync.

The expected value of VONCHANGE for a tag configured with Cyclic Continuous archiving is 0. In the affected projects, the runtime reads a value of 2, which corresponds to the archive on change method. The editor cannot be used to inspect this value, and a fresh save of the tag in the editor does not always correct it. The column is therefore considered an internal control field and is not part of the user-facing configuration surface.

Why the Drift Happens

The miswrite of VONCHANGE = 2 typically occurs after one of the following events:

  1. The tag was created in an earlier project version with archive on change enabled, then switched to cyclic in a later service pack without a clean re-import.
  2. The project was migrated from one WinCC version to another by carrying the database files over instead of exporting and re-importing the configuration.
  3. A bulk modification (export/import from CSV, a project-wide search and replace, or a VBS script that touches tag properties) was run against the configuration database.
  4. The Hysteresis property was modified at some point in the project lifecycle. Hysteresis is interpreted as the change threshold for archive on change, and writing it leaves the trigger mode in the on change state in the database even if the editor still displays cyclic.
  5. The archive configuration was edited while the WinCC Runtime was active and a partial write was committed.

Diagnostic Indicator

To confirm this root cause, query the project database for tags whose VONCHANGE is not zero:

SELECT TAGID, NAME, VONCHANGE, ARCHIV, CYCLE, HYST
FROM dbo.PDE#TAGs
WHERE VONCHANGE <> 0
ORDER BY NAME;

Tags with VONCHANGE = 2 in the result set will exhibit the skip-archive behavior even when the editor reports them as cyclic. Tags with VONCHANGE = 1 typically indicate event-driven archive and may be intentional.

Affected Versions and Migration Scope

The symptom has been confirmed in:

  • WinCC V7.4 SP1 Update 12 (primary report source).
  • Other V7.4 service pack updates when the project database is carried over rather than re-imported.
  • V7.0, V7.2, and V7.3 projects migrated forward through several service packs.

The root cause is in the configuration database schema, so any V7.x project is potentially exposed. The fix is the same for all affected versions because the schema of the PDE#TAGs table is stable across the V7 line.

WinCC Unified (TIA Portal V17 and later) does not exhibit the same behavior. The logging mode is set per tag as an explicit property under Properties > Properties > Logging mode, and the cycle is set under Properties > Properties > Cycle. Refer to the official Siemens documentation at Configuring logging tags (RT Unified) for the full parameter set.

Solution A: Direct SQL Edit

This option is the most efficient when many tags are affected or when a project-wide audit is required. It does require direct access to the SQL Server that hosts the WinCC project database.

Prerequisites

  • Administrator access to the WinCC server.
  • SQL Server Management Studio (SSMS) installed locally or on the WinCC server.
  • Full file-system backup of the WinCC project folder.
  • Full database backup of the WinCC project database.
  • WinCC Runtime stopped on all participating servers, including redundancy partners.

Step-by-Step Procedure

  1. Close the WinCC Explorer on the engineering station and the WinCC Runtime on the server. If you operate redundant servers, close both partners.
  2. Open SQL Server Management Studio and connect to the SQL Server instance that hosts the WinCC project. The instance is typically named WinCC and runs under the CC_Admin service account.
  3. Locate the project database. The default name is the WinCC project name (for example, PlantA_MultiProject). Avoid touching the system databases master, msdb, and tempdb.
  4. Take a full backup using SSMS or Transact-SQL:
    BACKUP DATABASE [PlantA_MultiProject]
    TO DISK = N'D:\Backup\PlantA_MultiProject_PreFix.bak'
    WITH INIT, COMPRESSION;
  5. Open a new query window against the project database.
  6. Run the diagnostic query to identify affected tags:
    SELECT TAGID, NAME, VONCHANGE, ARCHIV, CYCLE, HYST
    FROM dbo.PDE#TAGs
    WHERE VONCHANGE = 2
    ORDER BY NAME;
  7. For each tag intended for cyclic-continuous archive, set VONCHANGE = 0. To correct a single tag:
    UPDATE dbo.PDE#TAGs
    SET VONCHANGE = 0
    WHERE NAME = 'TagName' AND VONCHANGE = 2;
  8. To correct all tags at once when the entire project is supposed to be cyclic:
    UPDATE dbo.PDE#TAGs
    SET VONCHANGE = 0
    WHERE VONCHANGE = 2 AND ARCHIV = 1;
  9. Re-run the diagnostic query to confirm no rows remain where VONCHANGE = 2 for tags that should be cyclic.
  10. Close SSMS, restart the WinCC project in the WinCC Explorer, and start the WinCC Runtime.
Support boundary. Direct edits to the WinCC configuration database are not part of the standard Siemens support contract. Take a full backup before the edit, document the change in the project change log, and treat this as corrective maintenance rather than routine operation. Use Solution B for projects where SQL access is not available or where the change must be made without external tooling.

Solution B: Editor-Based Hysteresis Reset

This option is preferred when SQL access is not available, when the change must be performed on the engineering station only, or when the operator wants to keep the change inside the supported configuration surface.

Prerequisites

  • WinCC Explorer running on the engineering station.
  • Write access to the WinCC project.
  • WinCC Runtime may stay running during the edit, but a restart is required afterward.

Step-by-Step Procedure

  1. Open the WinCC Explorer on the engineering station.
  2. Open the Tag Logging editor.
  3. Locate each affected tag in the archive configuration. Use the search or filter function to speed up the selection when many tags are involved.
  4. Set the Hysteresis property to a value greater than zero. A small value such as 0.1 is sufficient; the magnitude is irrelevant because the goal is to force a write to the internal column.
  5. Save the configuration.
  6. Close the Tag Logging editor completely. The editor must release its database handle so the next open reads the latest state.
  7. Reopen the Tag Logging editor.
  8. Set the Hysteresis property of the same tags back to 0.
  9. Save and close the editor.
  10. Restart the WinCC project in the WinCC Explorer to pick up the corrected configuration.

The two-step write forces the configuration database to rewrite the VONCHANGE column with the correct value of 0 for cyclic archive. The Tag Logging editor performs an internal consistency check on the second open, and any drift in the internal flag is normalized.

Bulk Variant for Solution B

When hundreds of tags are affected, repeat the Hysteresis reset in batches. The procedure is the same per tag, but the editor allows multi-select within a single archive container. Selecting a contiguous range in the Tag Logging table and changing the Hysteresis property in one operation is faster than editing tag by tag.

Verification Procedure

Run the following checks in order before declaring the issue resolved. Each check targets a different layer of the stack, from the database column up to the trend view.

  1. Database check. Re-run the diagnostic query from Solution A. Confirm that VONCHANGE = 0 for every tag intended for cyclic archive. Confirm that tags intentionally set to archive on change still show their original VONCHANGE value.
  2. Editor check. Open the Tag Logging editor and verify that the archive cycle and method for the affected tags still show Cyclic Continuous. The Hysteresis field should be 0.
  3. Runtime write check. Force the affected tag to a constant value using the WinCC Tag Simulator, the I/O forcing tool, or a real process signal held at one value. The exact value is not important; it must remain stable for the duration of the test.
  4. Archive density check. Watch the archive database or a WinCC Online Table Control configured for the affected tag. Confirm a new record is inserted at every archive cycle, regardless of whether the value changed. The expected sample count over a 5-minute window with a 1-second cycle is 300 records.
  5. Trend view check. Open a WinCC Online Trend Control for the affected tag. The trend line should be a continuous step (constant value) with no gaps in the time axis. If the trend shows a flat line with breaks, the fix did not take effect.
  6. Report check. Generate a WinCC report covering the test interval. The report should contain one row per archive cycle. Spreadsheets with missing rows indicate the fix did not propagate to the report generator.
  7. Redundancy check. On redundant WinCC servers, verify the fix on both partners. The configuration database is replicated, so a single edit covers both, but a runtime restart of both partners is required.
  8. Alarm and message check. If the tag is also referenced in a message configuration, confirm that the message configuration was not modified during the fix. The Tag Logging editor and the Alarm Logging editor use separate schema tables.

Parameter Reference

The following table lists the relevant tag properties and their expected values for cyclic-continuous archive.

Property Location Expected Value Purpose
Archiving method Tag Logging editor Cyclic Continuous Archive trigger (user-facing)
Logging cycle Tag Logging editor 500 ms to 1 h Archive interval
Factor Tag Logging editor 1 to 60 Cycle multiplier for staggered archive
Hysteresis Tag Logging editor 0 for cyclic Value change threshold
Archiving Tag Logging editor On Master archive switch
VONCHANGE dbo.PDE#TAGs 0 Internal DB flag for cyclic
ARCHIV dbo.PDE#TAGs 1 Internal DB archive master switch
CYCLE dbo.PDE#TAGs cycle in ms Internal DB cycle
HYST dbo.PDE#TAGs 0 for cyclic Internal DB hysteresis

Related Schema and Internal Tables

The dbo.PDE#TAGs table is the user tag table inside the WinCC configuration database. Several other tables participate in tag logging:

Table Purpose
dbo.PDE#TAGs User tag definitions and logging parameters
dbo.PDE#ARCHIVE Archive container definitions
dbo.PDE#COMPRESS Compression definitions for the archive
dbo.PDE#TAG_ARCHIVE Link table assigning tags to archives
dbo.PDE#TIME Cycle and time definitions for the archive

To inspect a single tag across all relevant fields:

SELECT * FROM dbo.PDE#TAGs WHERE NAME = 'TagName';

To list every tag assigned to a given archive container:

SELECT t.TAGID, t.NAME, t.VONCHANGE, t.ARCHIV, t.CYCLE, t.HYST
FROM dbo.PDE#TAGs t
INNER JOIN dbo.PDE#TAG_ARCHIVE ta ON ta.TAGID = t.TAGID
INNER JOIN dbo.PDE#ARCHIVE a ON a.ARCHIVEID = ta.ARCHIVEID
WHERE a.NAME = 'ArchiveContainerName';

Edge Cases and Field Diagnostics

The fix does not always apply cleanly. The following edge cases are observed in the field.

Fix Does Not Persist After Runtime Restart

If the VONCHANGE value reverts to 2 after a WinCC Runtime restart, the most likely cause is that the project was started from a cached configuration file rather than the live database. Stop the runtime, close the WinCC Explorer, delete the project cache folder under <ProjectPath>\<ComputerName>\Cache, and restart the project.

Some Tags Remain Broken After the SQL Update

If the diagnostic query returns no rows with VONCHANGE = 2 but the runtime still skips archives, the cause is elsewhere. Check the ARCHIV column for the affected tag. A value of 0 disables archiving entirely and is independent of the trigger mode. Also check the dbo.PDE#COMPRESS table: a compression rule that filters out equal consecutive values can mask the issue by suppressing records after the fact.

Redundant Server Out of Sync

On a redundant WinCC server pair, the configuration database is replicated automatically. If one partner is restarted before the other, the older partner may load the old configuration and briefly exhibit the original symptom. Always restart both partners at the same time after the fix.

Multi-Client Project

In a multi-client or multi-project setup, the project database is shared but the project files are distributed. A change to the VONCHANGE column is visible to all clients immediately, but the client cache must be invalidated. Run a project-wide configuration compile to force the clients to re-read the database.

Tag with Both Cyclic and On-Change Triggers

Some installations combine cyclic archive with an on change trigger. In this case, VONCHANGE = 2 is the correct value. Verify the intended behavior in the project specification before applying the fix.

WinCC Unified Comparison

WinCC Unified (TIA Portal) takes a different approach to tag logging. The logging mode is an explicit tag property, not an internal database column. Per the official Siemens documentation at Configuring logging tags (RT Unified):

  • The logging mode is set under Properties > Properties > Logging mode with options including On change and Cyclic.
  • The cycle is set under Properties > Properties > Cycle with a base time and a factor.
  • Each tag has a dedicated trigger condition, eliminating the need for a shared internal flag.
  • The configuration is stored in the TIA Portal project and compiled to the runtime database, removing the drift risk observed in V7.x.

When migrating a project from WinCC V7.4 SP1 to WinCC Unified, the equivalent fix is to set the logging mode to Cyclic for every tag that should archive on a regular interval, with a cycle of 1 s, 2 s, 5 s, 10 s, 30 s, 1 min, 5 min, 10 min, 30 min, or 1 h. The hysteresis setting in Unified applies only to On change mode and is not relevant for Cyclic mode.

Prevention and Commissioning Checklist

To prevent the issue from recurring in a project:

  1. Avoid mixing event-driven and cyclic archive methods on the same tag group unless explicitly required by the process.
  2. Always migrate a project to a new service pack using a clean export and re-import, rather than carrying the database over. Use the WinCC Project Migrator and verify the resulting project opens without warnings.
  3. Document the Hysteresis value for each tag in the project documentation. A consistent Hysteresis of 0 for cyclic tags removes one trigger for the miswrite.
  4. After any bulk tag property change, run the SQL verification query to confirm VONCHANGE = 0 for all cyclic-archive tags.
  5. Include the SQL verification in the commissioning checklist for new projects. The query should return zero rows for a healthy project that uses only cyclic archive.
  6. Schedule a periodic archive audit using the WinCC Archive Report. Gaps in the audit report indicate the symptom is present.
  7. Add the diagnostic query to the project handover document so the operations team can rerun it after future maintenance.
  8. Configure the SQL Server backup job to run before and after any project configuration change, not just the file-system backup of the WinCC project.

Field Troubleshooting Matrix

Symptom Likely Cause Check Fix
Cyclic tag does not archive when value is constant VONCHANGE = 2 in dbo.PDE#TAGs SELECT VONCHANGE FROM dbo.PDE#TAGs WHERE NAME = 'TagName' UPDATE dbo.PDE#TAGs SET VONCHANGE = 0; or Hysteresis reset
Tag does not archive at all ARCHIV = 0 in dbo.PDE#TAGs SELECT ARCHIV FROM dbo.PDE#TAGs WHERE NAME = 'TagName' Enable archiving in Tag Logging editor
Archive works in editor preview, fails in runtime Project cache not refreshed Check <ProjectPath>\<ComputerName>\Cache Delete cache, restart runtime
Archive works for one server, fails for partner Redundancy out of sync Compare VONCHANGE on both servers Restart both partners simultaneously
Archive gaps only on event-driven tags Compression filter suppresses equal values Review dbo.PDE#COMPRESS Adjust compression parameters
Archive gaps only after bulk edit Tag property write was partial Run diagnostic query Reopen editor, save, restart
Trend shows flat line with breaks Same as primary symptom Same as primary symptom Same as primary symptom
Report prints with empty rows Archive database missing samples Run archive density check Same as primary symptom

Backup and Recovery Notes

Always back up the project before applying the fix. The two artifacts that must be captured are:

  • Project folder. Use the WinCC Project Duplicator or copy the entire project folder to a backup location. The default path is C:\Program Files (x86)\Siemens\Automation\WinCC\WinCCProjects\<ProjectName>.
  • Project database. Use SSMS or a SQL Server maintenance plan. A full backup is required; differential and transaction-log backups are not sufficient for a pre-edit state.

To roll back the change, restore both the project folder and the project database from the backup taken immediately before the fix. After the rollback, restart the WinCC project in the WinCC Explorer.

Performance Impact

The fix itself has no runtime performance impact. The VONCHANGE column is read once when the tag logging runtime initializes the archive. The corrective SQL update touches a single column and is bounded by the number of affected tags, typically in the dozens. For a project with thousands of tags, run the update in a single transaction and commit explicitly to avoid lock contention with the SQL Server.

Resuming cyclic archive may increase the archive database size linearly with the cycle. For a 1-second cycle and 1000 tags, the archive grows by approximately 86 million records per day. Verify the disk space and the archive retention policy before resuming archive on a high-density tag set.

Frequently Asked Questions

What is the VONCHANGE column in the WinCC project database?

The VONCHANGE column in the dbo.PDE#TAGs table is an internal switch that drives the archive trigger behavior. A value of 0 indicates cyclic archive, a value of 2 indicates archive on value change. It is not exposed in the Tag Logging editor and must be inspected or edited via SQL Server Management Studio.

Can this issue be fixed without touching SQL?

Yes. Set the Hysteresis property of each affected tag to a value greater than 0, save, close, reopen the Tag Logging editor, and set Hysteresis back to 0. The two-step write forces the configuration database to rewrite the VONCHANGE column with the correct value of 0 for cyclic archive.

Is the issue specific to WinCC 7.4 SP1 Update 12?

The symptom is most commonly reported in WinCC V7.4 SP1 Update 12, but the root cause can manifest in any V7.x project where the database has been migrated between service packs. The fix applies to all V7.x versions because the schema of the PDE#TAGs table is stable across the V7 line.

Does WinCC Unified have the same issue?

No. WinCC Unified exposes the logging mode as a dedicated tag property and does not rely on a VONCHANGE database column. The logging mode is set under Properties > Properties > Logging mode, and the cycle is set under Properties > Properties > Cycle. Refer to the official Siemens documentation for the full parameter set.

What archive cycle should be used for steady process values?

For steady process values, use a cycle between 1 second and 1 minute to balance resolution against database size. Keep Hysteresis at 0 for cyclic archive. For event-driven archive of a steady signal, configure a Hysteresis between 0.1 and 1.0 percent of full scale to prevent archive thrashing on noise.

How do I know whether a tag should be cyclic or on-change?

Cyclic archive is appropriate when the process history must capture a sample at a fixed interval regardless of value change, which is the standard requirement for trend views and regulatory logging. On-change archive is appropriate when the value is mostly constant and only the transitions matter, such as a state flag or a trip signal. Confirm the requirement in the project specification before applying the fix.

Back to blog