Skip to content

HMI — Human-Machine Interface

PiPLC includes a built-in HMI editor for creating interactive operator panels that bind directly to PLC memory.

Modes of Operation

Mode Launch Description
Embedded Tools > HMI HMI window inside the main IDE
Standalone PiPLC-HMI executable Independent app that connects to any engine via WebSocket

Standalone HMI Application

The standalone PiPLC-HMI application connects to any PiPLC engine on the network, making it ideal for dedicated operator stations or remote monitoring.

Launching:

# Open with connection dialog
piplc-hmi

# Connect directly to a server
piplc-hmi --url ws://192.168.1.50:9100

# Open a saved HMI project file
piplc-hmi --file my-panel.hmi

Connection menu (standalone mode only):

  • Connect to Server (++ctrl+shift+c++) — opens a connection dialog to enter the server URL and select a context
  • Disconnect — disconnects from the remote engine

The status bar shows connection state (Connected/Disconnected) in standalone mode.

Tip

On Windows, .hmi files are associated with PiPLC-HMI during installation. Double-click any .hmi file to open it directly in the standalone app.

Editor and Runtime Modes

The HMI window has two distinct modes:

Editor Mode

The full editing environment with all chrome visible:

  • Menu bar, main toolbar, element palette, and properties panel
  • Drag and drop elements from the palette onto the canvas
  • Configure element properties (address bindings, colors, labels, ranges)
  • File operations: New, Open, Save, Save As

Runtime Mode

A minimal interface focused on the live operator panel:

  • Menu bar and main toolbar are hidden
  • Only a minimal runtime toolbar with mode toggle buttons is shown
  • Element palette and properties panel are hidden
  • Window auto-resizes to match the canvas resolution
  • Live data binding refreshes at 20 Hz (50 ms interval)
  • Scan statistics displayed in the status bar (scan count and average time)

Switch between modes using:

  • Mode > Editor Mode or ++f5++
  • Mode > Runtime Mode or ++f6++

Program change safety

If a program download replaces the monitored context's program while in runtime mode, the HMI automatically returns to editor mode to prevent stale bindings from referencing deleted data. A status bar message notifies you: "Program changed — HMI returned to editor mode."

Context Selection

By default, the HMI follows the IDE's active engine context. You can override this to monitor a different context independently:

  1. Follow IDE checkbox (toolbar) — when checked, the HMI tracks whatever context the IDE has selected
  2. Uncheck Follow IDE to enable the context combo box
  3. Select any available engine context from the dropdown
  4. The combo box updates automatically when contexts are created, removed, or renamed

This allows you to edit one context in the IDE while monitoring a different context on the HMI.

Note

If the pinned context is removed, the HMI falls back to the IDE's active context.

Fullscreen Kiosk Mode

Press ++f11++ to enter fullscreen mode, which hides all chrome — menu bar, toolbars, status bar, and dock panels — leaving only the HMI canvas.

  • Press ++f11++ or ++escape++ to exit fullscreen
  • ++alt+f4++ in fullscreen exits fullscreen instead of closing the application
  • Dock panels are restored appropriately based on the current mode (editor or runtime)

This is ideal for dedicated kiosk-style operator stations using a Raspberry Pi touchscreen.

Canvas Configuration

Resolution Outline

A dashed rectangle shows the target screen resolution as a design guide.

  • Toggle via View > Show Resolution Outline (enabled by default)
  • A resolution label is displayed at the bottom-right corner of the outline
  • The outline stays visible at any zoom level

Canvas Size

Configure the target resolution via View > Canvas Size...

Preset resolutions:

Preset Resolution Use Case
RPi 7" Touchscreen 800 x 480 Raspberry Pi official touchscreen
SVGA 800 x 600 Standard small display
Wide 7" 1024 x 600 Wide-format 7" displays
XGA 1024 x 768 Standard monitor
HD 720p 1280 x 720 HD displays
WXGA 1280 x 800 Wide XGA
Full HD 1920 x 1080 Large displays
Custom User-defined Any size from 100 to 3840 px

The dialog includes a live proportions preview showing the aspect ratio with a dimensions label. When custom dimensions match a preset, the preset auto-selects.

When switching to runtime mode, the view auto-fits to the target resolution. The editor canvas remains unrestricted with margins beyond the target area.

Grid and Snap

  • View > Show Grid — toggle the alignment grid
  • View > Snap to Grid — snap elements to grid intersections during placement

Grid spacing and grid color are configurable via Preferences.

HMI Preferences

Open via File > Preferences (++ctrl+comma++).

Canvas settings:

Setting Description
Background Color Canvas background color
Grid Color Grid line color (supports alpha for semi-transparent lines)
Grid Spacing Grid cell size in pixels (5–100)

Buttons: OK, Cancel, Apply, and Restore Defaults.

Available Elements

Input Elements

Element Description
Push Button Momentary button — active while pressed
Toggle Switch ON/OFF switch with two states
Selector Switch Multi-position selector
Slider Analog value control for N: region addresses
Numeric Entry Direct numeric input for integer values

Output Elements

Element Description
Indicator Lamp Color-coded status indicator for bit addresses
Motor Indicator Motor state display (running/stopped)
Numeric Display Numeric value readout from N: region
Bar Graph Visual bar chart for analog values
Trend Time-series trend chart with history

Decoration Elements

Element Description
Text Label Static text label for annotation
Rectangle Decorative shape for grouping
Background Image Background image layer for panel layouts

Connecting to PLC Memory

HMI elements bind to PLC addresses via symbolic names. An HmiSymbolResolver translates symbols to addresses at runtime.

The HMI communicates through the IEngineContext interface:

  • forceBit() / writeBit() for digital inputs
  • writeInteger() for analog inputs
  • readBit() / readInteger() for indicators and displays

See Also