Archiving Trends in WinCC (TIA Portal V13): HMI Data Logging

David Krause11 min read
HMI / SCADASiemensTutorial / 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

Overview

WinCC (TIA Portal) — the HMI configuration environment delivered with STEP 7 / TIA Portal — supports both runtime trending (live curve on an HMI screen) and historical archiving (persistent logging of the same tag data to non-volatile storage). The two are related but distinct: a trend is a display object on an HMI screen, while an archive (also called a log) is the underlying set of stored tag values plus a database on the HMI's flash media.

This article walks through configuring both, then explains how to inspect the archived values from the HMI directly — without routing them through the PLC — and how to export them for engineering use. The procedures target TIA Portal V13 SPx with WinCC Comfort or WinCC Advanced, which support the Comfort Panels, the Multi Panels, and the WinCC Runtime Advanced PC target. The same model applies to V14, V15, V16, V17, and V18 with cosmetic differences in dialog titles.

Scope of this article:

  • Configuring a tag and an archive (data log) under HMI Tags → Archive tags.
  • Mapping the archive to a Trend View and a Trend/Archive Viewer on a screen.
  • Triggering archives on demand or at scheduled intervals.
  • Reading archives back on the HMI without PLC interaction (the original question).
  • Exporting the underlying archive files to a CSV that Excel / Sheets can open.
Important: The file format WinCC uses on the HMI for archives is a proprietary RDB-backed binary layout (.rdb, .ldf in older builds) or, for the new file-based archives introduced in V14+, ring-buffered .csv / .bin files under \Storage Card\Logs\. TIA Portal V13 ships only the database-backed archive variant; CSV export requires either the Runtime export function or the engineering export described in the steps below.

Prerequisites

Item Requirement
Engineering software TIA Portal V13 (any SP level) with WinCC Comfort or WinCC Advanced installed. WinCC Basic does not include the archive editor — Comfort or Advanced is mandatory.
License For PC Runtime (WinCC Runtime Advanced): an RT license, e.g. 6AV2107-0AA01-0AA0 (RC 1024) or higher. For Comfort Panels: the panel license is bundled; no extra key required for 100 archive tags. Additional archive tags beyond the bundled count require 6AV2107 archive count licenses.
HMI hardware One of the SIMATIC Comfort Panels (TP700 / TP900 / TP1200 / TP1500 / TP1900 / TP2200) or a Multi Panel (MP 277 / MP 377), or a PC running WinCC Runtime Advanced. Reference: SIMATIC HMI operator panels manual collection.
Firmware Comfort Panel firmware ≥ V11.0.2 (recommended V13.0.4 or newer) — older firmware does not support V13 archives.
Memory medium For Comfort Panels, an SD card ≥ 2 GB (Siemens article Memory cards for SIMATIC HMI panels) or the internal flash drive is used as the archive location.
Tags to log Already declared as HMI tags with a valid PLC connection (S7-1200 / S7-1500 / S7-300/400), or internal tags for local logging.

Archive Architecture in WinCC (TIA Portal)

Before wiring anything, understand the four object types involved:

  1. Tag — the live process value (HMI tag, polled from the PLC or internal).
  2. Archive tag — a reference to the tag plus acquisition settings (cycle, threshold, compression).
  3. Data log — the file-based or database-backed container holding the values of one or more archive tags.
  4. Trend view / archive viewer — the screen object that visualizes the live or historical data.

In TIA Portal V13 the data log storage location is configured per panel under HMI device → Properties → Archive. The default is on the panel's internal flash for Comfort Panels; for PC Runtime you select a Windows folder path.

Step-by-Step: Configuring a Time-Stamped Trend Archive

Step 1 — Open the HMI project and verify the WinCC version

Launch TIA Portal V13, open the project, and double-click the HMI device in the project tree. The Devices > HMI node should show WinCC [device], never just WinCC Flexible. If the HMI was migrated from WinCC Flexible, run Project > Migrate project to upgrade to the WinCC (TIA Portal) configuration before proceeding — V13 cannot open archives created under V12 or older.

Step 2 — Declare the HMI tag

Expand HMI Tags, double-click Default tag table (or a project tag table you have created), and add a new tag:

Field Value (example)
Name ProcessPressure
Connection HMI_Connection_1 (S7-1200)
PLC tag / DB address %DB10.DBD0 (REAL, bar)
Acquisition cycle 500 ms

Repeat for every tag that should appear in the trend.

Step 3 — Create a Data Log

