WinCC Flexible Project Comparison: Workarounds and TIA Migration

David Krause13 min read
HMI / SCADASiemensTechnical Reference
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Problem Statement: No Native Project Compare in WinCC Flexible

WinCC Flexible (Siemens part numbers 6AV6 series, including 6AV6612-0AA01-3AA5 for WinCC Flexible 2008 Standard and 6AV6613-1AA01-3AA5 for WinCC Flexible 2008 ES) does not provide a built-in function to compare two project files. The comparison tool found in TIA Portal — which evaluates reference projects against the active project — was never back-ported into the WinCC Flexible engineering environment. The same limitation applies to its predecessor, ProTool (part numbers 6AV6 prior to the WinCC Flexible release in 2004).

This becomes a real operational problem whenever you must:

  • Confirm a project on a panel matches the source on the engineering workstation after a programmer edit
  • Identify what changed between a known-good revision and a broken revision
  • Audit a project before a retrofit or migration to TIA Portal / WinCC in TIA Portal V15..V20
  • Reconcile two branches of a project that were edited in parallel by different engineers

The remainder of this article documents the three production-validated workarounds: a runtime verification cycle, a file-level diff with a third-party tool, and a full migration to TIA Portal where the official comparison feature exists.

Why WinCC Flexible Has No Comparison Feature

The WinCC Flexible project format (.hmi, .fwx, .lml, .bin plus the underlying .bin archive on disk) is a compressed binary container. The COM-based automation interface used by ProTool was dropped in WinCC Flexible 2005 in favor of a closed XML/binary hybrid. Siemens designed the project format for runtime efficiency on the panel — not for engineering-level diffing.

Three architectural constraints block native comparison:

  1. Binary block storage. Screens, tags, and alarms are stored in compressed segments. Decompiling requires the ES itself, and segment ordering is not stable across save cycles, so a byte-for-byte diff is meaningless.
  2. No scripting host exposed. WinCC Flexible does not expose its project tree to VBScript, C#, or the Win32 API in a documented way. There is no automation model analogous to Siemens.Automation.ObjectX in TIA Portal.
  3. No headless comparison engine. The runtime diff in TIA Portal runs in the TIA Portal background service. WinCC Flexible ships only the ES GUI; the WinCC Flexible Runtime is a stripped client with no diff capability.
Field note: Do not attempt to diff the .bin archive inside a .hmi file. The archive contains binary resources (images, fonts) whose internal timestamps and CRCs change on every save, even when content is identical. A naive byte diff will report hundreds of false differences.

WinCC Flexible Project File Structure

Understanding the on-disk layout is required for any file-level diff workaround. A typical WinCC Flexible 2008 project compiles to the following set of files:

Extension Description Diff-friendly?
.hmi Engineering source project (binary + XML hybrid) No
.fwx Compiled runtime image for WinCC Flexible Runtime No
.lml Compiled runtime image for legacy panels (OP 77, TP 170, etc.) No
.bin Internal archive inside the .hmi source No
.log Compile log (plain text) Yes
.txt Export files (tag lists, alarm lists) — only present if you export Yes

The .hmi file is the canonical source. WinCC Flexible uses a single-file project model — there is no .cdb SQLite database as in TIA Portal. This single-file storage is the root cause of the missing compare feature: TIA Portal's reference project comparison depends on being able to load two projects in parallel and walk their internal object trees side-by-side, which a single sealed .hmi archive cannot support.

Workaround 1: Backup-and-Verify (Transfer Test)

This is the only method supported by the engineering tool itself. It is functionally a behavioral diff: rather than reading source code, it transfers the project to the panel and asks the operator to confirm that the panel behaves identically. It is the approach recommended in Siemens service notes for legacy panels that cannot be migrated.

Prerequisites

  • WinCC Flexible 2008 SP5 or later ES
  • Panel connected via MPI/PROFIBUS, Ethernet, or USB
  • Known-good backup of the panel's existing project (created with OS Update / Backup via ProSave)

