IMDTouchKnowledge BaseShop main store

How-to

Rebuilding a lost HMI project from PLC tags and logic

HMI and touchscreens Published 9 min read

Short answer

The PLC program cannot give the screens back, but it is a complete map of what the old interface read and wrote. Verify the retained program against the running controller, cross-reference every tag to classify it as a display, command, setpoint or alarm, then commission each operator write on an isolated bench before the replacement goes near the running machine.

On this page
  1. Try documented recovery before you rebuild
  2. The rebuild sequence
  3. Prove the retained program matches the machine
  4. Turn cross-references into a role map
  5. Worked example: classifying one temperature setpoint
  6. Build the driver and the read-only screens first
  7. Commission every write on a bench
  8. Alarms and user permissions
  9. Questions asked

A lost HMI project cannot be pulled back out of the controller: screens, navigation and graphics live in the panel, not in the PLC program. What the surviving program does hold is the full set of tags the machine logic uses, including the ones nothing in the logic writes — and a tag that logic reads but never writes is almost always an operator entry. That distinction is the whole rebuild method. Verify the retained program against the running machine, cross-reference every tag and classify it as a display, a command, a setpoint or an alarm, build the read-only screens first, then commission every operator write on an isolated bench before the replacement goes near the running machine.

Try documented recovery before you rebuild #

Work the legitimate recovery paths first, because a restored source project beats a rebuilt one every time. Check the engineering workstation and maintenance archives for approved backups, then check what each file actually contains: a device restore backup returns operation but is not an editable project, an export of selected data is not a full project, and a separately stored editable source archive is the outcome that ends the rebuild. The procedure for verifying that HMI project data is inside your platform backup shows how to make that call before you commit.

Vendor-documented routes also come first: the terminal's own backup function, an upload from the panel where the platform documents one, restoration from backup media, and vendor support. Recovering an HMI program when the source file is lost walks those paths in detail.

Decision: restore an editable source and skip the rebuild; restore a runtime-only backup to keep the machine running while you rebuild something maintainable; rebuild from the PLC program only when no recovery source exists.

The rebuild sequence #

Work the steps in order; each one depends on the step before it.

  1. Record the controller type, the terminal model, the engineering software each needs and the versions in service. These decide which tools, drivers and project formats can build the replacement.
  2. Run the engineering software's project compare between the retained program and the running controller, and resolve every difference before trusting a single tag.
  3. Cross-reference every candidate tag and record its address, data type, every read and write site, the engineering units, the limits and any conditions the logic imposes.
  4. Classify each tag as a display, command, setpoint, alarm or internal sequence state using the role table below, and leave any unresolved name off the screen until it is traced.
  5. Configure the communication driver from the machine's installed connection, then build and prove the read-only screens.
  6. Bench-test every writable object in isolation: one command per test, entry limits at both boundaries, and a verified refusal when a permissive is removed.
  7. Rebuild alarms, acknowledgement and user permissions against the logic's latch and reset behavior, then connect to the running machine only after the full bench pass.

Prove the retained program matches the machine #

A role map built from a program that does not match the running machine classifies the wrong logic. Use the project compare utility in the engineering software: a clean compare makes the retained program authoritative, and a list of differences becomes your first work order, because a tag repurposed between versions changes its meaning, its limits or both.

Verify the replacement toolchain separately from the tag work: the engineering tool must support the target terminal model and its firmware, the PLC driver must exist for your controller, and the runtime license must match the panel or PC you will deploy to. A mismatch in any one of the three stops the rebuild at the download step, no matter how good the tag map is.

Decision: the tags become the basis for the rebuild only after the compare passes or its differences are resolved in writing.

Turn cross-references into a role map #

A cross-reference lists every instruction that uses a tag. In the Rockwell engineering software, right-click the tag and select Cross Reference to get the full list; other platforms provide the equivalent as a cross-reference window in the code editor.