In the project tree, right-click Archives → Add new archive. WinCC adds an entry under Historical data > Archive tags. Rename the data log, e.g. PressureLog_24h. The number of data logs is limited by the runtime license and the panel's archive DB size (default 1024 segments).

Step 4 — Add Archive Tags with Acquisition Modes

Right-click the new data log → Add archive tag. For each archive tag set:

Setting Typical value Effect
Tag ProcessPressure Source of values
Acquisition cycle 1 s / 500 ms Raw sample period
Acquisition mode Cyclic continuous Saves every cycle
Acquisition mode (alt) Cyclic selective Saves only when a tag-trace tag is high (event-driven)
Compression mode None / Mean value / Min-Max If the cycle is smaller than the logging cycle, the compressor reduces data volume
Logging cycle 5 s How often the archive is written
Threshold / hysteresis 0.05 bar Limit value tolerated without a new entry (only with On change)
High limit / low limit 0 / 1000 Optional range check
Engineering tip: Use Cyclic continuous with a 5–10 s logging cycle for process monitoring, and On change with a meaningful threshold for alarms or events. Do not set the logging cycle to the acquisition cycle unless the engineering spec explicitly requires one reading per cycle — the resulting .rdb files grow quickly.

Step 5 — Place a Trend View on a Screen

Open an HMI screen, drag a Trend view from the toolbox (right pane → Controls → Trend view) onto the screen. In the properties:

  1. Set Source: Trend → choose the configured trend (e.g. Trend_24h) or Source: Archive → choose the data log.
  2. Bind each curve to an archive tag you defined in Step 4.
  3. Define the time axis (X) and value axis (Y) ranges, colour, and line thickness.

A separate control — Trend companion — provides buttons for Pause, Start/Stop, Zoom, and Print at runtime.

Step 6 — Compiling and Loading

Compile the HMI (right-click HMI device → Compile → Software (rebuild all)) and then load the project to the panel (right-click → Download to device → Software + Recipe data + Archive data). When you select Archive data on a Comfort Panel, the existing archive segments are deleted on the panel — only take this option on initial commissioning, not for normal reloads.

Viewing Archived Trends Without Using the PLC

The original question asks for an HMI-only way to view archived trends. There are three independent paths.

Path A — Online Archive Viewer (Trends window)

  1. Right-click the HMI device in the project tree → Online > Trends (or use the toolbar button Project tree → HMI device → Trends).
  2. TIA Portal opens a Trends dialog showing archive tags in the right-hand Recordings list.
  3. Right-click a recording → Export. The dialog offers two outputs:
    • Export as TIA export file (.exp) — re-importable, useful to ship a recording to engineering.
    • Export as CSV — the binary archive is converted to a columnar text file that Excel / LibreOffice Calc can open directly. This is the answer to the original poster's request.
  4. Confirm the target folder, finish the export.

Path B — Inline archive viewer on the HMI screen

Add an f(t) Trend View control on the screen and bind it to an archive (Source = Archive). Configure the Representation → Time period and Time axis ranges to span the desired interval. Use the on-screen cursor to read individual values from the historical record without the trend view being live — the control will draw past segments directly from the data log. A second trend companion object can switch between Live and History view at runtime via a tag change.

Path C — Export from Runtime

On the runtime project, configure a function on a button: SetTag → ExportArchive or the V13 system function "ExportDataRecord" with parameters listing the archive tag name and target file path (USB or network share). The CSV is produced directly on the target without needing TIA Portal.

Exporting Archived Trends for Excel / Spreadsheet Use

For users who need to bring the historical data into Excel, LibreOffice Calc, Pandas, or any downstream tool, follow this sequence:

  1. Connect the engineering PC to the HMI via PROFINET.
  2. In TIA Portal, open the Online → Trends and data logs dialog. The right pane shows Recordings.
  3. Right-click the recording → Export → CSV.
  4. When prompted to include compression values, choose Yes (raw and min/max for each compression interval) unless you specifically want the raw stream.
  5. Save the file. The CSV columns are: Timestamp (local time of the panel), Value, Validity (1 = good).

For batch export of multiple segments, use the system function ExportArchive and call it from a script or a V13 button. The export runs asynchronously and writes to the configured storage path.

Storage Paths and File Layout

