Configuring Tag Logging Archive Retention and Segment Limits in PCS 7 OS (V8.2 SP1)
To increase process trend retention from 10 days to 30 days in SIMATIC PCS 7 V8.2 SP1 WinCC OS, open WinCC Explorer, expand the 'Tag Logging' editor, right-click 'Archive Configuration', and select 'Properties' for both 'TagLogging Fast' and 'TagLogging Slow'. In the Archive Configuration dialog, increase the 'Time period of all segments' to 30 days (or 1 month) and proportionally increase the 'Max. size of all segments'. WinCC maintains a circular ring buffer that deletes or purges the oldest individual database segment whenever the time limit or maximum disk capacity is exceeded, whichever threshold is reached first.
Table of Contents
- WinCC Process Value Archiving: TagLogging Fast vs TagLogging Slow
- Archive Segmentation Architecture and Circular Ring Buffering
- Configuration Parameters for Tag Logging Archives in PCS 7 V8.2 SP1
- Step-by-Step Procedure to Expand Trend Retention to 30 Days
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
WinCC Process Value Archiving: TagLogging Fast vs TagLogging Slow
In SIMATIC PCS 7 V8.2 SP1 (WinCC V7.4), process values are recorded into Microsoft SQL Server database segments via the Tag Logging subsystem. To optimize database performance and prevent disk I/O bottlenecks, WinCC divides continuous process archiving into two distinct archive engines:
- TagLogging Fast: Dedicated to high-frequency process variables with acquisition and archiving cycles of less than or equal to 1 minute (e.g. 1 second, 2 seconds, 5 seconds). Fast data is compressed in high-performance binary ring files before being flushed to SQL segments.
- TagLogging Slow: Dedicated to low-frequency variables with acquisition and archiving cycles greater than 1 minute (e.g. hourly energy totals, 15-minute tank levels, daily totals).
Both archive engines operate completely independently and each possesses its own dedicated segment management settings under the Archive Configuration editor.
Archive Segmentation Architecture and Circular Ring Buffering
WinCC does not write historical data into a single monolithic file. Instead, it creates discrete, time-bounded database segments (.mdf and .ldf files) within the project's ArchiveManager\TagLoggingFast\ and ArchiveManager\TagLoggingSlow\ directories.
The lifecycle of historical data is governed by two concurrent boundaries:
- Time-based boundary: 'Time period covered by a single segment' (e.g. 1 Day) and 'Time period of all segments' (e.g. 30 Days).
- Capacity-based boundary: 'Max. size of a single segment' (e.g. 500 MB) and 'Max. size of all segments' (e.g. 20 GB).
A new segment is detached and created whenever either the individual segment time or segment size is reached. Similarly, when the cumulative total of all segments reaches either the total configured time period OR total configured disk size, the oldest segment is permanently detached or deleted. If disk size is set too small, segments will be deleted before the 30-day time target is reached!
Configuration Parameters for Tag Logging Archives in PCS 7 V8.2 SP1
The following table details the recommended parameters for 30-day tag retention on a standard PCS 7 OS Server:
Step-by-Step Procedure to Expand Trend Retention to 30 Days
Follow this procedure on the Engineering Station (or OS Server) to reconfigure Tag Logging retention:
-
Calculate Required Disk Capacity:
- Estimate total data throughput:Bytes/Day = Number of Fast Tags * (86,400 / Acquisition Cycle in sec) * 16 bytes.
- Multiply by 30 days and add a 30% safety margin. Ensure the server's archive drive has sufficient unallocated space. -
Open Tag Logging Archive Configuration in WinCC Explorer:
- In WinCC Explorer, double-click the Tag Logging editor.
- In the navigation tree, right-click TagLogging Fast and selectArchive Configuration. -
Configure TagLogging Fast Parameters:
- In the 'Properties - TagLogging Fast' dialog, navigate to the Archive Configuration tab.
- Set Time period of all segments to30 Days(or select1 Month).
- Increase Max. size of all segments to match your calculated capacity (e.g.30000 MB).
- Set Time period covered by a single segment to1 Day.
- Click Apply. -
Configure TagLogging Slow Parameters:
- Right-click TagLogging Slow and selectArchive Configuration.
- Set Time period of all segments to30 Days.
- Adjust maximum total size accordingly (typically 2 to 5 GB for slow tags).
- Click OK. -
Deploy Changes to OS Servers:
- In SIMATIC Manager, perform an AS-OS compile if tag structures were modified, or use the WinCC Project Duplicator / OS download to transfer the updated project to the redundant OS Server pair.
- The new archive limits take effect dynamically without requiring an OS restart.
Verification
Verify the archive configuration in WinCC Runtime:
1. In Windows Explorer on the OS Server, navigate to [Project_Path]\ArchiveManager\TagLoggingFast\.
2. Verify that segment files (.mdf and .ldf) are created with timestamps reflecting the configured single-segment interval (1 day).
3. Open WinCC Runtime on an operator station, open a trend control window (WinCC Online Trend Control), and query historical data.
4. As time advances past 10 days, verify that trend data from Day 11 through Day 30 remains completely queryable and continuous without truncation.
Limitations and Operational Precautions
- SQL Server Segment Limits: Siemens officially restricts the maximum number of connected SQL Server segments on a WinCC OS Server to 400 segments (combined TagLogging Fast, TagLogging Slow, and AlarmLogging). Exceeding 400 segments degrades SQL Server performance and causes UI lag.
- Disk Capacity Priority: If the hard drive fills up, WinCC will automatically delete older segments regardless of the '30 Days' setting. Always monitor available disk space via Windows alerts.
- Process Historian Requirement for Multi-Year Retention: For retention periods exceeding 3 to 6 months, local OS Server archiving is not recommended. Deploy SIMATIC Process Historian to offload local server resources.
Engineer FAQ
Why did my trends still delete after 10 days even though I set time to 30 days?
You likely forgot to increase the 'Max. size of all segments'. WinCC deletes the oldest segment when EITHER the time limit OR the disk size limit is reached. If the disk size limit is reached first, older segments are purged regardless of the 30-day setting.
What is the difference between TagLogging Fast and Slow?
TagLogging Fast handles tags with archiving cycles of 1 minute or less, utilizing optimized binary compression. TagLogging Slow handles tags with cycles greater than 1 minute.
Do I need to restart WinCC Runtime to change Tag Logging archive retention?
No. Modifications made to the Archive Configuration dialog take effect immediately in runtime. The WinCC DataManager dynamically adapts to the new segment parameters without interrupting active data acquisition.
Technical References
- SIMATIC Process Control System PCS 7 Compendium Part A - Configuration Guidelines (A5E45063013-AA)
- SIMATIC HMI WinCC V7.4 WinCC: Working with WinCC Manual (A5E37536408-AB)
- Siemens Industry Online Support FAQ: Configuration of archives and archive segments in WinCC (Entry ID 109740190)
- Siemens Technical Manual: Determining Archive Storage Requirements for PCS 7 OS (Entry ID 22697857)
Related Articles
- Managing SQL Server MSDBData.mdf Growth and Backup History in SIMATIC Process Historian
- Automating Archive Segment Backup and Offline Deletion in Process Historian 2014
- Troubleshooting Process Historian Not Receiving Process Tags from WinCC Tag Logging
- Resolving WARNING! WinCC Messages Are Not Included in the Report in SIMATIC BATCH
Related Tags
- WinCC Tag Logging
- Archive Configuration
- TagLogging Fast
- TagLogging Slow
- PCS 7 V8.2
- Circular Ring Buffer