Resolving PCS 7 WinCC Tag Logging Update Failures in Archive

David Krause14 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

1. Problem Overview

Engineers running Siemens PCS 7 V7.0 SP1 with WinCC Explorer 6.2 SP2 routinely encounter a Tag Logging failure mode in which measured-value blocks such as MEAS_MON (CFC family, channel driver blocks) do not produce archived tags in the runtime database after an OS compile. The symptom is straightforward: the .U input of MEAS_MON is flagged in the CFC chart with the Archive check box selected, the OS is recompiled (incremental, total, or total with memory reset), yet the SystemArchive in the WinCC Tag Logging editor does not list the expected tags, and the configured WinCC Online Trend Control remains empty.

The root cause is rarely a WinCC bug. It is almost always a configuration-model conflict between the two Tag Logging generation paths that PCS 7 exposes:

  • Path A — Automatic / System Archive: the CFC compiler generates archive tags from the Archive column of every block I/O marked for archiving.
  • Path B — Manual / User Archive: the engineer manually inserts logging tags (typically three pens per process value — average, minimum, maximum) under a user-defined archive.

When the engineer mixes both paths on the same .U input, an OS compile with memory reset (Total / Reset) deletes the user-created manual tags because the system regenerates the archive table from the CFC Archive flag. The trend control wired to the manual archive then displays nothing because its tag references were erased at runtime start.

Critical: Do not run an OS Compile Entire / Reset on a chart that has both the Archive attribute set on CFC block I/Os and hand-built logging tags referencing the same data points. The reset path will silently purge the manual tags.

2. Root Cause Analysis

PCS 7's Tag Logging subsystem is a two-tier architecture that the CFC OS compiler owns. The SystemArchive is regenerated deterministically from the S7 project database every time the OS is compiled. A user-defined archive, by contrast, is stored inside the WinCC project and is only touched by the compiler when the OS compilation runs in incremental (Changes only) mode. This is the asymmetry that causes the failure.

OS Compile Mode Effect on SystemArchive Effect on User Archive
Changes only Adds new tags from new/changed Archive flags; preserves existing manual SystemArchive tags. Untouched (manual edits preserved).
Entire OS Regenerates full SystemArchive tag set from current CFC flags; drops any tag whose flag was removed. Untouched unless tag names collide with a system-generated name.
Entire OS / Reset Wipes and rebuilds SystemArchive from CFC flags. Wipes user archives that share the same archive name pattern and any tag whose source is also a SystemArchive target.

The MEAS_MON block in the PCS 7 Advanced Process Library (APL) exposes .U as the process-value input and .U_LL, .U_HL, .U_ALARM as derived signals. The block's Archive attribute is what the CFC compiler reads when populating SystemArchive. If the engineer creates three manual logging tags (e.g., MEAS_MON/U/Avg, MEAS_MON/U/Min, MEAS_MON/U/Max) under a user archive while Archive is still checked, the next Entire OS / Reset compile deletes those manual tags because the system rebuilds the entire archive from CFC metadata.

3. Prerequisites

Before reworking the logging configuration, confirm the following:

  1. SIMATIC PCS 7 V7.0 SP1 (or V7.1/V8.0 for forward-mapped platforms) installed with the matching APL library version. The MEAS_MON block ships in the APL since V7.0; older installations may carry the legacy CTRL_PID/MEAS families instead.
  2. WinCC Explorer 6.2 SP2 (or the WinCC version bundled with the installed PCS 7 release) running on the OS server. Open WinCC Explorer and verify the project loads without redundant license warnings on the Tag Logging and Alarm Logging runtime modules.
  3. Administrator rights on the engineering station. The CFC editor writes to the S7 program database under <Project>\S7; the OS compile writes to <Project>\WinCC\... Both must be writable.
  4. An S7 program already downloaded to the AS, with CFC charts compiled and MEAS_MON instances present. Run CFC > Charts > Compile first so the S7 program and the OS data interface are in sync.
  5. Stop the WinCC Runtime before recompiling, or schedule the compile during a maintenance window. Online changes to the archive structure are not supported on a live Runtime.
