IMDTouchKnowledge BaseShop main store

Explainer

Why the compiled HMI project view is not for editing

HMI and touchscreens Published 7 min read

Short answer

The compiled HMI project view in EcoStruxure Machine Expert HVAC is a debug window: it shows the Structured Text the HMI compiler generated from your authored project, and it cannot be used to develop the project. Create every function your procedures need in the authored project, compile clean, and confirm the generated view reflects the change after two consecutive builds.

On this page
  1. What is the compiled HMI project view?
  2. Can I create functions inside the compiled HMI project view?
  3. Why does an edit in the compiled view disappear after the next build?
  4. What is the generated Structured Text view for?
  5. Where do I add a function my HMI procedure needs?
  6. How do I prove the compiled output matches my authored project?
  7. When is it safe to change anything in the compiled HMI project?
  8. Questions asked

The button that opens the compiled HMI project in EcoStruxure Machine Expert HVAC shows the Structured Text the HMI compiler produced from your authored project. It is a debug window, not a second development environment: nothing you create or change there is part of your application, and everything you put there is discarded at the next build. Every function your procedures need must be written in the authored project, compiled clean, and confirmed afterward in the generated view. This article explains what that view actually is, what it is legitimately for, where the real edit belongs, and the two-build test that proves a change is genuinely part of your M172 application.

What is the compiled HMI project view? #

The button opens a read-only debug view of the Structured Text that the compiler generated from your HMI project, written in the IEC 61131-3 language your whole M172 application builds from, and it is not a second copy of your project you can develop in.

The feature is thinly documented, which is exactly why it can look like a hidden editing surface. It is not one. When the toolchain builds the application, the HMI project — its pages, procedures and connections — is converted into Structured Text as an intermediate step of the build, and that intermediate is what the button exposes. IEC 61131-3 defines Structured Text as one of the languages a PLC program can be written in; the standard defines the language itself and says nothing about where you may edit a vendor's generated output. That is the toolchain vendor's call, and the documented answer for this view is that it is a debug tool, not a development path. Expect the generated code to look unfamiliar: names, ordering and structure are produced by the compiler from your configuration, not copied from your editors.

Can I create functions inside the compiled HMI project view? #

No — the vendor's answer to exactly this question is that the view is a debug tool and cannot be used to develop the project, so a function created there is not part of your application and will not survive the next build.

The compiled view has no source file behind it that the compiler reads back. The authored project is the only input the build reads, so anything typed into the generated Structured Text exists outside the build: it cannot be checked by the compiler, cannot be regenerated, and cannot be handed to another engineer. Creating a function there breaks the source-to-output relationship, because the project would no longer describe the running application. Even where the editor appears to accept text, that is a property of the window, not an invitation. The rule is absolute: no new functions, no new variables, no edited statements, no resources of any kind in that view.

Why does an edit in the compiled view disappear after the next build? #

Because the view is regenerated: each build re-translates your authored project and overwrites the generated ST, so a hand edit survives only until the next compile — across a commissioning day with three builds, it survives zero of them.

There is no merge step that compares your edit against the fresh output; the regeneration simply replaces it. The generated code is a build artifact, in the same class as any compiled image, and the same rule applies: what the target holds after a build is what the source produced, nothing else. The hand-edited interlock typed into the view on Monday is gone at the first rebuild on Tuesday, while the identical logic written in the authored project survives every build that follows. For why a rebuilt image replaces what the target memory holds, see where compiled code resides in ROM and RAM.

What is the generated Structured Text view for? #

It exists for inspection and debugging: to confirm that a procedure, condition or data flow from your authored configuration actually reached the generated code, before you go looking for a runtime problem on the controller.

Open it after a successful build, trace only the portion corresponding to the procedure under test, and compare that flow with what you authored. Generated logic that looks unfamiliar is normal — compilers translate, reorganize and expand source objects — and a convenient-looking insertion point in the output is not a supported extension point. Inspection shows translation, not execution; to watch the logic run value by value, use the method in troubleshooting M172 PLC live debug on bound controllers.

What you find in the generated ST What you do
Expected procedure, condition or data flow is present Continue to runtime and functional testing
Expected flow is absent Correct the authored project and rebuild
Generated logic looks unfamiliar Map it back to authored objects; read it, never rewrite it
An edit seems necessary inside the view Stop; the change belongs in an authored resource

Where do I add a function my HMI procedure needs? #

In the authored project, because a function that a procedure calls is application logic, and application logic has exactly one maintained home: the project source that the compiler actually reads.

  1. Open the authored HMI project and identify the procedure that must gain the new behavior.
  2. Create the function in the project's supported editor, declaring a type and an initial value for every variable it uses.
  3. Give the procedure a supported reference or call to that function.
  4. Save the authored project.
  5. Compile through the normal workflow and resolve every reported declaration, type, scope or reference problem at the source.
  6. Reopen the compiled view only after the clean build, and confirm the new flow now appears in the generated Structured Text.
  7. Close the compiled view without changing anything in it.

