IMDTouchKnowledge BaseShop main store

How-to

How to Recover an HMI Program When the Source File Is Lost

HMI and touchscreens Published 7 min read

Short answer

If an editable backup was stored on the HMI at download time, upload it and open it as a project. If the terminal holds only the compiled runtime, no upload can recreate the source: document every screen and tag behavior from the running unit, rebuild against the controller project, and convert the runtime only where the vendor documents a path.

On this page
  1. Upload, download, and what the runtime holds
  2. Check the terminal for a stored project backup
  3. Convert the runtime only where the vendor documents it
  4. Document the running application before anything changes
  5. Rebuild against the controller project
  6. When the rebuild targets a different terminal
  7. The decision, case by case
  8. Questions asked

Losing the editable source for a working HMI leaves exactly two recoveries: pull a project backup that was stored on the terminal at download time, or rebuild the project from the running application. The runtime file the panel executes is compiled. It holds the screens, tags and logic in a form the terminal can run, not a form the engineering software can open, so no upload turns it back into a project. The concrete cases you will meet: in TIA Portal, the editable project cannot be uploaded from Basic or Comfort Panels at all, while a PanelView Plus .MER runtime from version 5.0 onward converts back to an editable project with the vendor's own tool. The steps below settle which case you are in, protect the only working runtime copy while you find out, and give the rebuild path, including the two-point check that recovers tag scaling from the running screens.

Upload, download, and what the runtime holds #

Transfer direction is named from the engineering workstation's point of view. A download writes from the workstation to the terminal and can overwrite the only working runtime copy, so while the source is missing, no project download, firmware update or restore may run. What you need is an upload: data moving from the terminal to the workstation.

What the terminal can give back depends on what was stored at download time. For current Siemens panels the vendor states it plainly: the editable project cannot be uploaded from the device, and the device backup is for restore purposes only; a WinCC runtime file likewise cannot be converted back into source. If commissioning stored a project backup on the terminal, that backup is the source and steps 1 to 4 below recover it. If not, the compiled application is the end of the upload road. The vendor-specific upload procedure that exists for one older panel family works on the same condition, and is covered step by step in how to upload a program from an old touchscreen HMI.

Check the terminal for a stored project backup #

  1. Connect the terminal to the workstation with the transfer settings the engineering software documents, and open the function that handles device maintenance - backup and restore of the panel, not a project download. In TIA Portal for Basic and Comfort Panels this lives under the "Online > HMI Device maintenance" menu.
  2. Look at what the software can retrieve from the device. A connected terminal proves nothing on its own: the software can offer runtime transfer, diagnostics, recipes and logs while no editable project exists anywhere on the panel.
  3. Retrieve the listed backup into a new folder on the workstation.
  4. Open what you retrieved in the engineering software. This is the test that ends the step: the file either opens as an editable project with screens and tags you can change, or it does not. A runtime package that copies across but opens read-only, or not at all, is not source recovery.
  5. If nothing retrievable is listed, stop writing to the terminal - no download, no firmware change, no restore - and treat the running panel as the functional specification for a rebuild.

Convert the runtime only where the vendor documents it #

One family has a documented way back. A PanelView Plus .MER runtime application file from version 5.0 or later can be converted into an editable project using the tooling that ships with the vendor's design software; the walkthrough covers recovering an editable PanelView Plus source from a runtime .MER file. Compile the converted project and compare it against the running terminal before you edit anything.

Other families package runtimes their own way, and the same compiled-versus-editable split decides recovery, as in the ESA VT170W case where only the compiled application exists. Some server-based packages also permit limited edits to a running application, but runtime editing still depends on the editable application existing somewhere, so it is not a recovery path for a lost source. If your format and version have no documented procedure, skip conversion entirely: a renamed extension or a hex edit is not a conversion, and it can produce a project that downloads but never matches the machine.

Document the running application before anything changes #

With no backup and no conversion, the running terminal is the only copy of the design intent, so record it first:

  • Photograph every screen and note how the operator reaches it, so the navigation tree can be redrawn.
  • Record displayed values while the machine sits in known states: stopped, running, permissive not met, alarm active, communications failed.
  • List every operator entry, separating setpoints from momentary commands, maintained selections, acknowledgements and navigation controls.
  • Capture each alarm's text plus the process condition that raises it and the one that clears it.
  • Read the controller connection from non-writing diagnostics and existing documentation, never by probing with writes.

The screens show what the operator sees, not everything the project contains. Hidden scripts, expressions, security configuration and inactive screens leave no trace on a running panel, so expect a re-derivation, not a transcription. If the touch surface itself is scratched and failing, capture has to beat hardware failure - backing up an HMI with a scratched touchscreen before replacement is its own procedure.

Rebuild against the controller project #

The controller project is the authority for tag names, addresses, data types, engineering units and command behavior, because a displayed number cannot distinguish a raw value from a scaled one. If the controller project is missing too, recover that first; backing up a PLC program the right way is a separate and much smaller job. Create the new HMI project for the correct terminal, then configure the connection before any graphics:

Setting Where it comes from What an error looks like
Controller type and driver Controller hardware, its project, system records Connection opens but exchanges no usable data
Network or serial path Controller configuration, wiring records Target unreachable, or the wrong device answers
Station or node address Controller and network configuration Requests reach nothing, or a different device
Tag address and data type Controller project, checked online Values wrong, static, truncated, or writable in the wrong format

Prove the path before building screens: add one read-only display bound to a controller value you can change or observe safely. A live value arriving correctly formatted confirms the terminal, driver, path, controller and tag definition in one step.

Scaling falls out of the running screens with two recorded pairs. Suppose the old panel showed 2.5 bar while the controller register held 1024 counts, and 7.5 bar at 3072 counts. Slope = (7.5 - 2.5) bar / (3072 - 1024) counts = 5.0 / 2048 = 0.002441 bar per count, and offset = 2.5 - (1024 x 0.002441) = 2.5 - 2.5 = 0.0 bar, so engineering value (bar) = raw counts / 409.6. Confirm the line at a third recorded point: 2048 counts / 409.6 = 5.0 bar, matching the old screen. If a third point misses the line, the original scale was non-linear or piecewise and needs more points across the range.

Rebuild indications before writes. For each command, identify the destination tag, data type and write mode from the controller project, then test it only in an approved machine state, where the process feedback that should change is visible and any motion can be stopped. A command that sends is not a command that works until the controller and the process both confirm it.

When the rebuild targets a different terminal #

Design software draws screens to the physical size of the device selected as the project target, so set the new target before redrawing and use the project's screen-scaling option to adapt the layout rather than nudging every object. If the reason for the rebuild is an aging or discontinued panel, choose the destination hardware now: the same rebuilt project can run a PC-based runtime, and rebuilding once onto industrial panel PCs ends the cycle of losing the source with a dead terminal. The selection criteria for a replacement terminal are set out in planning an HMI terminal replacement from an older operator panel.

The decision, case by case #

  • A backup was stored on the terminal: upload it and confirm it opens editable; the source is recovered, so copy it to the server the same day.
  • Runtime only, and your format and version have a documented conversion: convert with the vendor's tool, compile, and compare against the running terminal before editing.
  • Runtime only, no documented conversion: the project is not inside the terminal. Document the running application, rebuild against the controller project, then configure the next download to store a backup on the panel and keep the uncompressed source in two places, so the next recovery is an upload instead of a rebuild.

Questions asked

Can a lost project file still be somewhere on the engineering PC?

Often yes. Check the recycle bin, the autosave and archive folders that the engineering software keeps, and any site backup or version-control server that stored the project. Stop writing to that PC until the recovery attempt is finished, because every new file written to the disk lowers the chance of restoring a deleted project file.

Does every vendor's runtime file behave the same way?

No. Each family packages its runtime differently, and only where the vendor documents a conversion can a runtime file be turned back into an editable project. The documented case most technicians meet is the PanelView Plus .MER file from version 5.0 onward. For most other panels, assume the runtime is one-way and keep the uncompressed project on the engineering side.

What should be saved at download time so recovery is possible next time?

Keep the editable project on a server under version control or scheduled backup, export a project archive at every download, and enable the terminal-side backup option where the engineering software offers one. Name archives by machine and date, and store one copy off the panel network, so a failed panel or a lost PC never takes the only source with it.

Can a screen recording replace the documentation step?

A recording helps, because it captures navigation and dynamic behavior that still photographs miss. It shows nothing about hidden scripts, security configuration, inactive screens, tag addresses or scaling, so treat video as a supplement to the screen inventory, never as the record itself.

Is recovery different for PC-based HMI software?

Usually easier. The project files for PC-based runtime normally sit on the same PC that runs the visualization, so recovery means finding the project folder, its archive exports and the PC's own backups rather than uploading from a terminal. Check the runtime's configured project directory and local backup settings before assuming the source is gone.

Keep reading

  • Troubleshooting

    Fixing an HMI Project That Fails After a Git Clone

    The clone is broken because a referenced bitmap .PLK was never committed, not because of an ignore rule. Read the HMI Output tab for the exact filename, prove the file is untracked with git check-ignore followed by git ls-files, then restore and commit it and re-test from a clean clone. Track the .tgt and .def files for the HMI BIOS version as well.

    HMI and touchscreens

  • How-to

    How to Upload an HMI Program Without the Right Cable Pinout

    Upload an HG3F with the documented programming cable HG9Z-XCM1A, which runs from a 9-pin RS-232 port on the PC to Serial Interface 2 on the panel. Do not fabricate a pinout, and confirm the installed WindOI-NV2 version permits upload before you connect.

    HMI and touchscreens

  • Troubleshooting

    Why HMI Variable Values Reset After a Project Transfer

    HMI values reset after a transfer because the transfer's Initialize settings requested it, the variables were never marked retentive, or the editor's newer version forced a firmware update that initializes all variable memory. Clear [Variable Value] and [Backup Memory] under Initialize, mark operator values retentive, and retrieve the program plus current values with Shift + X before you transfer. Only the firmware-update path wipes retentive values; capture them first, because no setting protects them through it.

    HMI and touchscreens

Why a restored MER loses your PanelView Plus runtime users