Version note: The behavior described is specific to PCS 7 V7.0 SP1 with WinCC 6.2 SP2. PCS 7 V8.x ships with WinCC 7.x, and PCS 7 V9.x ships with the WinCC Unified RT (TIA Portal) — see Section 7 for the WinCC Unified equivalent workflow.

4. Resolution Strategy: Pick One Path

PCS 7 supports both automatic and manual Tag Logging paths but not simultaneously for the same data point. The corrected workflow is to commit to a single generation path before the next OS compile.

Path Archive Flag in CFC Where the Tags Live Persistence Across OS Compile / Reset Best Use
A — System Archive Archive checked on .U SystemArchive Survives Changes only and Entire OS; rebuilt under Reset. Bulk generation, dozens of MEAS_MON instances, default 1 s logging, default compression.
B — Manual Archive No Archive on .U User-defined archive (e.g., UserArchive_Meas) Untouched by Changes only; preserved under Entire OS; under Reset survives only if the archive name does not collide with a system name. Custom compression, custom acquisition cycle, manual min/max/avg pens, audits that require tamper-resistant history.

For a single block like MEAS_MON where the engineer wants three pens (Avg, Min, Max) on the same .U input, Path B (manual archive) is the correct choice. Path A only generates one tag per archive flag, with the system's default compression (typically 1 s acquisition, 500 ms archiving, 1 min/1 h/1 day compression). If the engineer needs min/max pens, manual archive is the only path that produces them in PCS 7 V7.0 SP1.

5. Step-by-Step Procedure — Manual Archive on MEAS_MON.U

  1. Open the CFC chart containing the MEAS_MON instance in the CFC editor. In the chart view, click the Archive column header for the .U row of every MEAS_MON block that should not be auto-archived. Set the value to No Archive. The default is Archive; for blocks that need manual logging this must be cleared.
  2. Save the chart with Ctrl+S. The chart icon in the plant view should refresh.
  3. Run CFC > Charts > Compile with the Scope = Entire Program option. The S7 program is rebuilt with the updated archive flags; the OS interface is updated to match.
  4. Open WinCC Explorer on the OS server. In the navigation tree, right-click Tag Logging and select Open.
  5. Create a user archive (or reuse the project-standard one). Right-click in the archive tree and choose New Archive. Name it consistently, e.g., UserArchive_MEAS. Set the archive type to Process value archive. Configure the desired Size of data buffer (typical: 500,000 segments) and the Behavior when full (typical: Overwrite oldest data).
  6. Add three logging tags per MEAS_MON instance, one for each compression. Right-click the new archive and select New Tag. Configure each tag:
Logging Tag Name Tag Reference (WinCC Tag) Acquisition Cycle Archiving / Compression Calculation
MEAS_MON_001_U_Avg Process tag connected to MEAS_MON_001.U in the WinCC tag table 1 s 1 min Average
MEAS_MON_001_U_Min Same process tag as above 1 s 1 min Minimum
MEAS_MON_001_U_Max Same process tag as above 1 s 1 min Maximum
  1. Wire the WinCC process tag to the AS variable. Open the WinCC Tag Management editor. Add a new tag of type External pointed at the MEAS_MON_001.U address in the S7 program. Repeat for each MEAS_MON instance. The three logging tags created in step 6 all reference the same external process tag — only the compression differs.
  2. Configure the WinCC Online Trend Control in the graphics designer. Drop an Online Trend Control onto the picture. In the configuration dialog, add the three logging tags as three Trends. Bind the Data source to Tag Logging > Archive > UserArchive_MEAS.
  3. Save the picture and recompile the OS with Changes only. The reason for choosing Changes only at this stage is to preserve the manual archive: an Entire OS / Reset on a project that still has stray Archive flags will delete these manual tags again.
  4. Activate WinCC Runtime. Open the picture, confirm the three trends paint. The trend control will show Avg, Min, and Max compressed traces for the .U input.
Field tip: If the project requires Report outputs (e.g., shift report, batch report) drawing from the same archive, build the report layout against UserArchive_MEAS directly. The PCS 7 Report Designer will treat a user archive and the system archive with the same set of Runtime APIs (LGALGetValue, LGALGetAverage, etc.).

6. Step-by-Step Procedure — Switch to Automatic System Archive (Alternative)

