Problem Overview
When migrating a Siemens WinCC project from V4.x to V5.1 SP1 (or any V5.x target), engineers frequently report that the migrated database opens without errors, but the tag editor shows zero entries — or a substantial subset of the original tag set (commonly 800–1,200 tags on a typical SIMATIC S7 MPI project) is missing. Internal cross-references in pictures, scripts, and archive configurations that point to the lost tag names evaluate to address 0 and raise runtime errors.
The migration tool Project Migrator completes the .mcp → .mdf database conversion, the picture tree rebuilds, the user administration migrates, and the alarm logging / tag logging archives copy forward. The only loss is the population of the Tags table inside the runtime database. This single symptom is misleading because the Tag Management dialog appears to be intact, the channel unit is present, and the connection (e.g., MPI under SIMATIC S7 Protocol Suite) is still listed — but it is empty.
MPI) with no Tag Groups or Tags nodes beneath it after upgrade, the tag table did not bind to the new project database. Do not assume the project is corrupted — the binary project data is correct, only the runtime tag reference is severed.Affected Versions and Tooling
| Component | Version Range | Notes |
|---|---|---|
| WinCC Source | V4.0, V4.02, V4.03, V4.04 | Pre-SQL Server era, 16-bit/32-bit hybrid |
| WinCC Target | V5.0, V5.0 SP1, V5.1, V5.1 SP1, V5.1 SP2, V5.1 SP3 | SQL Server 7.0/2000 backend |
| Project Migrator | Shipped with target V5.x DVD | Runs from Start > SIMATIC > WinCC > Tools
|
| Tag Export/Import | varexim.exe |
Available in V5.x; locate in \Siemens\WinCC\bin
|
| SIMATIC S7 Protocol Suite | Channel DLL S7CHN.dll
|
Supports MPI, PROFIBUS, TCP/IP, Named Connections |
| Related V7.x bug | WinCC V7.5 SP2 → Update2 | See SIOS 109794416 |
Root Cause Analysis
Three root causes account for the vast majority of V4.x → V5.x tag-loss incidents. Treat them as a layered checklist; one or more may apply to a given project.
1. Channel Not Authorized in the Target License / Release
WinCC V5.x enforces a tag-count and channel-license gate at project-open time. If the original V4.x project referenced a channel DLL that is present in V4.x but excluded, renamed, or downgraded in the V5.x installation (for example, a third-party OPC channel, a redundant channel, or a non-licensed PROFIBUS-FDL channel), the channel unit is silently stripped during migration, and all child tags disappear with it. The dialog shows no error — only an empty tree.
Open the original V4.x project on a machine that still has V4.x installed and inspect Tag Management > [Channel]. Note every channel DLL and every connection. Cross-check that each DLL is installed in the V5.x \bin folder and licensed on the new Authorization disk. If any DLL is missing, install the matching add-on package (e.g., SIMATIC S7 Protocol Suite, OPC Channel) from the V5.x DVD before attempting the upgrade.
2. SIMATIC S7 Protocol Suite Unit Lost During DB Bind
For the most common case — a project with a single MPI connection under the SIMATIC S7 Protocol Suite — the channel DLL S7CHN.dll is present, the connection is created, but the migration tool does not re-attach the Tags table fragment to the new connection. This is most often caused by a mismatch in the Connection parameters > S7-Network Address > Station Address field, where a value that V4.x tolerated (e.g., trailing whitespace, lowercase hex) is rejected by V5.x validation, causing the connection to fail to bind at upgrade time.
Procedure:
- In V5.1, right-click the MPI connection → Properties.
- Confirm Station Address parses as a plain decimal integer in the range 0–126 for MPI, or 0–127 for PROFIBUS.
- Confirm Segment matches the physically configured MPI segment (default
1, segment 0 for direct PG/PC connection). - Re-enter the address if any anomaly is visible, then save the project. The tag table re-binds on next project activation.
3. Underlying Database Schema Mismatch
V4.x stored the runtime tag list in a binary blob inside the project file, whereas V5.x persists tags in SQL Server tables (dbo.TAG, dbo.TAGTEXT, dbo.TAGATTR). If the Project Migrator cannot translate a tag attribute it does not recognize — typically a custom data type, an extended Length field, or a Quality Code parameter from a non-Siemens channel — the migration aborts the import of that record and continues. The result: most tags arrive, but a subset vanishes silently.
Inspect the migration log: Start > Programs > SIMATIC > WinCC > Tools > Project Migrator then click View Log. Search for WARN and ERR entries referencing tag IDs. Each ERR line identifies a tag that failed to migrate and is the candidate for manual re-creation.
Recovery Procedure A: Re-export from V4.x with varexim.exe
This is the cleanest path. It assumes a working V4.x installation is available (or a virtual machine snapshot of one). The varexim.exe utility — sometimes called the Tag Export/Import smart tool — serializes the tag table to a CSV-like text file that V5.x can re-import cleanly.
Step 1 — Export on V4.x
- Start WinCC Explorer on the V4.x host.
- Close all editors that hold tag references.
- Open a command prompt and navigate to
%WinCC%\bin(V4.x path:\Siemens\WinCC\bin). - Execute:
varexim.exe /export "C:\Export\V4tags.csv" /type tags /channel "SIMATIC S7 Protocol Suite\MPI" - Open the CSV in Notepad and verify the header row contains:
Name;Type;Length;Address;FormatConversion;Scaling;Limit;InitialValue;Replace(V4.x uses semicolon delimiters; the column order is fixed and must not be edited).
varexim.exe defaults to the system codepage. If the project contains German Umlauts, French accents, or any non-ASCII tag name, open the CSV in Notepad and save as UTF-8 with BOM before importing on the V5.x side to prevent silent character substitution.Step 2 — Transfer to V5.x
- Copy the CSV to the V5.x host (network share, USB, RDP mapped drive).
- Place it in a path without spaces, e.g.,
D:\Migration\V4tags.csv. Spaces in the path break the V5.xvareximparser in SP1.
Step 3 — Import on V5.x
- Open the migrated V5.1 SP1 project in the WinCC Explorer.
- Confirm the target channel and connection exist (e.g., SIMATIC S7 Protocol Suite > MPI). Create the connection manually if it is missing — match the Station Address, Rack, Slot to the V4.x values exactly.
- Close all tag-group views in the editor.
- Run:
varexim.exe /import "D:\Migration\V4tags.csv" /type tags /channel "SIMATIC S7 Protocol Suite\MPI" - The tool reports a summary:
Imported: NNNN / Skipped: N / Errors: N. Zero errors is the success target.
Step 4 — Validate
- In WinCC Explorer, right-click the Tags node under the MPI connection and select Properties. The tag count should match the V4.x source.
- Open Tools > Cross Reference and re-link any picture object, script, or archive field that points to a now-recreated tag. Cross-references written by V4.x sometimes contain a numeric ID (
TagID:4721) rather than the symbolic name;vareximre-issues the IDs and the old IDs become invalid. - Activate the project in test mode (Runtime > Start > Test Mode) and verify a known tag updates from the PLC.
Recovery Procedure B: Rebuild from Project Migrator Log
If a V4.x host is no longer available, the only source of truth is the migration log captured in V5.x.
- Open
Start > Programs > SIMATIC > WinCC > Tools > Project Migrator. - Click Open Log and load
ProjectMig.logfrom\<ProjectName>\Migrate\. - Filter for lines matching
Tag '.*' could not be migrated. Each line names a tag, its original channel, and a WinCC error number (commonly0x80040E21,0x80040E14). - Recreate the listed tags manually in the V5.x tag editor. The error code is the spec for what is wrong:
| Error Code | Meaning | Remedy |
|---|---|---|
0x80040E14 |
Data type not supported by installed channel | Install matching channel add-on, then re-import |
0x80040E21 |
Address expression invalid in V5.x syntax | Rewrite address; check DB number range and bit offset syntax |
0x80004005 |
Generic conversion failure | Inspect tag's Format/Conversion and Limit Values fields; clear and re-enter |
0x80070057 |
Parameter contains invalid characters | Rename tag to plain ASCII; remove trailing whitespace |
Verification Checklist
- Tag count parity: Tag Management > right-click root > Properties. The displayed count must equal the V4.x source count (or the V4.x source count minus tags that intentionally point to uninstalled channels).
- PLC round-trip test: In WinCC Runtime, write a known value to a writable tag and confirm the change is visible in STEP 7 online monitor on the matching DB / Merker / E/A address.
- Cross-reference integrity: Tools > Cross Reference should show zero entries flagged with a red exclamation mark. A red mark indicates a tag ID reference that no longer resolves.
-
Archive replay: If the project used Tag Logging, open the Tag Logging Editor and confirm every archive references a valid tag. A missing tag appears as
<undefined>in the archive configuration. - Alarm logging: Open Alarm Logging Editor and re-link any message that referenced a lost tag; the Acknowledgement tag and State tag columns are typical loss points.
Prevention: Pre-Upgrade Audit
Run this audit on the V4.x project before initiating any V5.x migration. Each item is a one-time check that prevents an after-the-fact scramble.
- Inventory channels. List every channel unit, the DLL backing it, and the connection count. Verify each DLL is on the V5.x installation media.
- Inventory non-standard tag types. Open Tag Management > Properties on each tag group. Tag any with Type = Raw Data Type or custom user types — these are the highest-risk rows for V5.x translation.
-
Snapshot the tag list. Run
varexim.exe /exportonce before migration, store the CSV in source control, and compare post-migration. - Validate addresses. Use STEP 7 to confirm that every DB and Merker address referenced by a tag still exists. Orphan addresses are valid syntax but unbind on first runtime start.
-
Back up the .mcp file. Keep the original V4.x project file in a versioned archive. The migration is one-way; the
.mcpis the only path back. -
Test on a clone. Copy the
.mcpto a sandbox, run the migrator, and verify tag count parity before touching production.
Related Issue: V7.5 SP2 Tag Display Regression
The same symptom — configured tags not displayed in the tag editor — recurred in WinCC V7.5 SP2 as a confirmed product defect. The official Siemens entry SIOS 109794416 — Why are all configured tags no longer displayed after the WinCC upgrade to V7.5 SP2? documents that the issue is resolved by installing WinCC V7.5 SP2 Update2. The mechanics are different (a UI cache invalidation rather than a database schema migration) but the diagnostic shape is identical: tags exist in the database, the tag management dialog opens, the tree is empty. If a project is later upgraded past V5.x toward V6.x, V7.x, or TIA Portal WinCC Professional, apply the corresponding cumulative updates before declaring the migration a failure.
OPC Migration Path (for Unlicensed Channel Owners)
If a tag is hosted on a channel that is unavailable in the target V5.x license, the recommended remediation is to migrate the tags to the OPC channel. Procedure:
- On the V4.x host, install the OPC Channel from the V4.x installation media (it is included even if unlicensed in run-time — it is licensed at the OPC server level).
- Run
varexim.exe /exportas above. - On the V5.x host, create a OPC channel unit and an OPC group that matches the source connection name.
- Import the CSV with the OPC channel as the target.
- Reconfigure the OPC DA server (e.g., SIMATIC NET OPC Server, WinCC OPC Server) to publish the same item names.
This path is also the bridge for SCADA-to-SCADA migrations where a customer is consolidating on a newer WinCC version or moving to TIA Portal WinCC Professional V16/V17/V18 and needs the legacy V5.x tags to remain addressable.
Troubleshooting Matrix
| Symptom | Likely Cause | First Action |
|---|---|---|
| All tags missing, channel present | Channel DLL not installed or licensed | Verify \bin DLLs; re-install protocol suite |
| ~1,000 tags missing on MPI project | Station address / connection binding failed | Edit connection properties; re-save |
| Random subset missing, log shows errors | Schema mismatch on custom tag types | Recreate flagged tags manually; document for varexim |
| Tags present but values are 0 in runtime | Address not bound to PLC after migration | Use STEP 7 to verify address exists; check rack/slot |
| Cross-reference marks red after migration | Tag IDs re-issued by varexim | Re-link by name from picture / script editor |
CSV import reports Errors: N
|
Encoding or delimiter mismatch | Re-save CSV as UTF-8 BOM; semicolon delimiter |
| Channel not visible at all | Channel DLL dropped from V5.x install | Install add-on from V5.x DVD; re-run migrator |
Field-Proven Caveats
- The Test Mode runtime does not validate cross-references; a successful test-mode start is not proof that the migration succeeded. Always use Cross Reference for a static check.
-
varexim.exeis a single-threaded tool. It cannot be safely run against a project while the WinCC Runtime is active. Stop the runtime before any export or import. - Tag names in V4.x are case-preserved and case-insensitive. V5.x retains the same behavior, but
vareximis case-sensitive on import. A tag namedMotor_Onin V4.x will not be deduped against a pre-existingmotor_onin V5.x — both will exist, and runtime will pick the first match it encounters. - Projects with more than 8,000 tags benefit from splitting the CSV by channel before import.
vareximdoes not chunk transactions; a 30,000-row import with a single corrupt row can roll back the entire batch on SQL Server 2000. - Always verify the resulting tag count via the V5.x Tag Management > Properties dialog and against the V4.x source count. The runtime Status > Tags view shows the count only for tags currently being polled, which can be a subset.
FAQ
Why do all my tags disappear when I open a V4.x project in WinCC V5.x?
The most common cause is that one or more channel DLLs referenced in the V4.x project are not present or not licensed in the V5.x installation, so the channel unit is stripped during migration and all child tags go with it. Verify each channel DLL in \Siemens\WinCC\bin and re-install the matching add-on from the V5.x DVD before re-running the migrator.
Is the varexim.exe tag export/import tool available in WinCC V4.x?
varexim.exe ships with WinCC V5.x and is located in \Siemens\WinCC\bin. It is not part of the V4.x base install, so it cannot be used to export from V4.x directly. Use the V4.x Tag Management editor's built-in export or, if the source is already V4.x, run the migrator on a clone and let the SQL Server backend capture the tag table.
My migrated V5.1 project opens without errors but the tag tree is empty. Is the project corrupted?
No — the binary project data is intact. The tag table is the only artifact that has failed to bind. Open the Project Migrator log at \<ProjectName>\Migrate\ProjectMig.log, search for ERR entries naming tags, and use the procedure in this article to re-import via varexim.exe or to recreate the flagged tags manually.
Does WinCC V7.5 SP2 have the same tag-loss symptom on upgrade?
Yes. A confirmed Siemens product defect causes configured tags to be hidden in the tag editor after upgrading to V7.5 SP2. Install V7.5 SP2 Update2 to resolve; see SIOS 109794416 for the official entry.
Can I migrate V4.x tags to a different channel, such as OPC, during the V5.x upgrade?
Yes. Export the tag list with varexim.exe /export on the V4.x host, create the new channel unit (for example OPC) in the V5.x project, and re-import specifying the new channel. The CSV file itself does not need to change — only the /channel parameter on the import command. Verify the OPC DA server publishes the matching item names before runtime activation.