IMDTouchKnowledge BaseShop main store

Explainer

What HMI programming covers from screens to controller tags

HMI and touchscreens Published 8 min read

Short answer

HMI programming is the whole application an operator runs a machine from: the screens and objects, the tag database mapped to controller data, the communication driver that reaches the PLC, alarm handling, and the tests that prove each value. A graphic is not working until its tag matches the live controller value at several points across the range.

On this page
  1. The chain from operator view to controller
  2. Screens and objects: the layer the operator judges
  3. Tags: the data contract with the controller
  4. The driver: reaching the controller at all
  5. Alarms, trends and the invalid-data state
  6. Where HMI programming ends and PLC programming begins
  7. Testing the chain
  8. Worked example: proving a 0-100% level display at three points
  9. Questions asked

HMI programming is the work of building everything an operator uses to run the machine from the panel: the screens and the objects on them, the tag database that ties each object to controller data, the communication driver that reaches the controller, the alarm handling, and the tests that prove each value end to end. Drawing the graphics is one part of it, and rarely the part that fails. A button can animate while its write never reaches the controller; a numeric display can keep showing a stale value after the connection drops. Think of the application as a chain — operator view, object binding, tag, driver, controller — build it in that order, and test it backwards.

The chain from operator view to controller #

Every HMI platform, panel or PC-based, organizes the application into the same five layers. The operator view is what the operator sees: screens, colors, navigation. The object binding is the setting that ties one property of one graphic — a number, a fill height, a color — to one data item. The tag is that data item as the HMI knows it: a name, an address or symbol in the controller, a data type, a scaling. The driver translates the HMI's reads and writes into the protocol the controller speaks. The controller data is the register or variable the PLC program actually owns.

The order matters because it is the order of failure. When something does not work, find the layer where the chain breaks instead of redrawing the screen. If the tag monitor inside the HMI shows a good, changing value, the driver and the tag are fine and the fault is in the binding. If the tag monitor is dead too, work back down toward the connection.

Screens and objects: the layer the operator judges #

An HMI application is built from objects: buttons, indicators, numeric entries, sliders, trends, alarm displays and the navigation between screens. Each object exists for one operating purpose, and the purpose chooses the object — a numeric entry for an exact setpoint, a slider only where adjusting within a visible range is the task, and even then with limits and live feedback.

Two rules do most of the work of making a screen usable. Keep the requested state separate from the actual state: a command object shows what the operator asked for, an indicator shows what the equipment reports, and never one graphic for both, or an accepted input looks like a completed action. And make color redundant: labels and symbols carry the meaning while color reinforces it, because operators work in sunlight, with gloves and with color vision that varies.

ISA-101 is the industry standard for HMI design, and its requirement in plain terms is that the interface is designed rather than decorated: identify what each screen is for — the operating task — before drawing anything, and carry those requirements through both the hardware and software aspects of the interface. That same discipline is what stands behind designing HMI screens for clear operator decisions.

Screen element What you define What the operator gets
Equipment indicator actual-state source, invalid-data appearance feedback that can be trusted as feedback
Process value units, decimals, expected range a readable measurement
Command button action, permitted conditions a request they know was accepted
Setpoint entry minimum, maximum, confirmation input that cannot leave the envelope
Trend variables, time axis, sample rate change a single number cannot show
Alarm banner condition, equipment context, response direction to the abnormal condition

Tags: the data contract with the controller #

A tag is the HMI's named handle on one controller data item. Some platforms want every mapping declared as an explicit tag; others let objects reference controller symbols directly. Both work. What does not work is leaving the data contract vague: for every value settle which connection it comes from, which address or symbol, what data type, what scaling into engineering units, whether the operator can write it, and how often it updates.

Scaling is the classic place to be wrong exactly once. If the controller already supplies the value in engineering units, applying the same conversion again in the HMI distorts it — apply the conversion in one place and know which place. Precision is the quieter cousin: extra decimal places display noise and imply accuracy the sensor does not have, so set decimals to the measurement's real resolution.

Data-type and addressing faults have recognizable signatures. A value that reads correctly up to 9 and breaks at 10 is a BCD-versus-binary mismatch, the case covered in why an HMI writes the wrong PLC value above 9. A 32-bit value that looks plausible but wrong often has its two words exchanged — the diagnosis behind displaying a PLC real value over Modbus on an HMI. A tag that will not validate at entry is telling you the address sits outside the device's map, as in fixing invalid bit address errors when adding HMI tags.

The driver: reaching the controller at all #

The communication driver turns the HMI's data requests into the protocol the controller actually speaks — Modbus RTU over serial, Modbus TCP or EtherNet/IP over Ethernet, or a vendor protocol. Configure it from the controller's own communication settings and documentation, never by copying a connection from another project: device address, node or IP, serial parameters or connection path must match the real device.

One distinction saves hours: a driver that reports its connection active has proven transport, not data. It proves the HMI can reach the controller and says nothing about whether the addresses you will ask for exist or are readable. That is why an indicator can stay off while the connection shows healthy — the polling is the next thing to check, the failure mode behind why HMI indicators stay off over Modbus RTU polling. Prove the connection with one known readable value before building the rest of the tag list.

Alarms are configured, not drawn: each needs the condition that triggers it, the equipment it belongs to, and what the operator is expected to do about it. Trends need the variables, the time axis and the sample rate that answer the question the operator will actually bring — when did it start dropping. Both need one more thing that is almost always forgotten until commissioning: the invalid-data appearance. When the connection drops or a read fails, every value display should show a defined unknown state, not its last good value and not zero. The last good value is the dangerous one, because it looks healthy.