The decisive pattern is a tag with reads and no write anywhere in the logic: no rung writes it, so its writer sat outside the program. In practice a tag written from outside shows multiple reads and no write at all, and every such tag is an operator-entry candidate until proven otherwise. Follow the logic past the first hit, because a bit named like a start command can be an internal sequence request the logic sets and clears itself, and a number that looks like a setpoint can be a calculated result.

Two shortcuts apply when any part of the old project survives. Some HMI tools' tag cross-reference windows sort tag names by screen number and screen name, so a partial project hands you the old screen grouping directly. And on a FactoryTalk View project, the Application Documenter together with runtime diagnostics lists the tags and connections the surviving project referenced — a direct check on the map you build by hand.

Build the worksheet before drawing anything: tag, address, data type, each read and write site, operating meaning, allowed access, units, limits, and the permissive conditions under which the logic accepts a change. An unproven meaning stays marked unresolved and off the screen.

Cross-reference shows Role Build it as
Source assignment, scaling and validity checks feeding the value Measurement or status Read-only display with units and a quality indication
Reads only, with permissive conditions gating the consumption Operator command Write object matched to the logic's expected handshake
Reads against clamp or compare limits, no writes in the logic Operator setpoint Numeric entry carrying the logic's limits; validation stays in the controller
Trigger, latch, acknowledge bit and reset Alarm condition Alarm display mirroring the controller's latch, acknowledge and reset
The same logic writes it and reads it through transitions Internal sequence state Diagnostic screen only, no operator control

The decisions fall straight out of the table: measurements display, commands write and clear the way the logic expects, setpoints enter within the logic's limits, alarms mirror the latch, and internal state stays off the operator interface.

Worked example: classifying one temperature setpoint #

Take a 16-bit integer tag — call it TempSpRaw in this example — on a control loop whose cross-reference shows three reads and no writes anywhere in the logic: a compare against 800, a compare against 350 and a move into the loop's working setpoint. No write in the logic means the writer was external, and the two clamps make the role unmistakable: an operator setpoint.

The clamps imply a storage convention of tenths of a degree, so check the arithmetic: 425 / 10 = 42.5 °C for a mid-range value, 350 / 10 = 35.0 °C for the lower limit and 800 / 10 = 80.0 °C for the upper limit. Confirm the convention against one known operating point before you trust it: if the process documentation calls the normal setting 42.5 °C and the controller holds 425, the convention is proven.

The build decision follows from those numbers: a numeric entry object spanning 35.0 to 80.0 °C with a scale factor of 0.1, applied once at the HMI layer. The logic clamps in raw counts, so nothing scales the value a second time.

Build the driver and the read-only screens first #

Configure the driver the machine actually uses, taking the port, node address and any serial settings from the installed terminal's configuration or the cabinet drawings, never from a sample project for a different machine.

Then prove the displays before any write exists in the project. Match the data type, signedness and decimal placement to the controller tag exactly, because a mismatched type produces numbers that look right and are wrong — the mechanism behind why an HMI writes the wrong PLC value above 9 is the classic case. Apply scaling once, at the layer you intend to own it: if the HMI converts raw counts to engineering units, nothing repeats that conversion downstream. And configure what the screen shows when the connection dies, because a panel that keeps its last received value will present a stale number as if it were live.

Test in that order: force a controlled state change in the controller and watch the screen follow it, then drop the communication link in a test environment and confirm a loss indication appears instead of a frozen value.

Commission every write on a bench #

Every writable object faces an isolated bench with verified test tags before it touches the running machine.

Commands first. Read how the logic consumes the bit — a maintained state, a momentary request, an edge it detects or a request it clears itself — and match the object to that behavior, because a button that holds its bit true against logic that expects a pulse will hold the action on or repeat it. When a bench command produces no controller response at all, tracing an HMI command that never reaches the PLC output isolates whether the write, the driver or the logic dropped it.

