Problem Overview
After migrating a WinCC V7.2 project to WinCC V7.3 SE Update 1, the Global Script Diagnostics pane reports HMITag:Unknown Tag for internal variables defined as 16-bit character type. Deleting the first reported tag does not clear the fault: Global Script Diagnostics immediately re-emits the same error class for the next internal tag in the project, until the script execution cycle has cycled through the affected tag list. The same project executes cleanly under WinCC V7.2 on the same Windows 7 Professional 64-bit virtual machine, which points to a project-conversion artifact rather than a hardware or OS fault.
The error class HMITag:Unknown Tag is raised by the WinCC C-Script and VBScript runtime when a GetTag* / SetTag* function call (or an equivalent HMIRuntime.Tags object method in VBS) cannot resolve the supplied tag name against the live tag database. The string is logged by the diagnostic subsystem, the script action aborts for that call, and the runtime continues with the next statement. Because the diagnostics pane reports only the tag name and not the call site, the engineer is forced to inspect every script that touches the affected names.
Affected Versions and Environment
| Component | Version in Source Case | Notes |
|---|---|---|
| Source runtime | SIMATIC WinCC V7.2 | No errors; clean execution |
| Target runtime | SIMATIC WinCC V7.3 SE Update 1 | Reports HMITag:Unknown Tag |
| Recommended fix path | SIMATIC WinCC V7.3 Update 3 or later | Includes internal tag database and script runtime fixes |
| Host OS | Windows 7 Professional SP1 64-bit | VMware Workstation VM (supported for V7.3 SE) |
| Tag type involved | Internal, 16-bit character (CHAR/UINT16) | Also seen on 32-bit DWORD and TEXT tags |
| Script engines | C-Script (ANSI-C) and VBScript | Diagnostic string is identical for both |
WinCC_Version.txt in the WinCC installation directory before troubleshooting.
Root Cause Analysis
Three independent failure modes can each produce the HMITag:Unknown Tag string. The source case matches the first mode, but the diagnostic procedure must rule out the other two before applying a corrective action.
Mode 1 — Project-conversion / tag database inconsistency
WinCC stores tag metadata in RT_***.LDF and RT_***_*.LDF tables inside the project root. The Project Migrator used by the V7.2 → V7.3 SE conversion re-creates these tables and re-indexes the internal tag list, but the VBScript and C-Script action compilations are stored separately in *.pas and *.vb files under \<Project>\library\. If the migration completes the tag database but the script compiler cache is not fully invalidated, the script engine may reference a tag name that the migrated database no longer publishes. The runtime then returns HMITag:Unknown Tag for that name until the script is re-compiled and the database is re-loaded.
Mode 2 — Case-sensitivity mismatch between script and tag management
The WinCC Tag Management performs case-insensitive name comparison: MyTag and mytag refer to the same database entry. The VBScript and C-Script GetTag* / SetTag* functions perform case-sensitive lookup. A tag created in the database as Pressure_SP but accessed from a script as pressure_sp returns HMITag:Unknown Tag at runtime, even though the tag is visible in the tag management. This is by design and is documented in the WinCC Information System under "Scripting — Accessing tags".
Mode 3 — Special national characters in tag names
Tag names containing non-ASCII characters (e.g., German umlauts, accented Latin, Cyrillic) survive in WinCC V7.2 because the project file format is ANSI-encoded. In WinCC V7.3 SE, the project migrator normalises tag names to UTF-8 for cross-locale compatibility. Any script reference that still uses the original ANSI byte sequence then fails the lookup. Renaming the tag to ASCII in Tag Management and updating every script reference is the only deterministic fix.
Diagnostic Procedure
-
Capture the exact tag name from the diagnostics pane. Open WinCC Explorer → Global Script → Diagnostics and copy the full text of the
HMITag:Unknown Tagentry. The name appears in brackets after the error class; record the exact spelling, including case. - Verify the tag exists in Tag Management. Open Tag Management and search for the copied name. If absent, the migration has dropped the tag — proceed to step 3. If present, continue to step 4.
- Re-create the missing tag with identical properties. Right-click the parent group → Add New Tag. Match the data type (16-bit unsigned character, UINT16, or the type recorded in the original project), the internal/external classification, and any limit values, start value, or substitute value. Recompile Global Script.
-
Compare the script reference to the database spelling. Open each script file under
\<Project>\library\and search for the tag name. The VBScript and C-Script editors are case-sensitive on lookup, so a one-character difference produces the error. - Check the action trigger for cyclic re-entry. A cyclic action that references a non-existent tag will produce one error per cycle. The diagnostics pane therefore appears to "cascade" through tags, which is what creates the impression of a corrupted database.
-
Inspect the migration log. The V7.2 → V7.3 SE migration writes
MigrationReport.xmlto the project root. Open the file in a browser and search for the tag name; a non-zero result indicates the migrator flagged the entry. - Validate with a clean V7.3 SE project. Create an empty WinCC V7.3 SE project, copy the affected internal tags and one referencing script, then start runtime. If the error disappears, the migrated database is the issue. If it persists, the script source itself is the issue.
HMITag:Unknown Tag immediately after the previous one is "cleared" by deletion, you are almost always looking at a cyclic action that scans a list of tag names with a misspelled entry. The list of offending tags is the order in which the script visits the entries, not the order in the database. Focus on the first reported name; fixing it often clears the cascade.
Inline Diagnostic Flow
Resolution Path
Step A — Apply WinCC V7.3 SE Update 3 (or the highest available SE update)
Update 3 contains an internal tag database rebuild routine that re-creates the migrated index and clears orphaned script references. Install the update in the order WinCC → S7DOS → STEP 7, restart the VM, then re-open the project. The Project Migrator is no longer required because the project is already at V7.3 level; simply opening the project under the updated runtime triggers the rebuild on first start.
- Close WinCC Explorer and stop the WinCC runtime service.
- Insert the WinCC V7.3 SE Update 3 DVD or mount the ISO.
- Run
Setup.exeand accept the licence terms. - Reboot the VM. The service
CCAgentandWinCC Runtimeare restarted automatically. - Reopen the project in WinCC Explorer and trigger Project → Compiler → Recompile All from the Global Script editor.
Step B — Repair the script if Update 3 alone does not clear the fault
Open the Global Script editor and search every GetTag*, SetTag*, GetTagWord, GetTagChar, and GetTagFloat call site. Replace the literal name string with the case-correct version that matches the Tag Management entry. The recommended pattern is a central name constant to prevent future drift:
' VBScript — central tag name constants
Const TAG_PRESSURE_SP = "Pressure_SP"
Const TAG_TEMP_C = "Temp_C"
Dim v
v = HMIRuntime.Tags(TAG_PRESSURE_SP).Read
HMIRuntime.Tags(TAG_TEMP_C).Write v / 10
The equivalent C-Script pattern uses #define at the top of the action file:
// C-Script — central tag name constants
#define TAG_PRESSURE_SP "Pressure_SP"
#define TAG_TEMP_C "Temp_C"
{
float v = GetTagFloat(TAG_PRESSURE_SP);
SetTagFloat(TAG_TEMP_C, v / 10.0F);
}
Step C — Open a Siemens Support Request if the fault persists
If Update 3 plus script repair do not resolve the error, raise a support request through the Siemens Industry Online Support portal. Attach the full WinCC project archive (Project → Archive), the MigrationReport.xml, the WinCC_Version.txt, and the last 200 lines of WinCC_RT_<ComputerName>.LOG. Siemens Technical Support can then reproduce the migration under controlled conditions and provide a hotfix if the issue is closed-source.
Verification
- Start WinCC runtime. Open Global Script → Diagnostics. Confirm the
HMITag:Unknown Tagstring is no longer present. - Open the OS project editor and verify the picture that originally triggered the script still loads without the red error overlay.
- Force a tag update: in Tag Management, right-click the affected internal tag and select Modify Start Value. Set a new value and confirm the screen update.
- Run a full Project → Compiler → Compile All in OS, Graphics, and Global Script. All three must return zero errors.
- Trigger a restart of the WinCC runtime service (
WinCC.exe -restart) and confirm the diagnostics pane remains clean after 30 minutes of continuous runtime.
Tag Type Reference
| WinCC data type | Native bytes | Common C-Script getter | Common VBS getter | Case-sensitive at runtime |
|---|---|---|---|---|
| Binary Tag | 1 | GetTagBit |
HMIRuntime.Tags(...).Read |
Yes |
| Signed 8-bit | 1 | GetTagSByte |
HMIRuntime.Tags(...).Read |
Yes |
| Unsigned 8-bit / Char | 1 | GetTagByte |
HMIRuntime.Tags(...).Read |
Yes |
| Signed 16-bit | 2 | GetTagShort |
HMIRuntime.Tags(...).Read |
Yes |
| Unsigned 16-bit (Char 16) | 2 | GetTagWord |
HMIRuntime.Tags(...).Read |
Yes |
| Signed 32-bit | 4 | GetTagLong |
HMIRuntime.Tags(...).Read |
Yes |
| Float 32-bit | 4 | GetTagFloat |
HMIRuntime.Tags(...).Read |
Yes |
| Float 64-bit | 8 | GetTagDouble |
HMIRuntime.Tags(...).Read |
Yes |
| Text 8-bit / 16-bit | n | GetTagChar |
HMIRuntime.Tags(...).Read |
Yes |
| Raw data type | n | GetTagRaw |
n/a | Yes |
Note: every Get* function above returns "HMITag:Unknown Tag" if the name lookup fails at runtime. The string is identical across data types, which is why a single wrong character in the name can mask a much larger data-type mismatch.
Preventive Checklist
- Enforce ASCII-only tag names and a strict naming convention (e.g.,
Area_Unit_Function) before any WinCC upgrade. - Centralise tag name strings in
#defineorConstdeclarations; never embed raw names in two places. - Run the V7.x → V7.x SE migration on a copy of the project and inspect
MigrationReport.xmlfor warnings. - Apply the latest WinCC SE Update before commissioning; V7.3 SE Update 3 is the minimum recommended baseline for any production line that uses internal tags with cyclic scripts.
- Subscribe to the Siemens ProductCERT and Security advisories feed to receive notification of post-release fixes that may affect migrated projects.
- After every WinCC update, schedule a 30-minute runtime soak test with the Global Script Diagnostics pane open.
Adjacent Issues and Edge Cases
Redundant tags from V7.2 reference projects
If the V7.2 project referenced tags from a second WinCC server through WinCC Reference Graph or OPC, the migration may resolve the local reference but leave the remote tag import stranded. The local script then triggers HMITag:Unknown Tag on the next cycle. Re-establish the reference link through the WinCC Reference Graph editor and recompile.
Internal tags renamed by an external tool
Third-party tag-export utilities that edit the RT_***.LDF table outside the WinCC Explorer sometimes leave a script-visible alias pointing to a deleted entry. The alias is not shown in Tag Management but the script lookup still succeeds, producing inconsistent behaviour. The remedy is to re-import the tag list through the official Tag Export/Import function inside WinCC Explorer.
Multi-user engineering with project replication
When two engineers work in parallel on the same project via WinCC multi-user engineering, a tag that one engineer deletes may continue to exist in the local script cache of the other. After a project merge, the surviving engineer's project can ship with stale script references. Always force a Recompile All on the integrator's machine before commissioning.
Comparison: Update Levels and Known Script Fixes
| WinCC V7.3 update | Release year | Internal tag DB fix | VBScript runtime fix | C-Script tag lookup fix |
|---|---|---|---|---|
| Base V7.3 | 2015 | — | — | — |
| Update 1 | 2015 | Partial | — | Partial |
| Update 2 | 2015 | Improved | Partial | Improved |
| Update 3 | 2016 | Complete | Complete | Complete |
Reference: Official Siemens Documentation
- Updating the tag value in runtime (RT Unified) — WinCC Unified V20 documentation
- WinCC V7.3 SPx read-me files (available from the Siemens Industry Online Support portal, entry ID 109746402)
- WinCC Information System — VBScript and C-Script reference (installed locally under
\<WinCC>\Documents\)
Frequently Asked Questions
Why does the same tag work in WinCC V7.2 but not in V7.3 SE Update 1?
The V7.3 SE migration rebuilds the internal tag database index and re-encodes project metadata to UTF-8. Scripts compiled under V7.2 may reference a tag name whose exact spelling is no longer present in the rebuilt index. Apply V7.3 SE Update 3 and re-compile Global Script; if the error remains, the script contains a case or character mismatch that V7.2 tolerated but V7.3 SE does not.
Is the WinCC tag database case-sensitive?
Tag Management performs case-insensitive name comparison, so Pressure_SP and pressure_sp are the same database entry. The script GetTag* / SetTag* functions and the VBS HMIRuntime.Tags(...) object perform case-sensitive lookup. Always use the exact case shown in Tag Management and centralise the name in a single constant.
Can special national characters cause the HMITag:Unknown Tag error after migration?
Yes. WinCC V7.2 stored tag names in ANSI encoding. WinCC V7.3 SE normalises them to UTF-8. Any script reference that still uses the original ANSI byte sequence fails the lookup. Rename the tag to ASCII in Tag Management and update every script reference to the new name.
Does WinCC V7.3 SE Update 3 fix the HMITag:Unknown Tag error?
Update 3 contains the cumulative fix set for the internal tag database, the VBScript runtime, and the C-Script tag lookup, and resolves the failure mode reported for the source case. After installing Update 3, run Project → Compiler → Recompile All in the Global Script editor and restart the runtime.
What is the fastest way to find the script that triggers HMITag:Unknown Tag?
Open the Global Script editor and use the Find in Files function (Ctrl+Shift+F) to search the entire \<Project>\library\ tree for the tag name reported in the diagnostics pane. The first result is almost always the call site because the diagnostic string lists the tag name in the order the script visits it. Replace the literal with a constant and recompile.