Configuring HMI Data Archiving Using WinCC Tag Logging Editor

David Krause10 min read
SCADA ConfigurationSiemensTutorial / How-to
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. Overview: Why Archive HMI Data

Process plants require short-term and long-term historical data for shift reports, quality traceability, alarm post-mortems, regulatory compliance, and trending analysis. A typical request is to keep 1-2 days of process value history on the HMI panel itself before the data is overwritten, exported to USB/SD, or forwarded to a plant historian such as AVEVA Historian, WinCC Historian, or a SQL backend.

Siemens implements this functionality through the Tag Logging subsystem in WinCC, WinCC Flexible, and TIA Portal WinCC Comfort/Advanced. Tag Logging continuously samples internal or external tags and writes them to circular archives. The retention depth (how many days are kept) is governed by a combination of acquisition cycle, archive size, and trigger conditions.

This article walks through the full configuration of an HMI data archive using the Tag Logging Editor, including tag binding, archive creation, storage location selection, trend and table display, and verification. Cross-platform notes for AVEVA InTouch + Historian, AutomationDirect C-more, and Delta DOP HMI are included at the end for engineers working in mixed-vendor environments.

Scope note: The field report question was raised against WinCC V6.59 (WinCC Flexible 2008 SP5 generation). The procedure below applies to that platform and the equivalent TIA Portal V15-V18 "WinCC Comfort/Advanced" editors. Where dialogs differ, both paths are described.

2. Prerequisites

Before configuring tag logging, verify the following:

  1. HMI runtime license: Tag Logging requires the Archives option on the WinCC Flexible / TIA Portal HMI license. Without it, archives are created at compile time but the runtime shows license error 510002 / "Option not licensed".
  2. Project file access: You need the .hmi / .ap source project on the engineering station, not just the runtime file on the panel.
  3. Internal or external tags: Define at least one tag (internal HMI tag, or PLC tag via area pointer / symbolic I/O) that represents the value to log. Typical data types: Int, Real, Bool, String.
  4. Storage media: Confirm whether the target panel supports the storage path you intend to use (see Section 5). TP/Comfort Panels support internal flash, an SD card slot, or a USB stick via the Storage Card path variable.
  5. Memory budget: Each archived value consumes 16-24 bytes (tag header + timestamp + value + state). For example, archiving one Real tag every 1 s for 48 h produces approximately 8.3 MB of raw data after compression.

3. WinCC Tag Logging: Conceptual Model

Tag Logging in WinCC is built on three objects:

Object Purpose Location in Editor
Tag The process variable being sampled (e.g. TankLevel, MotorCurrent). Project tree → HMI Tags → Default tag table
Archive A container that defines acquisition cycle, storage location, and size limits. Project tree → Archives → Tag Logging
Logging Tag The link between an archive and a process tag, including trigger logic and compression. Inside each archive → "Properties → Tags"

One archive can hold many logging tags. Splitting archives by sampling rate (1 s fast archive, 60 s slow archive) is a common pattern that keeps the runtime efficient.

4. Step-by-Step Configuration

4.1 Create the Process Tag

  1. Open the HMI project in WinCC Flexible / TIA Portal.
  2. Expand HMI Tags → Default tag table and double-click to add a new tag.
  3. Configure the tag:
    • Name: ProcessValue_1
    • Data type: Real (32-bit float) or Int
    • Connection: Point at the PLC area (e.g. DB10.DBD0) or set as an internal tag
    • Acquisition mode: Cyclic continuous if the PLC updates the value on its own; Cyclic in operation if you need a read cycle
    • Acquisition cycle: 1000 ms is typical for 1-2 day archives

4.2 Create a Tag Logging Archive

  1. In the project tree, right-click Archives → Add new archive.
  2. Choose Tag Logging as the archive type. The Tag Logging Editor opens.
  3. Configure the archive properties:
    • Name: ProcessArchive_1Day
    • Storage location: Select Storage Card (SD/USB), File system, or memory card path. See Section 5.
    • Data records per log: A segment size of 500-2000 records keeps read/write performance stable.
    • Mode: Segmented circular log (overwrite oldest) or Segmented log (stop when full). Use circular for 1-2 day rolling buffers.