If the standard project environment offers no authored place for the logic you need, do not use the compiled view as a substitute. Rework the procedure with the supported authored objects, or take the question to the vendor's official support channel. A missing source-level extension point is a design constraint of the toolchain, not permission to modify compiler output.

How do I prove the compiled output matches my authored project? #

With two clean builds and a functional test: a change is proven when build one generates it, build two — made from the saved source with nothing re-typed — reproduces it with 0 diagnostics, and the procedure behaves correctly at its output.

Worked example: a minimum-off interlock for a rooftop unit. The start procedure must not restart the unit within 5 minutes of a stop. In the authored project you create the interlock logic and call it from the start procedure, with an illustrative input MinOffTime : TIME := T#300S; — a declared TIME variable initialized to 300 s. The 300 s is my example value, not a documented default; pick the value your process requires.

  • Baseline: the unchanged authored project compiles with 0 diagnostics, and the procedure's current behavior is recorded.
  • Build 1: 1 authored change in, 0 diagnostics out. The compiled view now shows the interlock, driven by the 300 s value, inside the generated code for that procedure.
  • Build 2, from the saved source with nothing re-typed: 0 diagnostics again, same generated flow. Arithmetic: 1 authored change across 2 builds reproduces 2 of 2 times, while the same edit typed into the compiled view would have survived 2 − 2 = 0 builds.
  • Functional test: command a stop, then an immediate restart — blocked. Wait past 300 s and restart — allowed. Both the false case and the true case are proven, and the false case matters most: an interlock that fails to block is the dangerous failure.

Make the change with the process in a safe state, and prove the inactive condition as deliberately as the active one. Before testing on the running machine, exercise the rebuilt logic the safe way with testing HMI simulation against a live PLC, so the proof happens before anything real is stopped or started.

Accept a change only when the saved source rebuilds clean twice, the generated view reflects that source both times, and both procedure tests pass.

When is it safe to change anything in the compiled HMI project? #

Never, as a development practice: the only safe interaction with that view is to open it after a successful build, read the generated ST, and close it — every accepted change lives in the authored project, proven by the two-build test in the previous section.

Your situation The decision
New logic is needed for a procedure Write it in the authored project and prove it with two clean builds
Generated flow disagrees with the authored configuration Fix the authored project and rebuild; never patch the output
You want to know what the compiler produced Read the view after a successful build; change nothing
The logic has no authored home in the toolchain Rework with supported objects, or ask through the vendor's official support channel

The decisive test is regeneration: another engineer must be able to start from your maintained project, compile it, and obtain the same functional result without any undocumented edit. If a behavior depends on something typed into the debug view, the application does not actually contain it — and the next build will prove that at the worst possible time.

Questions asked

Why does the tool convert an HMI project into Structured Text at all?

Structured Text is one of the programming languages defined by IEC 61131-3, and the M172 toolchain compiles the controller logic and the converted HMI project together in one build. Showing that intermediate result lets one compiler check everything, and lets you see how your authored pages and procedures were translated before the executable image is produced.

Can I copy a fragment out of the generated ST into my authored project?

You can read a fragment for reference, but treat generated names and ordering as clues, not imports: the compiler produces them from your configuration, and they rarely match what a source-level declaration expects. Re-express the logic with your own typed variables and authored objects, then let a fresh build show you its new generated equivalent.

How do I find the part of the generated code that belongs to one of my procedures?

Match it through what you authored: search the generated Structured Text for your procedure's identifiers and for the tag names, setpoints and conditions that drive it, then read the surrounding flow. Do not rely on position — the compiler orders generated code for execution, not in your page order.

Is the compiled HMI project a backup of my work?

No. The backup of your work is the authored project file, kept under your own version control or archive discipline; the compiled view is output derived from it. Restoring from the compiled side is impossible — a machine that runs your logic cannot give the project back, which is why the source file is the only thing worth archiving.

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

  • Troubleshooting

    Fixing Goto Display Buttons Locked by HMI Global Connections

    While the Global Connections remote display number is active — its DINT tag still holding 21 — FactoryTalk View ME disables every other form of navigation, so Goto Display buttons stay dead whether or not the popup is visible. Write 21 with a one-shot on bit A and let a startup macro on display 21 reset the tag to 0; the popup stays up and the buttons respond.

    HMI and touchscreens

  • Troubleshooting

    HMI Text Runs Off the Screen After Downloading the Project

    The panel and the project are both fine: the engineering PC's Windows display scaling is above 100%, so the downloaded layout lands past the panel edge even though the editor and offline simulation look correct. Set the scale to 100%, restart the PC, then redownload.

    HMI and touchscreens