Procedure

  1. Open the reference project (the project believed to be on the panel) in WinCC Flexible ES.
  2. Connect to the panel via Transfer > Transfer or the integrated Transfer Settings dialog.
  3. Force a transfer: Project > Transfer > Transfer to target device.
  4. If the project is password-protected, enter the transfer password.
  5. After the panel reboots, walk through every screen, every alarm, and every tag. Verify that:
  • Tag values update at the expected rate
  • Alarm states (active, acknowledged, cleared) behave identically
  • Screen navigation responds identically
  • Recipes load and save correctly
  • Trend views render at the expected sample rate
  1. If anything fails, restore the original backup from ProSave and re-investigate.
Limitation: This method does not produce a diff. It produces a binary yes/no answer: either the project behaves identically or it does not. For partial changes (e.g., a single tag rename), this method is too coarse.

Workaround 2: File-Level Diff with WinMerge

WinMerge is an open-source visual diff and merge tool for Windows (license GPLv2). It cannot read the .hmi binary, but it can diff any text export you generate from WinCC Flexible, and it can diff the .fwx archives' exported resource files if you unpack them. This is the closest engineers come to a true WinCC Flexible compare.

What to export

WinCC Flexible 2008 supports Project > Export for the following items to plain text or CSV:

Item Export Format Use
Tags (Variables) CSV (*.csv) Identify tag renames, datatype changes, address shifts
Alarms CSV Compare trigger addresses, classes, message texts
Screens Not exportable — see text —
Recipes CSV Compare recipe definitions and data records
User administration CSV Compare user groups and password hashes
Logs (compile log) .log Always exported; useful for spotting missing references

Screens are not directly exportable. To diff screens, take a screenshot of every screen in the reference project at runtime, then re-take screenshots after deploying the candidate project, and diff the PNGs with WinMerge's image comparison (WinMerge 2.16+ supports image diff via the Image Compare plugin).

Procedure

  1. In WinCC Flexible, open both projects on two ES instances (or sequentially on one instance — projects lock the ES file while open).
  2. For each project: Project > Export > Tags > CSV. Save to projectA_tags.csv and projectB_tags.csv.
  3. Repeat for alarms, recipes, and user administration.
  4. Open WinMerge. File > Open. Set Left to projectA_tags.csv, Right to projectB_tags.csv.
  5. Set file filter to *.csv, location to Right (newer file), and enable Ignore carriage return differences (CR/LF mismatches between ES installations are common).
  6. WinMerge highlights line-level differences. Click a line to inspect the row. Address columns, datatype columns, and tag name columns are the most diagnostic.
  7. For screen visual comparison: install the ImageCompare WinMerge plugin, drop matching PNG filenames into Left and Right folders, and let WinMerge flag pixel differences.

Typical CSV diff results

Diff pattern Meaning Action
Row added in B only New tag added in candidate project Verify PLC address is correct; confirm panel can resolve
Row deleted in B only Tag removed in candidate Search screens for orphaned references
Address column changed (same tag name) Tag address reassigned Verify against PLC configuration; risk of pointing to wrong data block
Datatype column changed (same tag name) Type widening/narrowing Verify screens and scripts handle new range; risk of overflow
PLC column changed (same tag name) Tag connection moved to a different PLC Verify HMI connection is reachable; risk of timeout

Workaround 3: Migrate to TIA Portal Reference Projects

The cleanest path is to migrate both WinCC Flexible projects to TIA Portal and then use the native reference project comparison. TIA Portal supports comparing two devices (HMI, PLC, or both) across the active project and any number of reference projects.

Supported migration paths

Source Target TIA Portal version Method
WinCC Flexible 2008 SP5 TIA Portal V13 SP1 / V14 Direct Project > Migrate
WinCC Flexible 2008 SP5 TIA Portal V15..V20 Two-step: migrate to V13 SP1 first, then version-up
ProTool 6.0 / WinCC Flexible 2004 TIA Portal V13 SP1 Two-step: first migrate to WinCC Flexible 2008 SP5, then to TIA
WinCC (TIA Portal) V13..V20 Same or newer V-version Project > Version Upgrade