4.3 Add Logging Tags to the Archive

  1. Open the archive properties and switch to the Tags tab.
  2. Click Add and select the process tag (ProcessValue_1).
  3. Configure the logging entry:
    Parameter Recommended Value Meaning
    Acquisition Cyclic, 1 s How often the runtime samples the tag value
    Trigger None or tag-based (e.g. MotorRunning) Conditional logging to reduce file size
    Compression No (raw) or Swing Door / 0.5 % Lossless raw or lossy compression
    Limit High/Low (e.g. 100 / -100) Out-of-range values flagged but still archived
Tip: For 1-2 day retention with a 1 s cycle, 86 400 to 172 800 records per tag are needed. With segmented circular logs and 1 000-record segments, the panel will rotate ~170 segments. The internal flash of a Comfort Panel handles this comfortably; for TP177 / OP177 panels, prefer SD card storage to avoid flash wear.

4.4 Configure the Trigger (Optional)

If you only need data while a process is running, add a trigger tag:

  1. On the logging tag, switch Acquisition from Cyclic to On trigger.
  2. Select or create a Bool trigger tag such as BatchActive.
  3. Choose On rising edge to start logging or On level for continuous logging while the trigger is 1.

5. Storage Locations and Path Variables

WinCC Flexible and TIA Portal WinCC expose several path variables for archive storage:

Path Variable Maps to Use Case
\Storage Card\Logs\ SD card on the panel Most common for 1-2 day retention; survives power loss
\Storage Card USB\ USB stick (Comfort Panels) Portable export, large capacity
\Flash\ Internal flash of the panel Default; small size, do not log high-frequency tags here
\Network\ Network share (with username/password) Forwarding to a historian or NAS

On a PC-based WinCC Runtime (V7.x), archives are typically stored under C:\ProgramData\Siemens\Automation\WinCC\Archives\ as *.dt or *.srf files. Export to CSV via the Tag Logging Export tool or directly from the trend view's Export data button.

6. Displaying Archived Data

6.1 Trend View (Online and Historical)

  1. Insert a Trend View control on a screen.
  2. Link it to the archive created in Section 4.2.
  3. Set Time axis mode to Time range with a span of 48 h.
  4. Enable Show ruler and Readback value so operators can read historic points.

6.2 Table View

  1. Insert an f(t) Trend View (table form) instead of the graphical view, or add a separate Table View.
  2. Set the data source to the same archive.
  3. Configure column widths and decimal places to match the process value type (e.g. 2 decimals for a Real flow rate).

6.3 Exporting from the Panel

Operators can export the visible time range to a USB stick or SD card from the trend / table context menu: Export → CSV → Select target. The exported file is named TrendExport_YYYYMMDD_HHMMSS.csv and contains timestamp, value, and quality byte.

7. Verification

After compiling and downloading the project to the HMI, validate the archive:

  1. Open the runtime → Diagnostics → Tag Logging to confirm the archive loaded with status OK.
  2. On the trend view, drag the time axis back 1-2 days; data should be visible.
  3. Power-cycle the panel and confirm the archive persists (regression test for SD card path).
  4. From the engineering station, use WinCC Explorer → Tag Logging → Online Table (WinCC V7) or the Tag Simulator (TIA) to confirm the cycle and trigger fire as expected.

8. Cross-Platform Reference

8.1 AVEVA / Wonderware InTouch + Historian

For InTouch applications, the equivalent pattern is to historize tags in AVEVA Historian (formerly Wonderware Historian). Enable the InTouch HistData driver, point it at the Historian, and configure the historization rate on each tag. The AVEVA community article How to store InTouch HMI data in Wonderware Historian? walks through the configuration. On-board InTouch Historical Logging files (*.LGH) can also store 1-2 days of data for local retention before forwarder sweeps send it to the historian.

8.2 AutomationDirect C-more

The C-more panel series supports five distinct data capture mechanisms: Data Log to internal memory, Data Log to SD/USB, Trending (rolling buffer in RAM), Event Log (alarms), and Recipe (named value sets). The official C-more Collecting Data and Data Logging Overview video documents each. For 1-2 day retention, Data Log to SD/USB is the recommended path: it uses a CSV file the operator can pop out for offline analysis.

