Overview
The most common failure mode engineers hit when moving tag definitions from a legacy WinCC Flexible 2008 SP2 project into a TIA Portal V11 SP1+ HMI device is the message "0 tags were converted" from the WinCC Tag Converter, followed by "No Tags Found" from the TIA Portal tag import wizard. The root cause is not the import — it is the wrong tool being used to generate the workbook. The WinCC Tag Converter ingests STEP 7-style interchange files (.asc, .dif, .sdf) and re-emits them as .xlsx; it does not parse a WinCC Flexible export. Feeding it a WinCC Flexible .csv produces an empty workbook that TIA Portal then correctly rejects.
This reference covers three production-grade paths to get those tags into a TIA Portal HMI project, ordered by recommendation:
- Project migration — port the entire WinCC Flexible project (tags, screens, alarms, recipes) into TIA Portal in one operation.
-
XLSX schema-compliant import — export a TIA Portal tag template, map the WinCC Flexible CSV columns to the TIA schema, save as
.xlsx, then import. - TIA Portal Openness API — automate the import of an XML tag table for bulk or scripted workflows.
Prerequisites
| Item | Minimum Version | Notes |
|---|---|---|
| Source: WinCC Flexible | 2008 SP2 Update 1 or later | Older SP levels (2008, 2007) still export; 2005 requires manual cleanup |
| Target: TIA Portal | V11 SP1 Update 2 (for migration) / V13+ recommended | V11 SP1 is the earliest release that accepts WinCC Flexible 2008 SP2 projects |
| HMI device firmware in target project | Must match a TIA-supported panel | OP73, TP170, MP270 are migration-blocked; OP77, TP177, MP177, MP277, MP377, Comfort Panels migrate cleanly |
| WinCC Tag Converter | Bundled with TIA Portal (Start → Siemens Automation → Tools) | Use only for STEP 7 .asc/.dif/.sdf source data |
| Microsoft Excel | 2010 or later | Required for the XLSX template; LibreOffice Calc works as a substitute |
| TIA Portal Openness (optional) | V13 SP1+ for HMI tag import APIs | Install via TIA Setup → User Interface → Openness |
Why the WinCC Tag Converter Reports "0 Tags"
The WinCC Tag Converter was designed for the STEP 7 SIMATIC Manager world where tag lists were exported as .asc (ASCII), .dif (Data Interchange Format), or .sdf (Symbol Definition File). It uses a fixed column parser that looks for the STEP 7 column header order:
Symbol | Address | Data Type | Comment
When you point it at a WinCC Flexible CSV, the header row looks completely different:
Name;Type;Connection;PLC;Address;Data Type;Length;Access Method;Comment
No header match → parser counts zero records → empty .xlsx is still written to disk so the tool does not fail outright, but TIA Portal's import filter (which keys on the "HMI Tags" sheet name and the column set) finds nothing to read and returns "No Tags Found". Treat any "0 Tags converted" result from the WinCC Tag Converter as a hard failure: do not attempt the TIA import on that file.
Method 1: Direct WinCC Flexible → TIA Portal Project Migration
Migration is the recommended approach when you have the source project archive and the target HMI device is on the TIA-supported list. It carries over tags, screens, alarms, recipes, area pointers, and user administration in one operation.
- In WinCC Flexible 2008 SP2, compile the project fully: Project → Compiler → All. Resolve every warning — broken cross-references and unresolved pointers are the #1 reason migration aborts.
- Close the project. Locate the
.hmifile (WinCC Flexible compact project) or.ziparchive (integrated with STEP 7). - Open TIA Portal V13 or V15. Select Project → Migrate project. Browse to the WinCC Flexible archive.
- The migration wizard analyzes the project and produces a log file at
%USERPROFILE%\AppData\Local\Siemens\Automation\Log\<timestamp>.xml. Open this log and search forSeverity="Error"entries. - If the source HMI is an OP73, TP170, TP170A/B, MP270, or MP270B, the wizard will reject the project — these panels are end-of-life and have no TIA equivalent. Re-platform to a TP177 or Comfort panel first.
- If the source uses a non-migrated driver (e.g., the legacy MPI driver for S7-300 with old routing), add an HMI connection manually after migration.
- After migration completes, recompile the TIA project. The compiler will list unsupported object types (typically certain ProAgent and Pascal scripting blocks) — these must be re-implemented.
Method 2: XLSX Schema-Compliant Tag Import
Use this method when you only need the tag list — not screens, alarms, or recipes — and the source HMI panel type is not eligible for migration.
Step 1 — Export the TIA Tag Template
- Open the TIA Portal target project.
- In the project tree, expand the HMI device → HMI Tags folder.
- Double-click Default tag table to open it.
- Right-click any tag row and choose Export → Export to Excel. TIA Portal writes an
.xlsxwith the exact column order, sheet name, and data-type encoding it expects on re-import. - Save the template as
tia_tag_template.xlsxin a working folder.
Step 2 — Required TIA Tag XLSX Schema
The TIA Portal import filter is strict about column order and casing. The minimum required columns for a Comfort Panel / WinCC Runtime Advanced import are:
| Column | Header (exact) | Required | Example |
|---|---|---|---|
| A | Name | Yes | Motor_Run |
| B | Path | No | Default tag table\Drives |
| C | Connection | Yes | HMI_Connection_1 |
| D | PLC | No | PLC_1 |
| E | Data Type | Yes | Bool |
| F | Length | Only for String | 80 |
| G | Address | Yes | %DB5.DBX0.0 |
| H | Access Method | Yes | Absolute access |
| I | Acquisition Cycle | No | 1 s |
| J | Comment | No | Main drive run feedback |
The workbook must contain a single sheet named HMI Tags. Additional sheets are ignored; renaming the sheet aborts the import.
Step 3 — Map WinCC Flexible CSV to the TIA Schema
Open the WinCC Flexible CSV in Excel using Data → From Text/CSV with the semicolon delimiter and UTF-8 encoding. Build a mapping:
| WinCC Flexible CSV Column | TIA XLSX Column | Transform |
|---|---|---|
| Name | Name | Copy as-is; strip spaces, replace - and / with _
|
| Type | — | Drop (TIA infers from Data Type) |
| Connection | Connection | Copy; verify name exists in TIA project |
| PLC tag table | PLC | Map to TIA PLC station name |
| Address | Address | Normalize to TIA syntax (e.g., DB5.DBX0.0 not DB 5 DBX 0.0) |
| Data Type | Data Type | Translate: BOOL→Bool, INT→Int, REAL→Real, STRING→String[80]
|
| Length | Length | Only for String; default 80 |
| Access Method | Access Method | Set to Absolute access for all |
| Comment | Comment | Copy as-is (UTF-8) |
Step 4 — Save and Import
- Save the file as
tags_for_tia.xlsxin Excel Workbook (.xlsx) format — do not keep it as.xlsmor.xls. - Ensure no formulas, no merged cells, no leading/trailing whitespace in the Name column, and that no two rows share the same Name (TIA rejects duplicates).
- In TIA Portal, right-click the HMI Tags folder → Import → browse to
tags_for_tia.xlsx. - Watch the Information pane for "Tags imported successfully: N" and inspect the Warnings tab for partial-fail rows.
Method 3: TIA Portal Openness API for Programmatic Import
For projects with hundreds of tag tables or a recurring build pipeline, drive the import through the Openness API. The V20 Openness documentation specifies the entry point for importing an HMI tag table from an XML file into a user-defined folder or a system folder. A minimal C# snippet that loads a pre-formatted tag XML and pushes it into the TIA project tree looks like this:
// Reference: Siemens.Engineering.dll and TiaOpenness assemblies
using Siemens.Engineering;
using Siemens.Engineering.HMI;
using Siemens.Engineering.HMI.Tag;
using Siemens.Engineering.HMI.TagTable;
using System.IO;
public static void ImportHmiTagTable(TiaPortal tia, Project project, string hmiName, string xmlPath)
{
HmiTarget hmi = project.Devices
.OfType<HmiTarget>()
.First(d => d.Name == hmiName);
HmiTagTableSystemFolders folders = hmi.TagFolders;
HmiTagTableFolder dest = folders.Find("Default tag table");
// XML must follow the TIA Openness HMI tag schema (TiaPortalV20 schema)
FileInfo xml = new FileInfo(xmlPath);
dest.TagTables.Import(xml, ImportOptions.Override);
}
Full schema, ImportOptions flags (Override vs. SkipExisting), and version-specific differences are documented in the TIA Portal Openness V20 — Importing an HMI Tag Table reference.
CSV Export Options in WinCC Flexible 2008 SP2
Knowing the exact export format helps you reverse-engineer the source:
- Open the WinCC Flexible project.
- Select Project → Tools → Tag export (or use the right-click context menu on a tag table).
- Choose CSV as the export format. The default delimiter is semicolon; the default code page is the system locale — set it explicitly to UTF-8 to avoid mojibake on German, Chinese, or Cyrillic tag names.
- Tick Include all tag tables to produce a single consolidated CSV rather than one file per table.
If the export produces multiple CSVs, concatenate them in Excel with Power Query → Combine Files, or use a simple script:
copy *.csv all_tags.csv
Import Wizard Behavior on Failure
When TIA Portal's tag import wizard displays "No Tags Found", it is the result of one of the following conditions — check them in order:
| Symptom | Root Cause | Fix |
|---|---|---|
| Wizard opens but rejects the file | Sheet name is not exactly HMI Tags
|
Rename the sheet; re-save |
| Wizard says "No Tags Found" | Header row missing one of Name / Data Type / Address | Re-export the TIA template, copy headers from it |
| 0 of N rows imported, warnings shown | Duplicate tag names or invalid characters in Name | Run a unique-check and regex replace [^A-Za-z0-9_] → _
|
| Connection column rejected | Connection name not defined in the TIA project | Pre-create the HMI connection with matching name |
| Address rejected with syntax error | WinCC Flexible uses DB 5.DBX 0.0 (spaces), TIA wants DB5.DBX0.0
|
Normalize with Find/Replace in Excel |
| Data Type column rejected | Mismatched casing (TIA wants Bool not BOOL) |
Apply =PROPER() on the column |
Verification Procedure
After any import path, run the following checks before compiling the HMI runtime:
- In the project tree, expand HMI Tags and confirm the imported tag count matches the source CSV row count (minus blanks).
- Sort by Connection and confirm every tag references a connection that exists under HMI Connections.
- Open the Compile dialog and select Software (rebuild all). Address errors surface as
IO address out of rangeorArea length mismatch. - Cross-check a sample of 10 tags by opening the matching DB in the PLC program and verifying the data type and offset match the TIA tag definition.
- For Comfort Panels and WinCC Runtime Advanced, use the Tag Simulator to force each tag to a known value and confirm the PLC side updates within one acquisition cycle.
- Run the cross-reference (Tools → Cross-reference) to ensure no screen graphic still references an old tag name from the WinCC Flexible project.
Performance and Volume Limits
| Parameter | WinCC Flexible 2008 SP2 | TIA Portal V13 | TIA Portal V18+ |
|---|---|---|---|
| Max tags per HMI device | 2,048 (panel-dependent; 4,096 on MP377) | 32,768 (Comfort Panel) | 32,768 (Comfort Panel); WinCC Unified up to 150,000 |
| Max tag tables | Unlimited (32 recommended) | Unlimited (folder-organized) | Unlimited (folder-organized) |
| Max tag name length | 128 characters | 128 characters | 128 characters |
| Import file size (XLSX) | N/A | ~50,000 rows | ~50,000 rows (Excel hard limit ~1,048,576) |
| Openness import throughput | N/A | ~500 tags/sec | ~1,200 tags/sec (V20) |
Common Field-Proven Pitfalls
-
Locale-driven decimal separator: A WinCC Flexible CSV exported on a German workstation uses
;as the list separator and,as the decimal mark. When TIA exports its template on a US workstation, the separators differ and the column-split logic silently misaligns. Open both files in Excel on the same locale, or normalize delimiters withText-to-Columns. - Indirect addressing strings: WinCC Flexible "multiplexing" tags use a separate Index tag and an Index field in the XLSX; if you skip the Index column, TIA imports the tag as a static address and the multiplexing is lost.
- External tags vs. internal tags: WinCC Flexible's Internal flag has no TIA equivalent column. TIA infers "internal" from a missing Connection entry — leave Connection blank for internal tags rather than typing "Internal".
- User-defined data types (UDTs):strong> A WinCC Flexible CSV can reference a UDT by name only. TIA must have the UDT already compiled in the PLC station; otherwise the import is rejected. Compile the S7 program first, then import HMI tags.
-
Bit memory vs. process image: WinCC Flexible often uses
MBranges that fall inside the S7 process image; TIA flags these as "synchronous to OB1" warnings that are safe to ignore, but anMoutside the process image becomes a hard error during PLC compile. -
String lengths in the legacy 8-bit world: WinCC Flexible's default string length is 16; modern Comfort Panels expect 80. If the source uses long strings, the
Lengthcolumn must be set explicitly to avoid truncation in alarm text and recipe handling.
FAQ
Why does the WinCC Tag Converter say "0 tags converted" when I point it at a WinCC Flexible CSV?
The WinCC Tag Converter only parses STEP 7 interchange formats (.asc, .dif, .sdf). A WinCC Flexible CSV uses a different header set, so the parser finds no recognizable rows. The empty .xlsx it still produces should be discarded — do not feed it to TIA Portal.
Can I import tags directly from a WinCC Flexible 2008 SP2 project into TIA Portal V20?
No. Direct migration is supported only into TIA Portal V11 SP1 through V16. For TIA V17/V18/V19/V20, migrate first into a V13 or V15 project, then upgrade stepwise. Migration also requires the source HMI to be a TIA-supported panel (OP77, TP177, MP177, MP277, MP377, Comfort Panels).
What is the exact XLSX schema TIA Portal expects for HMI tag import?
A single sheet named HMI Tags with columns in this order: Name, Path, Connection, PLC, Data Type, Length, Address, Access Method, Acquisition Cycle, Comment. Address syntax must be DBn.DBXx.y (no spaces), and data types must use TIA casing (Bool, Int, Real, String[80]).
How do I automate a large tag import from a WinCC Flexible CSV?
Use the TIA Portal Openness API. The V20 Openness documentation provides a complete C# pattern for importing an HMI tag table from an XML file. Convert the WinCC Flexible CSV to the TIA Openness XML schema (or to the XLSX schema above), then call HmiTagTableFolder.TagTables.Import(file, ImportOptions) against a folder in the project tree.
What is the maximum number of tags I can import in a single XLSX?
Excel's hard limit is 1,048,576 rows. TIA Portal's import wizard handles up to ~50,000 tags per file in practice. For larger tag volumes, split the workbook by tag table or switch to the Openness API, which is faster and is not subject to the Excel file size constraint.