If the engineer prefers to let the OS compiler generate the tags, the workflow is the inverse of Section 5.

  1. In the CFC chart, confirm the Archive check box is selected for the .U row of every MEAS_MON block that must be archived.
  2. Save and run CFC > Compile.
  3. Run the OS compile: SIMATIC Manager > OS > Compile OS. Use Entire OS if the project is in initial commissioning; use Changes only for ongoing maintenance. Avoid Reset on a project where you also have manual archives for the same data points.
  4. In WinCC Tag Logging, the SystemArchive now contains one tag per Archive-flagged I/O. Inspect the Tag Logging editor to confirm the MEAS_MON_001.U tag is present.
  5. Wire the WinCC Online Trend Control to SystemArchive. The control will display a single trace at the system's default compression. The trend will not show separate Min/Max pens.
  6. If the application requires three-pen trends, do not use the system archive — fall back to Section 5. Mixing the two paths on the same .U is the failure mode described in Section 2.

7. Migration Note: WinCC Unified RT (TIA Portal V20)

On PCS 7 V9.x and WinCC Unified RT (TIA Portal V20), the logging model is reimplemented. The CFC Archive flag is replaced by a HMI-side configuration. Logging tags are created in the Logging tag editor of the Unified device, and each logging tag is assigned to a Data log that controls the persistence backend. The equivalent procedure in WinCC Unified is documented at the official Siemens documentation portal:

Key behavioral differences from PCS 7 V7.0 SP1 / WinCC 6.2 SP2:

Aspect WinCC 6.2 SP2 (PCS 7 V7.0 SP1) WinCC Unified RT (TIA Portal V20)
Archive generation source CFC Archive flag (S7 program side) HMI logging tag configuration (HMI side)
Default archive container SystemArchive Per-device data log (SQLite / file-based)
Min / Max / Avg pens Only on user archive; one tag per pen Compression settings per logging tag
Compile coupling Tight: OS compile regenerates SystemArchive Loose: HMI compile triggers re-sync of logging tags

For greenfield PCS 7 V9.x projects, the same pick one path discipline still applies — do not enable Archive on the CFC side and define manual logging tags on the HMI side for the same data point. Use the HMI-side logging configuration as the single source of truth, or use the CFC Archive flag and let the system propagate it to the HMI.

8. Cross-Reference: Third-Party Historians

Plants that retire PCS 7 V7.0 SP1 and migrate to a third-party historian (Inductive Automation Ignition, OSIsoft PI, AVEVA Historian) effectively decouple the logging model from WinCC. In Ignition's Tag Historian, the equivalent step is to enable history on a tag and let the historian engine manage storage; see the official manual at Set up Tags to Log — Ignition User Manual. The same single-source-of-truth principle applies: do not point the same PLC address at two competing historians without a clear ownership rule, or the two archives will drift in time base, compression, and gaps.

9. Verification and Commissioning

After applying either Section 5 or Section 6, verify the result with the following checks before signing off the OS:

  1. Archive tag count: in WinCC Tag Logging, the number of tags in the chosen archive matches the number of MEAS_MON instances × 1 (system path) or × 3 (manual path). Any mismatch indicates a stale Archive flag.
  2. Trend paint: in Runtime, force a step change on the .U input from the CFC faceplate or a S7-PLCSIM simulation. The trend control should render the new value within one acquisition cycle (default 1 s).
  3. Compression integrity: wait for one full compression window (1 min) and call LGALGetAverage from a Global Script. The returned value should match the live value of the process tag. A zero return indicates a misconfigured Calculation field on the logging tag.
  4. Report rendering: trigger a shift report and confirm the Meas_Mon rows populate. Empty cells usually mean the report layout is bound to a different archive name than the one holding the live data.
  5. Recompile test: run OS Compile > Changes only and confirm the archive structure does not change. This is the regression test that proves the configuration is stable.

10. Troubleshooting Matrix