Where HMI programming ends and PLC programming begins #

The HMI application reads data items and writes requests into data items. It does not execute control. Interlocks, permissions, mode logic and anything safety-related belong in the controller program, because the HMI can be unplugged, offline or running an older project, and the machine must be safe in all three states. Treat any screen-side logic — scripts, visibility conditions, entry limits — as operator convenience layered on top of enforcement that already exists in the PLC.

Testing the chain #

Commission in the reverse order of construction: connection diagnostics, one known readable value, tag monitor versus the controller's own programming software, then the graphic binding, then the full range. Use a value that can change without moving equipment for the first live checks, and do write tests with the machine in a state where a stray command is harmless. Simulation catches drawing and navigation errors cheaply, but only a live controller proves addressing, data types and update behavior — the difference is the whole point of testing HMI simulation against a live PLC.

When something fails, the symptom names the layer:

Symptom Layer to inspect first Deciding check
Many unrelated values stop updating connection and driver diagnostics, then one known readable value
One value dead, the rest live tag tag monitor against controller software
Tag monitor good, graphic frozen binding object reference, expression, formatting, visibility
Value alive but wrong magnitude or units scaling conversion applied once, correct end points

Worked example: proving a 0-100% level display at three points #

The case, stated as an illustrative example: a controller publishes tank level as one 16-bit unsigned integer, raw 0 at empty and raw 10000 at full, and the HMI tag applies the scaling to percent. The raw range is the controller's data-table fact; the percent range is the process fact.

Rule in words: displayed percent = low + (raw − raw_low) × (high − low) ÷ (raw_high − raw_low).

Arithmetic at the three check points, with raw_low = 0 counts, raw_high = 10000 counts, low = 0.0 %, high = 100.0 %:

  • raw 0 counts: 0.0 % + (0 − 0) × 100.0 % ÷ 10000 = 0.0 %
  • raw 2500 counts: 0.0 % + (2500 − 0) × 100.0 % ÷ 10000 = 25.0 %
  • raw 10000 counts: 0.0 % + (10000 − 0) × 100.0 % ÷ 10000 = 100.0 %

One count is 100.0 % ÷ 10000 = 0.01 %, so a display set to one decimal resolves changes of 10 counts; set two decimals only if the operator needs 0.01 % steps and the sensor can resolve them. Then the live checks: change the value from the controller side with a method that cannot move equipment and watch the display follow within the tag's update time; write once from the HMI if the tag is writable and confirm the controller sees the same number.

Decision: matches at 0, mid-span and full span, follows a live step, and shows its invalid-data state when the connection is broken — that tag and that graphic are commissioned. A mismatch only at the top point is a scaling end-point error; garbage at every point is a data-type or address fault; correct in the tag monitor but wrong on screen is a binding fault.

Questions asked

Is HMI programming the same as PLC programming?

No. The PLC program executes the control logic on the controller, cycle after cycle, whether any screen is connected. The HMI application only reads data items from the controller and writes requests back into them. Interlocks, permissions and safety functions belong in the PLC, because the HMI can be unplugged, offline or running an older project.

Do I need to write code to program an HMI?

Most platforms are configuration-driven: you place objects, bind them to tags and fill in properties, with no handwritten code. Scripting, usually a Basic-like editor used for calculations, recipes or logging, is optional and reserved for what object properties cannot express. The hard part of the job is the data mapping, not the code.

Can one HMI application talk to more than one controller?

Yes, when the platform supports multiple simultaneous driver connections. The driver layer holds a separate connection per device, and each tag's device reference selects which controller that value comes from. Plan the update load, because every added controller multiplies the polling the HMI has to service.

What is the difference between an HMI and an operator interface terminal?

In practice the two names describe the same job: a display and input device that gives an operator a window into the process. Operator interface terminal is the older name for the dedicated panel form, while HMI is the broader term that also covers PC-based and SCADA-hosted interfaces doing the same work.

Does ISA-101 apply to a small machine panel?

ISA-101 was written for process-plant HMIs, and its full documentation set is heavy for one machine panel. The core practice still applies at any size: write down the operating task each screen serves, design the graphics to that task, and test against it. A discrete machine panel gets most of the benefit from those three steps.

Keep reading

  • Troubleshooting

    Fixing Invalid Bit Address Errors When Adding HMI Tags

    When the tag editor throws GUI-024: Invalid Address on a slash-form bit address like IO4/05 after a software upgrade, the fault is in the tag-entry dialog, not in the PLC point. Export the tag database, restore the full bit address in a spreadsheet, re-import, and verify the object against the intended output before the screen returns to service.

    HMI and touchscreens

  • Troubleshooting

    Why C-More Shows Tag Addresses You Cannot Set in Productivity

    That address is the System ID the Productivity controller assigned to the tag, not a field you can type into Productivity Suite. View it in the Tag Database column headers, and keep the workflow one-way: create and name tags in Productivity, export, then import into C-More.

    HMI and touchscreens

  • How-to

    Learning advanced HMI features from demo projects

    Skip the search for one advanced course. Pick the capability you cannot reproduce, open the vendor's demo project for it, rebuild it in a clean test project, and pass the acceptance set before it becomes your internal standard. One demo per capability covers macros, database read/write, historical graphs, dashboards and remote access.

    HMI and touchscreens