Overview of SIMATIC WinCC Cyclic Archiving
SIMATIC WinCC stores all process history in three cyclic databases on the WinCC server: AlarmArchive (message events), TagLoggingFast (high-cycle process values), and TagLoggingSlow (long-cycle process values). Each archive is physically implemented as a directory of segment files in the project path \<ServerName>\<ProjectName>\<ArchiveType>. Every archive segment is a self-contained .DBF-based or Microsoft SQL database file that can be opened, copied, or backed up independently. The number of segments, the change trigger, and the per-segment size limit all directly determine how long a history is retained before the oldest segment is overwritten or relocated by the swap-out mechanism.
For a target retention of two years on a 1.5 TB hard disk, the engineering task is twofold:
- Calculate the daily write volume per archive to ensure that the disk can hold the entire retention window.
- Configure the Segment Change parameters so that the resulting number of files remains serviceable for swap-out, backup, and trend re-display.
The calculation method described below is derived from the formulas used in the official WinCC sizing documentation, in particular the entry "How do you calculate the data volume for WinCC archives?" on the Siemens Industry Online Support portal, and the segment-change semantics described in "What is the meaning of the 'Time of the segment change' setting option?".
Archive Types and Default Paths
Three cyclic archives are created automatically the first time a project is activated. Their default paths and primary use cases are summarized below.
| Archive | Default Path (relative to project) | Default Cycle | Primary Content |
|---|---|---|---|
| AlarmArchive | \Archive\AlarmLogging | Event-driven | Message appearance, acknowledgement, state change, comment |
| TagLoggingFast | \Archive\TagLoggingFast | 500 ms (user-configurable) | Fast process values, typically analog inputs and controller outputs |
| TagLoggingSlow | \Archive\TagLoggingSlow | 1 s to 1 h (per tag) | Slow process values, energy counters, status words |
Each archive is a series of segment files named S<YYYYMMDD>-<HHMMSS>.DBF (WinCC V7.x) or S<YYYYMMDD>-<HHMMSS>.mdf (WinCC V8.0 with SQL backend). The numeric prefix increments with each change trigger, allowing the runtime to identify the oldest segment for swap-out or deletion.
Segment Change Triggers
Two independent triggers cause WinCC to close the current segment and open a new one:
- Time trigger - configurable as Daily, Weekly, Monthly, or Yearly. The change occurs at the configured time of day (default 00:00:00) for daily, at 00:00 on Monday for weekly, and at 00:00 on day 1 of the month for monthly.
- Size trigger - a hard size limit (1 MB to 2 GB, default 1 GB for TagLoggingFast/Slow and 32 MB for AlarmArchive). When the current segment reaches the limit, the runtime rolls to a new segment even if the time trigger has not elapsed.
Both triggers are evaluated in the runtime, and the first one to fire wins. This means that with a daily time trigger and a 1 GB size limit, a high-rate archive may produce several segments per day; conversely, a low-rate archive configured with a daily trigger may keep a single segment open for weeks if the size limit is not reached.
Storage Sizing Methodology
The total disk volume required for an archive is the sum of all segment files that must be resident on disk at the moment the oldest data point is one retention-period old. Because segments are atomic and are deleted (or swapped to long-term storage) only when they are no longer the oldest, the disk must hold one full retention period of segments, not just the steady-state write rate.
Per-Tag Daily Volume
A single archived value is stored as a tuple of (timestamp, value, status). For a float32 tag this is typically 16 bytes (8 bytes timestamp, 4 bytes value, 4 bytes status, plus internal padding). A double tag requires 24 bytes. A binary tag requires 12 bytes. Add an index overhead of approximately 30%.
| Tag Type | Bytes per Record | Formula (bytes/day) |
|---|---|---|
| Binary | 12 | (86400 / t) × 12 × 1.30 |
| float32 / 16-bit integer | 16 | (86400 / t) × 16 × 1.30 |
| double / 32-bit integer | 24 | (86400 / t) × 24 × 1.30 |
| String (n chars) | 16 + n | (86400 / t) × (16 + n) × 1.30 |
Where t is the acquisition cycle in seconds. For 1 s, 5 s, 10 s, and 60 s cycles the float32 footprint is approximately:
- 1 s: 1.80 MB/day per tag
- 5 s: 0.36 MB/day per tag
- 10 s: 0.18 MB/day per tag
- 60 s: 0.030 MB/day per tag
Alarm Archive Volume
Each alarm event occupies approximately 256 bytes in compressed form (state + timestamp + operator + text pointer). With N events per day:
V_alarm = N × 256 × 1.10 bytes/day
Typical plants emit 100 to 10 000 alarm events per day, yielding 28 KB to 2.8 MB/day - negligible compared with tag volumes.
Total Retention Volume
For a retention period of R days and k tag groups with daily volume Vk:
V_total = R × (Σ V_k + V_alarm) + Slack
Reserve Slack = 1.25 × V_total to cover swap-out, log files, and the OS page file. With a 1.5 TB disk, plan to keep the archive set below 1.2 TB to leave headroom for the page file and WinCC project backups.
Worked Example: 1.5 TB / 2-Year Retention
Assume the following typical plant configuration:
| Group | Tags | Cycle | Type | Bytes/rec | MB/day total |
|---|---|---|---|---|---|
| Fast analog | 100 | 1 s | float32 | 16 | 100 × 1.80 = 180 |
| Fast binary | 50 | 500 ms | binary | 12 | 50 × (86400 × 12 × 1.30 / 86400) × 2 = 50 × 1.56 × 2 = 156 |
| Slow analog | 500 | 10 s | float32 | 16 | 500 × 0.18 = 90 |
| Slow binary | 200 | 60 s | binary | 12 | 200 × 0.026 = 5.2 |
| Alarms | - | event | message | 256 | 2 000 events = 0.56 |
| Total | 850 | - | - | - | ≈ 432 MB/day |
Over 2 years (730 days) without compression:
V_total = 730 × 432 MB ≈ 315 GB
Apply the 1.25 slack factor: 315 × 1.25 ≈ 394 GB.
Calculating the Number of Segments
The number of resident segments is determined by the segment-change cadence and the size limit:
N_segments = ceil( V_per_period / S_limit ) × N_periods_in_retention
Where:
-
V_per_periodis the volume written in one segment-change interval. -
S_limitis the configured per-segment size limit. -
N_periods_in_retentionis the number of change intervals in 730 days.
For the worked example with the TagLoggingFast archive (180 MB/day at 1 s) and a 1 GB size limit, a daily change trigger yields:
V_per_period = 180 MB-
ceil(180 MB / 1 GB) = 1segment per day -
N_periods = 730days - Total segments: 730 for TagLoggingFast alone
Adding the TagLoggingSlow (90 MB/day, 1 GB limit, daily trigger) yields 730 more segments. The AlarmArchive at 0.56 MB/day with a 32 MB limit and daily trigger yields 730 segments of negligible size. Total resident segments on disk: ≈ 2 190 files over the 2-year window.
If the per-segment file count becomes a backup or trend-display concern, switch the time trigger to Weekly or Monthly and raise the size limit so the segment change is driven by time, not by size. The trade-off is that a single segment file becomes much larger (potentially 25 GB for a monthly TagLoggingFast segment), which can slow trend online re-display and increase recovery time from backup.
Recommended Segment Configuration for 2-Year Retention
| Archive | Time Trigger | Size Limit | Expected Segments (2 y) | Avg Segment Size |
|---|---|---|---|---|
| TagLoggingFast | Daily at 00:00:00 | 1 GB | 730 | 180 MB |
| TagLoggingSlow | Daily at 00:00:00 | 500 MB | 730 | 90 MB |
| AlarmArchive | Daily at 00:00:00 | 64 MB | 730 | 0.6 MB |
For plants with high tag counts (> 5 000 fast tags) or strict 2-year retention, raise the per-segment size limit to 2 GB to reduce the file count to one segment per day without the size trigger firing prematurely.
Configuration Procedure
- Open WinCC Explorer on the server, right-click Tag Logging and select Open.
- In the Tag Logging editor, select the archive (e.g.
TagLoggingFast) and choose Properties > Archive Configuration. - In the dialog, locate the field Time of the segment change. Set it to one of:
Once a day,Once a week,Once a month, orOnce a year. The associated spin box controls the time-of-day for daily/weekly and the day-of-month for monthly/yearly changes. - Set Segment size [bytes] to the desired per-file limit. Values from 1 048 576 (1 MB) to 2 147 483 648 (2 GB) are valid.
- Repeat for TagLoggingSlow and Alarm Logging (the Alarm Logging editor is opened from WinCC Explorer in the same way).
- Open Computer > Properties > Archives and set the Storage path to a dedicated volume or folder. Do not place archives on the system drive or on a network share - WinCC requires a local, fixed path for cyclic swap-out.
- Activate the project. The first segment is created on the next segment-change trigger or on the next write after a size trigger.
The dialog layout and field names are described in detail in the WinCC V8.0 Information System under Tag Logging > Archive Configuration > Time of the segment change; cross-reference the same dialog in your installed version, since the field labels differ between V7.4, V7.5, and V8.0.
Long-Term Archiving (Optional Storage Plus / CAS)
If 2-year retention on the local disk is not acceptable, enable the optional Process Historian or WinCC/CAS (Central Archive Server) package. These add-ons copy closed segments to a separate SQL database for long-term storage, while the local cyclic archive continues to overwrite the oldest segment after the configured local retention. The local disk then needs to hold only a few weeks or months of data, not 2 years. Licensing is per archive tag for Process Historian and per server pair for CAS.
Archive Backup, Swap-Out, and Disk Watchdog
By default, when the local archive is full the oldest segment is overwritten. To prevent data loss, configure swap-out in Computer > Properties > Archives > Swap-out:
- Set Target path to a backup volume or NAS path.
- Set Swap-out time to a low-traffic window (typically 02:00).
- Enable Swap-out enabled for each cyclic archive.
For redundancy, use the WinCC Redundancy option to mirror segments in real time to a standby server, or schedule a daily ccbackup.exe job that copies closed segments to a backup folder on a different physical drive.
Verification Checklist
- After 24 hours of runtime, check
\<Project>\Archive\TagLoggingFastand confirm that one or more segment files with the expected naming pattern (S<YYYYMMDD>-<HHMMSS>.mdf) have been created. - In WinCC Tag Logging, select any tag and open the trend view. Set the time range to "1 day" and verify that the trend renders without gaps.
- Open the Alarm Logging editor and verify that messages are visible in the message list and that the
AlarmArchivedirectory contains at least one segment file. - Open the Windows Performance Monitor and watch the WinCC Archive Manager counter Segments written - it should increment on every segment change.
- Calculate the actual write rate from the segment sizes in the archive directory:
total bytes / hours elapsed. Compare against the projected rate from the sizing formulas above. A deviation greater than 20% indicates unanticipated tag additions or wrong cycle settings. - Use WinCC Diagnostics > Archive Diagnostics (TagLoggingRT.exe) to confirm that the configured segment change time matches the actual file creation time.
Troubleshooting Matrix
| Symptom | Likely Root Cause | Remediation |
|---|---|---|
| Archive directory empty after activation | No tag assigned to the archive, or archive not started | Open Tag Logging, confirm at least one tag is linked to the archive; restart WinCC Runtime |
| Many tiny segment files (one per minute) | Segment size limit set too low (< 1 MB) or trigger set to "On overflow" | Raise size limit to ≥ 100 MB; set explicit time trigger |
| Single very large segment file (> 5 GB) | Size limit too high and time trigger not firing | Set explicit daily or weekly time trigger; reduce size limit |
| Trend shows gaps at midnight | Segment change too slow, runtime waiting for size trigger | Enable explicit time trigger; reduce per-segment size limit |
| Alarm: "Archive segment cannot be opened" | Segment file corrupted or locked by backup software | Stop WinCC Runtime, delete the corrupted segment, restart |
| Oldest segment overwritten before retention | Disk full or disk-space watchdog active | Free disk space; raise watchdog threshold; enable swap-out |
| Segment change at wrong time of day | Local time on the server is incorrect, or DST change | Synchronize server time via NTP; verify timezone in WinCC Computer properties |
| Cannot extend retention beyond configured N segments | Local archive is fixed-size by design | Enable Process Historian or CAS for long-term storage |
Performance Considerations
Segment change is a small but non-zero operation: WinCC closes the current database, performs an internal consistency check, and opens a new file. On a WinCC V8.0 server with SQL backend this typically takes 200 to 800 ms, during which new archive writes are buffered in memory. With a daily trigger at midnight and a stable process, this delay is invisible. However, with a size-trigger rollover occurring during a high-rate batch, the buffered write may exceed the configured queue depth (default 10 000 records) and trigger an overflow alarm. If your plant produces bursts of archive traffic, prefer a time-based segment change so the rollover happens during a quiet period.
For trend online display performance, the WinCC Trend Control reads segments in chronological order. A small number of large segments (e.g. 24 monthly files) is faster to scroll through than thousands of small daily files, but a single corrupted large segment is more disruptive to recover from. For most 2-year retention scenarios, a daily trigger with a 1 to 2 GB size limit is the best compromise.
Sample Calculation Worksheet
Use the following template to size any new WinCC project:
Project: _______________
Retention target: ____ days
Local disk size: ____ TB
Tag group 1: ____ tags × ____ s cycle × ____ bytes/rec = ____ MB/day
Tag group 2: ____ tags × ____ s cycle × ____ bytes/rec = ____ MB/day
Tag group N: ____ tags × ____ s cycle × ____ bytes/rec = ____ MB/day
Alarms: ____ events/day × 256 × 1.10 = ____ MB/day
Total = ____ MB/day
× Retention days = ____ GB
× 1.25 slack factor = ____ GB
Disk headroom check: local disk ≥ 1.25 × GB above → OK
Segment count: retention_days / change_period = ____ segments per archive
Frequently Asked Questions
How many segments will a 1.5 TB disk hold for a 2-year retention?
It depends on the configured segment change trigger, not the disk size. With a daily trigger, each of the three cyclic archives produces up to 730 segments. With a monthly trigger, 24 segments per archive. The 1.5 TB capacity is almost never the limiting factor; the segment change configuration is.
What is the difference between time-based and size-based segment change?
Time-based change closes the current segment and opens a new one at a fixed interval (daily, weekly, monthly, yearly). Size-based change closes the segment when it reaches a configured size limit (1 MB to 2 GB). Both triggers are evaluated; whichever fires first wins. The official Siemens support entry 24195891 documents the time-of-day behavior in detail.
Can I extend WinCC retention beyond 2 years without buying Process Historian?
Only by raising the per-segment size limit and accepting very large files, or by enabling swap-out to a secondary volume. The local cyclic archive is always fixed-size; once the configured number of segments is reached, the oldest is overwritten. For true long-term retention beyond 1 to 2 years, install the Process Historian option or a CAS server.
Why does my AlarmArchive produce a segment every minute?
Almost always because the segment size limit is set below the alarm event volume, or because the alarm rate is very high and the default 32 MB limit is being hit repeatedly. Increase the size limit to at least 64 MB and confirm the time trigger is set to "Once a day" rather than "On overflow only".
Does the WinCC archive path need to be a local fixed disk?
Yes. The cyclic archive manager and the disk-space watchdog both assume a local NTFS path. Network shares and removable drives are not supported for the active archive path. Use swap-out to copy closed segments to a network share or NAS for backup.
How do I migrate an existing WinCC project to a larger disk?
Stop WinCC Runtime, copy the entire Archive folder from the project directory to the new volume, redirect the storage path in Computer > Properties > Archives to the new location, and restart Runtime. Closed segment files are read-only and portable; only the currently open segment must be closed cleanly before the move.