8.3 Delta DOP HMI

Delta DOP panels store history sampling and alarm data in the retained (non-volatile) internal memory of the HMI. According to the Delta HMI Service FAQ, operators retrieve this data through the History viewer screen object or via DOPSoft's Data Sampling Manager. For larger retention, route the sampling output to a USB drive or to the Delta DIABU/DIACloud forwarder.

9. Troubleshooting Matrix

Symptom Likely Root Cause Corrective Action
Archive empty after power cycle Archive stored on volatile internal memory or RAM disk Change storage location to \Storage Card\ or \Flash\; verify Retain flag on the archive
Runtime error 510002 "Option not licensed" Tag Logging runtime option not licensed on the panel image Transfer the correct license key via ProSave / TIA Portal → License management
Trend view shows gaps Acquisition cycle faster than PLC update time, or trigger logic misconfigured Match acquisition cycle to PLC OB1 / OB35 period; verify trigger tag wiring
Archive stops at fixed size after 6 h Segmented (non-circular) log with no overflow handling Switch to Segmented circular log with a high segment count
Slow screen refresh while archive writes SD card write throughput saturated by 100 ms logging of many tags Use compression (Swing Door) or raise the logging cycle to 1 s; use industrial-grade SD card (SLC, not TLC)
Export CSV file is empty / corrupted File system is FAT16 (4 GB limit) and archive grew past 2 GB Increase segment count to keep files under 2 GB, or move to exFAT storage

10. Best Practices and Field Tips

  • Decouple cycle and trigger. Use a fast acquisition cycle (e.g. 1 s) and a separate trigger tag (e.g. BatchActive) so the archive is consistent for any future compliance audit.
  • Industrial-grade storage. Consumer SD cards wear out quickly under continuous logging. Specify an SLC or pSLC card from ATP, Swissbit, or similar.
  • Time synchronization. Make sure the panel gets NTP or PLC time. A 5-second drift per hour breaks 1-2 day correlation against SCADA events.
  • One archive per data rate. Keep 100 ms, 1 s, and 60 s data in separate archives. This prevents short-cycle tags from inflating long-cycle archive size.
  • Disable sub-tags you do not need. Logging a String tag every 100 ms will dominate the storage budget. Demote it to 1 s or once-per-batch.
  • Forward to historian for long-term storage. Use the panel as a 1-2 day buffer and forward to a SCADA historian for weeks/months of retention; this is the standard ISA-95 layering.
  • Test retention, not just display. Always power-cycle the panel at the end of a FAT/SAT to prove the archive survives a brownout.
Compliance caveat: The 1-2 day retention value is the engineering target. Actual retention depends on the segment size, acquisition cycle, compression, number of tags, and storage medium. Always measure on the final hardware before signing off the FRS.

FAQ

How do I store 1-2 days of process data in a Siemens WinCC HMI?

Open the Tag Logging editor, create a Segmented circular log archive bound to your process tag, set the acquisition cycle to 1 s, and point the storage location at \Storage Card\Logs\. The panel continuously overwrites the oldest segment, giving you a rolling 1-2 day buffer.

Where are the archive files physically stored on a Comfort Panel?

Archives are written to the path set under archive Properties → Storage location. Common paths: \Flash\Logs (internal), \Storage Card\Logs (SD card), \Storage Card USB\Logs (USB stick), or a network share under \Network\.

Why does the panel show license error 510002 when I enable tag logging?

Error 510002 means the runtime option for Archives is not licensed on that panel image. Transfer the missing license key through TIA Portal → Runtime → License management or via ProSave using the supplied License Key Disk.

Can I log a tag only when a process is running?

Yes. In the archive's logging tag, switch Acquisition from Cyclic to On trigger, pick a Bool trigger tag (e.g. BatchActive), and select On rising edge or On level. The runtime only writes records while the trigger condition is met.

How do I export the archived data to a USB stick for offline analysis?

From the trend or table view on the HMI, open the context menu and choose Export → CSV, then select the USB stick or SD card as the target. The file name pattern is TrendExport_YYYYMMDD_HHMMSS.csv and includes timestamp, value, and quality byte.

Back to blog