Runtime / HMI Archive storage path File names
Comfort Panel (firmware < V14) \\Storage Card\\Logs\\<ArchiveName>\\ or \\Storage Card\\Archives\\ <ArchiveName>_<YYYYMMDD>.rdb, <ArchiveName>_<YYYYMMDD>.ldf
Comfort Panel (firmware ≥ V14) \\Storage Card\\Logs\\<ArchiveName>\\ Ring-buffered CSV / binary segments
WinCC Runtime Advanced (PC) Configured path, e.g. C:\WinCC_Projects\<Project>\Archive Same RDB or CSV layout as the panel
Engineering export (TIA Portal) User-chosen folder <ArchiveName>.csv, <ArchiveName>.exp
Hardware caveat: On Comfort Panels the internal flash has limited write cycles (~100 000 per sector). When archive logging cycle ≤ 1 s and continuous over months, expect flash wear and use an SD card as the archive medium (project setting Archive storage location → Storage Card).

Verifying the Configuration

  1. Online → Trends on the engineering PC. The recorder list must show the configured data log with a green dot (runtime active).
  2. Click the recording → Display. Verify that new entries arrive at the configured logging cycle.
  3. Stop the trend recording (right-click → Stop) and export to CSV. Open the CSV; rows should appear with timestamps matching the runtime clock of the panel.
  4. On the HMI screen, change the time axis on the trend view from Live to Last 1 h. A historical line should appear.
  5. Reboot the panel power: confirm the archive segments persist (they should — the SD card is unaffected by power loss).

Troubleshooting Matrix

Symptom Likely cause Resolution
No data appears in Trends window Wrong acquisition cycle or compressed to zero entries; or runtime not started Open Diagnostics → Runtime; verify log is enabled and that the panel shows online; reduce logging cycle or widen threshold
Export button greyed out No online connection, or HMI in transfer mode End the transfer mode on the panel: Control Panel → Transfer → End, or wait until the project stops
CSV opens but all rows are out of order Compression mode is Min/Max — multiple values per timestamp Regenerate with Compression = None, or interpret as min/max samples
Panel loses archive after reboot Archive configured on internal flash with very low memory Switch archive storage to SD card and rebuild project
Trend view shows gap lines (no values between two timestamps) Archive gaps occur because logging cycle was too long relative to acquisition Use cyclic selective with a smaller cycle, or set representation to Staircase instead of Interpolated
License error 1001 / archive exceeds count Archive tag count exceeds licence Reduce archive tags or purchase additional archive count licence 6AV2107 series
Cannot export from runtime button Path points to inaccessible share, or USB not mounted Verify USB present in Control Panel → Mass Storage; use absolute path such as /media/usb/

Migrating to Newer TIA Portal Versions

If the project is upgraded from V13 to V14+:

  1. Open the project in the newer portal — the configuration is carried across.
  2. The archives switch to file-based archives automatically. The CSV is the new native format.
  3. The export dialog from V13 still produces .exp files, which V14+ accept on import.
  4. If the panel firmware is also upgraded (e.g. Comfort TP1200 from V13.0.4 to V15.1), the new firmware accepts both RDB and CSV archives; older V11.x firmware requires RDB.

Refer to the manual WinCC (TIA Portal) V13 commissioning manual for the authoritative procedure, and to SIMATIC HMI Panels WinCC (TIA Portal) Programming and Operating Manual for archive tag semantics and licensing information.

Where do archived trends live on the Comfort Panel file system?

By default on the internal flash under \Storage Card\Archives\, or on an SD card under \Storage Card\Logs\<ArchiveName>\. Each archive segment is a binary RDB file plus an LDF log file in V13 builds; firmware V14 and later use a ring-buffered CSV layout.

Can I view archived trends on the HMI itself without a PLC in the loop?

Yes. Drop an f(t) Trend View on the screen, set Source = Archive, bind the curve to the archive tag, and configure the time axis to span a historical interval. The control reads the segments directly from the local SD/flash, so the PLC is not required once the values have been recorded.

How do I export the trend as a CSV that opens in Excel?

In TIA Portal go to Online → Trends, right-click the recording in the Recordings pane, and choose Export → CSV. The output columns are timestamp, value, and validity. The export only works while TIA is online to a panel or Runtime that is not in transfer mode.

What is the smallest logging cycle WinCC Comfort supports?

100 ms for cyclic continuous archives, but the practical minimum is 500 ms — smaller cycles fill the panel's flash quickly. Combine a fast acquisition cycle with a slower logging cycle (e.g. 100 ms acquire, 1 s log) and use the compressor to keep the on-disk size reasonable.

How many archive tags can a Comfort Panel handle without an extra licence?

Comfort Panels include 100 archive tags per panel by default. Larger counts (500 / 1000 / 5000) require additional SIMATIC WinCC archive count licences. The PC Runtime bundles 1024 archive tags but is not bundled; you must order an RT Advanced licence matching the desired tag count.

Back to blog