Resolving OS Compilation Error 16003 - Compilation of Archive Tags Was Canceled in SIMATIC PCS 7
In SIMATIC PCS 7 (v8.2 and v9.0), OS compilation aborting with 'Internal error: The compilation of archive tags was canceled. Error number: 16003' indicates a database inconsistency or duplicate tag conflict in WinCC Tag Logging. This occurs when identical archive tag names are compiled from merged AS projects, when deleted CFC blocks leave orphan archive records, or when Tag Logging runtime caches become corrupted. Resolving this requires identifying duplicate tags in the compilation log, resetting Tag Logging and Alarm Logging databases, executing a full AS compilation with module drivers, and running a full OS compile with memory reset.
Table of Contents
- Mechanics of the AS-OS Compilation Archive Tag Phase
- Root Causes of Error 16003 and Database Inconsistencies
- Diagnostic Matrix: OS Compilation Error Codes and Underlying Causes
- Analyzing the OS Compilation Log for Duplicate Tag Names
- Step-by-Step Procedure to Clear Error 16003 and Recompile the OS
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Mechanics of the AS-OS Compilation Archive Tag Phase
During an AS-OS Compilation in SIMATIC Manager:
1. Tag Compilation: The compiler extracts process variables marked with S7_m_c := 'true'.
2. Message Compilation: Translates Alarm_8P definitions into WinCC Alarm Logging.
3. Archive Tag Compilation:
The compiler evaluates block pins configured for historical archiving (e.g., analog process values tagged for Tag Logging Fast or Tag Logging Slow). It connects to the WinCC Tag Logging SQL database and updates archive tag tables.
* The Error 16003 Abort:
If the compiler attempts to insert an archive tag whose name or ID already exists, or if the Tag Logging SQL table rejects the schema update, compilation terminates immediately with Error number: 16003.
Root Causes of Error 16003 and Database Inconsistencies
- Duplicate Archive Tag Collision:
When multi-user projects are merged or when an AS project is restored from an independent backup, two separate CFC charts may define identical archive tags (e.g.,BAVN17403/1.FbkCloseOut#Value already exists). - Orphan Archive Tags from Deleted Blocks:
If an engineer deletes a CFC chart containing archived tags and performs a delta OS compile, WinCC retains the historical archive tag pointer while the source AS tag is gone, creating an orphan key violation. - Tag Logging Runtime Cache Corruption:
An unexpected power cut or hard termination of SIMATIC Manager during a previous compile can corrupt the local SQL Server Tag Logging database (<Project>.mdf). - Group Display Hierarchy Failure:
Often paired with warningICCCSigGdo->ConstructCSigHierarchy error -2147467259, indicating that the Plant Hierarchy structure tags conflict with WinCC Picture Tree Manager.
Diagnostic Matrix: OS Compilation Error Codes and Underlying Causes
The table below outlines common AS-OS compilation error codes:
Compilation of archive tags canceledError occurred while updating archive tagsConstructCSigHierarchy failedTag Management compilation errorAnalyzing the OS Compilation Log for Duplicate Tag Names
To pinpoint the exact tag causing the failure:
1. In SIMATIC Manager, select the OS object.
2. Click Options -> OS -> Compilation Log (or inspect Transfer.log in the OS project directory).
3. Search for the keyword already exists.
4. The log identifies the exact colliding tag string (e.g., BAVS17001/1.Ctrl#Value already exists), revealing the specific CFC chart and block requiring remediation.
Step-by-Step Procedure to Clear Error 16003 and Recompile the OS
- Audit and Rename Duplicate CFC Blocks:
Open the CFC charts identified in the compilation log. Ensure all block instances and tag comments are globally unique across the multiproject. - Execute Full AS Recompilation:
* In SIMATIC Manager, select the AS chart folder.
* Click Charts -> Compile -> Entire program. Ensure Generate module drivers is checked.
* Click OK. - Reset Tag Logging in WinCC Explorer:
* Open WinCC Explorer on the Engineering Station.
* Open Tag Logging.
* Locate the problematic archive folder. If duplicate or corrupt archive tags exist, delete them manually.
* Close Tag Logging and close WinCC Explorer. - Execute Full OS Compilation with Memory Reset:
* In SIMATIC Manager, right-click the OS Server object and select Compile.
* In the OS compilation wizard, select Entire OS.
* Check the box: With memory reset (this purges stale tag logging pointers and rebuilds the WinCC tag dictionary cleanly).
* Complete the wizard. Compilation will finish with zero errors. - Download to Target OS Servers:
Perform a Target OS download to synchronize the rebuilt database with the plant runtime servers.
Verification
To verify that Error 16003 is resolved:
1. Check the OS Compilation summary dialog. Confirm that it displays 0 Errors, 0 Warnings.
2. Open WinCC Explorer -> Tag Logging. Confirm that all process value archives (Fast and Slow) populate with their respective tag members.
3. Open a WinCC process graphic containing trend curves. Verify that historical and online curves draw smoothly without broken communication status.
Limitations and Operational Precautions
- Memory Reset Preserves Historical Logs: Compiling the OS "With memory reset" rebuilds configuration metadata; it does not delete historical trend archives stored on the hard drive or Process Historian.
- Delta Download Lockout: Compiling the entire OS with memory reset requires a full download to the OS Server (or stopping runtime if changes cannot be loaded in delta mode). Plan execution during planned maintenance windows.
- Licensing Disclaimer: SIMATIC PCS 7 OS engineering and runtime packages (
6ES7658-2CX58-0YB5) must be validated against the applicable Siemens catalog and authorized distributor quotation.
Engineer FAQ
Technical References
- SIMATIC Process Control System PCS 7 Operator Station OS Configuration (A5E39875158-AA)
- SIMATIC HMI WinCC Tag Logging Configuration Manual (A5E37536412-AB)
- SIMATIC PCS 7 CFC for S7 Configuration Manual (A5E35802288-AB)
Related Articles
- Understanding AS-Prefixed Structure Types in PCS 7 v8.1 and v8.2 AS-OS Compilation
- Troubleshooting Missing Block Icons in WinCC Graphic Designer After OS Compilation
- Integrating Standalone WinCC Projects into SIMATIC PCS 7 Multi-Projects - AS-OS Transfer and Read-Only Tags
Related Tags
- OS Compilation
- Error 16003
- Archive Tags
- Tag Logging
- Memory Reset
- Duplicate Tags