Skip to content
Tutorials Center
My learning

Topics

Lesson 23 of 37 ยท HMI and SCADA

HMI Basics and Screen Design for PLCs

Learn what an HMI is, how it talks to a PLC through tags, how to design clear operator screens with colors and navigation, and model tag scaling in runnable C.

A PLC runs a machine, but people have to start it, adjust it and understand what it is doing. The HMI (Human-Machine Interface) is the screen that makes this possible: buttons to start and stop, numbers for temperatures and counts, colored lamps for states, lists of alarms. It can be a touch panel bolted to the machine, a rugged industrial PC, or a window on a tablet.

HMI products (TIA Portal WinCC, FactoryTalk View, Ignition Perspective and others) cannot run on this site. The lesson shows the concepts and read-only configuration examples, and the runnable programs are C stand-ins that model what an HMI does with data.

What an HMI does

An HMI is not a second controller. The PLC owns the logic; the HMI is a window onto the PLC's memory:

  • Display values, states and messages.
  • Accept commands (start, stop, setpoint changes) and write them to PLC memory.
  • Show alarms and let operators acknowledge them (see alarms and trends).
  • Manage access: operators, maintenance and engineers see and may change different things.
flowchart LR
    OP["Operator"] --> HMI["HMI panel"]
    HMI -- "tag read/write over a protocol" --> PLC["PLC memory"]
    PLC --> IO["Sensors and actuators"]

The HMI reads and writes PLC variables. The machine keeps working if the HMI is switched off.

That last point is a design rule: never put machine-critical logic in the HMI. If the panel crashes or is unplugged, interlocks and safety functions must still work.

An HMI object (a number field, a lamp) is bound to a tag. A tag has a name, a data type and an address in the PLC, for example Tank1.Level at DB10.DBD4 on a Siemens PLC, or Tank1_Level in an Allen-Bradley controller. Two kinds exist:

  • External tags that live in the PLC and are polled (or subscribed to) over the network.
  • Internal tags that exist only in the HMI, such as the current screen number or a local filter.

PLCs often store raw values, for instance a 16-bit analog input from 0 to 27648 representing 0 to 100 percent. Either the PLC program or the HMI scales this to engineering units (percent, degrees, bar). Keep the scaling in one place, preferably the PLC, so every screen shows the same number.

Scaling a raw value

The linear scaling formula is: value = lo + (raw - rawLo) * (hi - lo) / (rawHi - rawLo).

C C stand-in: scaling raw analog counts to engineering units

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with scanf or fgets), it gets the next line from this box.

If the raw value can go beyond the range (a broken wire reads below 4 mA), clamp or flag it; do not display a nonsense 120 percent.

Designing screens people can read

Good HMI design is about helping someone make a correct decision in seconds, often under stress.

  • Use color sparingly. Reserve red, yellow and green for alarm and status meaning. A screen full of bright colors hides real alarms. Many modern guidelines (for example ISA-101) recommend a gray background with color only for abnormal conditions.
  • Layout like the process. Place the tank, pump and valve in the order the product flows, left to right.
  • Show state with more than color. About one in twelve men has some color vision deficiency. Add shape, text or an icon: a valve that is open and green also shows the word "OPEN".
  • Make numbers readable. Use a clear font, units next to the value, and a sensible number of decimals. A temperature of 71.4 degrees does not need five decimals.
  • Navigate in few taps. The main overview, the alarm list and the active setpoints should be one touch away from anywhere.
  • Confirm dangerous actions. Starting a heater or clearing a batch should need a confirm step.
  • Protect settings. Require a login for setpoints and recipes, and log who changed what.

An HMI "push button" behavior

HMI buttons have different ways to write a tag: set while pressed (momentary), toggle, set once, or increment. For a toggle the PLC should do the logic, with the HMI only writing a request bit that the PLC consumes. Here is that handshake as a model:

C C stand-in: HMI request bit and PLC handshake

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with scanf or fgets), it gets the next line from this box.

The PLC reacts once per press because of edge detection, even if the touch lingers.

Common HMI mistakes

  • Too many screens with too little purpose; operators get lost.
  • Writing analog values from the screen with no limits. Always validate setpoints against minimum and maximum values in the PLC.
  • Forgetting a "communication lost" indicator, so operators trust stale numbers.
  • Animation and decoration that eat panel performance without informing anyone.

Larger plants use SCADA, which gathers data from many PLCs. That is the next lesson: SCADA architecture and tags.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Where should machine-critical interlocks live?

    The PLC controls the machine. The HMI is only a window; if it crashes, interlocks must keep working.
  2. 2. What is a tag in an HMI project?

    Tags connect screen elements to PLC memory (or to internal HMI values).
  3. 3. A transmitter delivers 0 to 27648 counts for 0 to 10 bar. What does a raw value of 13824 mean?

    13824 is half of 27648, so the scaled value is half of the range: 5 bar.
  4. 4. Why show an open valve with both a color and a text label?

    A second cue (shape, icon, text) keeps the screen readable for everyone.

Summary

  • The HMI is a window onto PLC memory: it displays values, sends commands and shows alarms.
  • Tags bind screen objects to PLC variables; scale raw values to engineering units in one place.
  • Design for quick decisions: restrained color, process-shaped layout, redundant cues, protected setpoints.
  • Keep critical logic in the PLC; use request bits that the PLC consumes.
  • The C programs are stand-ins; real HMI software is not available on this site.

Next: SCADA Architecture and Tags