Procedure

  1. Install TIA Portal V20 (current at time of writing) on the engineering workstation. Confirm the WinCC Flexible migration tool is enabled under Options > Supported engineering tools.
  2. Open TIA Portal. Project > Migrate project. Select projectA.hmi.
  3. Migration log: %LOCALAPPDATA%\Siemens\Automation\PortalV20\MigrationLogs\. Inspect for unresolvable references — common items are custom ActiveX controls, legacy protocols (MPI without PG/PC routing), and unsupported panel types (TP 170A, OP 7).
  4. Compile and download to the panel. Verify runtime behavior identical to the WinCC Flexible source.
  5. Repeat for projectB.hmi.
  6. Now compare: see next section.
Panel type constraints: Not all legacy panels are supported in TIA Portal V20. Panels such as TP 170A, TP 170B (mono), OP 7, OP 77A, and Mobile Panel 170 can no longer be migrated. They remain on WinCC Flexible 2008 SP5 indefinitely. For these panels, only Workarounds 1 and 2 apply.

TIA Portal Reference Project Comparison — Detailed Procedure

Reference project comparison is available in TIA Portal from V15.0 onwards and was significantly extended in V17 and V20. The official Siemens documentation is hosted at Comparing reference projects (TIA Portal V20).

Set up reference projects

  1. Open projectA.ap20 in TIA Portal V20.
  2. In the project tree, right-click the project name. Reference projects > Add reference project.
  3. Select projectB.ap20. The reference project appears in the tree under Reference projects as a read-only copy.

Run the comparison

  1. In the project tree, right-click a device (HMI or PLC). Compare > Offline/offline.
  2. In the comparison editor that opens, choose:
  • Current project on the left
  • Reference project on the right
  1. The editor shows object-level differences classified by:
Symbol Meaning
Green check Objects identical
Red cross Object differs (different value, type, or address)
Yellow triangle Object exists in current project only
Blue plus Object exists in reference project only
  1. Click any difference to see a side-by-side view of the property pages.
  2. Use Apply differences to copy properties from the reference project to the current project, or vice versa. This is the equivalent of a merge tool for TIA Portal.

What can be compared

TIA Portal compares the following object types between two projects:

  • Tags (including HMI tags, PLC tags, and DB members)
  • Screens and screen objects (limited to properties; bitmap content is not compared)
  • Alarms and alarm classes
  • Recipes and recipe elements
  • User administration entries
  • Connections and connection parameters
  • Scheduled tasks and global scripts
  • Hardware configuration (modules, IP addresses, PROFIBUS/PROFINET parameters)

What cannot be compared

  • Bitmap and icon graphics (only their file references)
  • Compiled runtime binaries (the .fwx equivalent in TIA Portal)
  • Project-wide settings that are stored outside the project file (e.g., WinCC flexible user paths in the registry)
  • Audit trail entries (TIA Portal records changes but does not diff them across projects)

Comparing Tags and Screens — Field Techniques

Tag-level diff via cross-reference

When migrating from WinCC Flexible, tag mismatches are the most common source of commissioning delays. After migration, use the cross-reference feature in TIA Portal: Project tree > PLC > Show cross-references. This shows every tag usage point across the project and helps identify tags that exist in the project but are not referenced (dead tags) and tags that are referenced but do not exist (broken references).

Screen-level diff via export

WinCC in TIA Portal supports screen export to .xml from V17 onwards: Screens > right-click > Export. The exported XML is text and can be diffed with WinMerge. Note that the XML contains UUIDs that change on every compile even when content is unchanged — exclude these with a WinMerge filter:

\<ID>[^<]*\</ID>
\<LastModified>[^<]*\</LastModified>
\<Created>[^<]*\</Created>

Alarm diff via export

WinCC (TIA Portal) supports alarm export to CSV: HMI alarms > right-click > Export. The CSV columns are stable, so WinMerge diffs cleanly. Diff columns of interest: Trigger tag, Trigger bit, Message text, Class, Group, Acknowledgement.

Limitations and Edge Cases