Symptom Likely Cause Corrective Action
Tag missing from SystemArchive after OS compile Archive flag not set on MEAS_MON.U Set the flag in the CFC chart, save, recompile CFC, then OS.
Tag missing from a user archive after Entire OS / Reset Manual archive name collided with a system-generated name; the OS compile rebuilt the archive Rename the user archive to a non-reserved name (e.g., U_<Plant>_MEAS) and avoid Reset on a live project.
Trend control shows flat line at zero WinCC process tag is misconfigured (wrong AS address, wrong data type) Open Tag Management, verify the tag is External, address matches the S7 symbol table, data type is REAL (32-bit float) for analog values.
Three pens collapse to one trend All three logging tags reference the same data source with the same compression; Calculation field is empty Set Calculation = Average / Minimum / Maximum on each tag respectively.
OS compile fails with archive capacity exceeded Total SystemArchive size exceeds the licensed tag count Right-click Tag Logging > Properties and confirm the RT archive tag license; or migrate to a user archive with overflow rules.
Tags appear after compile but are quality = bad AS connection down or address resolution failed Check the Channel Diagnosis tool in WinCC; verify the S7 connection in Tag Management > Connections; re-download the AS program if needed.
Trend updates online but report shows stale data Report layout is bound to a different archive or to the live tag (not the compressed logging tag) Re-bind the report column to the compressed logging tag in UserArchive_MEAS.
OS compile succeeds but Runtime refuses to start A logging tag references a process tag that was deleted Open Tag Logging > Check Consistency; remove or re-bind orphaned logging tags.

11. Field-Proven Caveats

  • Some PCS 7 V7.0 SP1 installations ship a hotfix (HF) that improves archive consistency under Entire OS / Reset. Check the Siemens Support entry Entry ID 44029153 (PCS 7 V7.0 SP1 Hotfix Collection) on the official Siemens Industry Online Support portal before opening a service request.
  • If the project uses Process Historian on top of WinCC, the historian replicates the SystemArchive and the user archives automatically. Adding a manual archive on the OS server is replicated to the historian; adding a tag inside that archive requires a manual Reorganize on the historian.
  • For redundant OS server pairs, archive mirroring is handled by the WinCC Redundancy option. Verify that the user archive created in Section 5 is included in the redundancy configuration. The default is to include SystemArchive; user archives must be flagged manually in Redundancy > Archive Synchronization.
  • Avoid naming user archives with a leading underscore followed by an integer — WinCC reserves the _N pattern for internal indexes. Use a clear plant-area prefix, e.g., AREA_A_MEAS.

12. FAQ

Why do my MEAS_MON tags disappear from Tag Logging after a Total OS Compile with Reset?

The OS compile with Reset regenerates the entire SystemArchive from the CFC Archive flags. If you also had manual logging tags in a user archive pointing at the same MEAS_MON.U inputs, the Reset path deletes them. Either commit to the SystemArchive (set the Archive flag in CFC and remove the manual tags) or commit to the user archive (set the flag to No Archive in CFC and keep the manual tags).

Can I have both automatic and manual logging tags on the same MEAS_MON block?

Technically yes, but the next OS compile with Reset will wipe the manual tags. For a stable configuration, pick one path: either rely on the SystemArchive generated from the CFC Archive flag, or set the flag to No Archive and build a user archive with three pens (Average, Minimum, Maximum) per process value.

How do I get Min, Max, and Average pens on MEAS_MON.U in PCS 7 V7.0 SP1?

Set the Archive flag on MEAS_MON.U to No Archive in the CFC chart, then create three logging tags in a user archive in WinCC Tag Logging. All three tags reference the same external process tag, but each is configured with a different Calculation field (Average, Minimum, Maximum) and an archiving cycle of 1 minute.

Does the same fix apply to WinCC Unified in PCS 7 V9.x?

The principle is identical — pick one path — but the implementation moves to the HMI side. In WinCC Unified V20, configure logging tags in the HMI Logging tag editor and assign them to a data log. Do not enable CFC-side Archive and HMI-side logging on the same data point, or the HMI compile will overwrite the HMI configuration. See the official WinCC Unified documentation linked in Section 7.

How do I verify that logging tags are working without waiting an hour?

Force a step change on MEAS_MON.U from the CFC faceplate or a PLCSIM simulation, open the trend control, and confirm the new value renders within one acquisition cycle. Then call LGALGetAverage from a WinCC Global Script after one compression window (1 minute) to confirm the compressed value matches the live process value.

Back to blog