Numeric entry next. Take the entry limits from the logic's own clamps and compares, as the worked example above does. Panel-side limits are an operator aid, not the validation; the controller keeps its checks because other clients and retained values reach the same tag. Where the logic can modify or reject an entry, show the requested value and the accepted value separately — the mechanism behind why an HMI edit box shows a value that was never set. Test both limits for acceptance and one value beyond each limit for refusal.

Then the permissive test: remove one required permissive with an approved method and confirm the logic refuses the action while the screen explains why the button did nothing. The interlocks stay in the controller — a greyed-out button is an operator aid, not a safety function, and the rebuilt screen must never be what stands between an operator and a dangerous action.

Decision: no write object goes to the running machine until its bench test shows one intended action, the documented reset and a visible refusal path.

Alarms and user permissions #

Alarms need the logic's whole fault chain before you assign a single object: which tag triggers, whether the controller latches the condition, which bit records that someone acknowledged it, and what clears the latch. Acknowledge and reset are different operations — acknowledge records that a person saw the alarm, reset asks the controller to clear a latched condition — and mapping one onto the other produces alarms that either cannot be silenced or clear with no one watching. Build the alarm list to mirror that logic, then force each trigger on the bench to prove the display, the acknowledge and the reset behave as the logic does.

Permissions are the one part the PLC program cannot return: user groups and access rights lived in the lost project. Rebuild them conservatively from the role map — every account read-only at first, write access granted only where a role's objects have passed their bench tests. That ordering keeps the first live shift from discovering an untested write path.

Questions asked

Why does the PLC cross-reference show a tag as read but never written?

The cross-reference covers only uses inside the controller program. A panel write arrives over the communication link, so no rung records it. A tag that logic reads and never writes is therefore the signature of an external writer: usually the old HMI, but possibly a second controller, a gateway or a recipe download. Identify the writer before you give the tag an operator control.

Can the HMI entry limits replace the range checks in the PLC?

No, and the direction matters. Dropping the panel-side limits only costs operator convenience, because the controller still clamps the value. Dropping the controller checks leaves the tag reachable without validation from the panel, a second client or a retained value, so the logic clamps stay regardless. Mirror the logic limits in the entry object for usability, and treat an entry the panel accepts but the logic refuses as a test failure to investigate, not a limit to relax.

How do I confirm the rebuilt tags use the right data types?

Match the controller tag exactly: same width, same signedness, same decimal placement, and convert the displayed value exactly once. The mismatches have recognizable shapes: a signed and unsigned 16-bit tag disagree above 32767, and a binary value decoded as BCD jumps from 9 to 16. Then prove one value end to end: write a known raw value in the controller, read it on the screen, and confirm the converted result before trusting the connection for anything else.

What has to pass on the bench before the rebuilt panel connects to the running machine?

The final compiled build, not an earlier draft, needs one bench session that covers everything: every read-only screen tracks a forced controller change and shows a loss indication when the link is dropped, every command produces exactly one intended action and clears as the logic expects, every entry accepts both limits and refuses a value beyond them, and removing a permissive makes the logic refuse the action while the screen explains why. After that, the first connection to the machine is a commissioning step, not a test.

Keep reading

  • How-to

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

    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.

    HMI and touchscreens

  • Explainer

    Reusing HMI Screens Across Different PLC Projects

    You do not need to write a screen generator. Keep one master HMI application, repoint its PLC connection when the next machine uses the same address map, remap tag addresses centrally in the tag editor when it does not, and standardize the PLC-to-HMI interface with option bits so each machine shows only the screens for the options actually installed.

    HMI and touchscreens

  • How-to

    Combining two migrated WinCC HMI projects in TIA Portal

    You cannot merge two migrated WinCC projects into one TIA Portal project automatically. Pick one project as the destination and move the complete HMI device from the other by copy and paste between two TIA Portal instances, by opening the source as a reference project and dragging it in, or through a global user library. The result is one project holding two separate HMI devices, not one merged device.

    HMI and touchscreens