Edge case Behavior
Project contains custom ActiveX controls Cannot compare; controls are black boxes to the comparison engine
Project uses non-Siemens OPC DA server (e.g., Matrikon) Connection parameters are compared; server-side configuration is not
Project on TP 170A / OP 7 / Mobile Panel 170 Cannot migrate to TIA Portal; remain on WinCC Flexible 2008 SP5 indefinitely
Two branches edited in parallel by different engineers TIA Portal merge is a one-shot operation — no three-way merge as in Git
Project encrypted with transfer password Reference project comparison does not require the password; transfer to panel does
Project size > 4 MB (legacy panels) WinMerge diff of the unpacked .hmi archive can take several minutes
Symbols from a TIA Portal project referenced from WinCC Flexible via symbolic IO Symbol resolution only works in TIA Portal; WinCC Flexible sees the symbolic link as opaque text

Verification Procedures

After applying any of the three workarounds, run the following checks before declaring the projects equivalent:

  1. Compile both projects. Both WinCC Flexible projects must compile without errors. In TIA Portal, both projects must compile in the version of TIA Portal you are running. Compare compile logs: the only differences should be file paths and timestamps.
  2. Compare compile statistics. In WinCC Flexible, Project > Properties > Statistics shows tag counts, screen counts, alarm counts. The numbers should match across both projects. In TIA Portal, the equivalent is Project tree > right-click > Project information.
  3. Run a tag cross-reference. Every tag referenced on a screen must be defined in the tag table. In WinCC Flexible, this is automatic at compile time; in TIA Portal, run Project tree > Show cross-references and confirm no unresolved references.
  4. Download to a test panel. Both projects to two identical panels side-by-side; walk through the same script of screen changes, alarm acknowledgements, and recipe operations. Outputs must match.
  5. Verify checksums of exported CSVs. After CSV export (Workaround 2), use certutil -hashfile tags.csv SHA256 on both files. Different hashes are expected; compare the sorted contents rather than the hash.

Recommended Workflow

  1. Document the current panel configuration with screenshots and CSV exports.
  2. Choose the smallest change set and deploy it via WinCC Flexible 2008 SP5; back up the panel with ProSave before and after.
  3. For routine change management, adopt the Backup-and-Verify workflow (Workaround 1). Document the verification checklist.
  4. For any change set that touches more than ~10 tags or more than ~3 screens, migrate both projects to TIA Portal V20 (Workaround 3) and use reference project comparison.
  5. For ad-hoc comparison during commissioning, use WinMerge on CSV exports (Workaround 2).
  6. Never modify a project without first making a ProSave backup of the panel and a Windows shadow copy of the .hmi file.

FAQ

Can WinCC Flexible 2008 compare two projects natively?

No. WinCC Flexible 2008 (including SP5) does not include a project comparison tool. The same limitation applies to its predecessor, ProTool 6.0. The native comparison engine was first introduced in TIA Portal V15.

What is the recommended workaround for comparing two WinCC Flexible projects?

For a true object-level diff, migrate both projects to TIA Portal V20 and use the built-in reference project comparison. For a partial diff, export tags, alarms, recipes, and user administration to CSV and diff with WinMerge. For a behavioral check, transfer one project to the panel and verify operation against a ProSave backup.

Which WinCC Flexible projects can be migrated to TIA Portal V20?

WinCC Flexible 2008 SP5 projects can migrate to TIA Portal V13 SP1 directly, and then version-up to V14 through V20. ProTool 6.0 and WinCC Flexible 2004 require a two-step migration via WinCC Flexible 2008 SP5 first. Legacy panels (TP 170A, OP 7, OP 77A, Mobile Panel 170) cannot be migrated and must remain on WinCC Flexible 2008 SP5.

Does TIA Portal's reference project comparison work on HMI screens?

Partially. It compares screen properties and screen objects, but it does not diff bitmap content. For pixel-level comparison, export both projects' runtime screenshots and use the WinMerge Image Compare plugin.

What file extension does a WinCC Flexible source project use?

The source project uses the .hmi extension (e.g., Line1.hmi). The compiled runtime images use .fwx for WinCC Flexible Runtime and .lml for legacy OP/TP panels. All three are binary formats and cannot be diffed without first exporting the human-readable contents (CSV, XML, or PNG screenshots).

Back to blog