Learn PLCs free

OpenPLC Editor: Complete Walkthrough

The OpenPLC Editor is a free fork of Beremiz IDE that targets the OpenPLC Runtime. It supports all five IEC 61131-3 languages — Ladder Diagram (LD), Structured Text (ST), Function Block Diagram (FBD), Sequential Function Chart (SFC), and Instruction List (IL). Same project compiles for Arduino, Raspberry Pi, ESP32, Linux PC and Windows.

Step 1: Install the Editor

Download from openplcproject.com/runtime. Pre-built installers for:

  • Windows — .exe installer (~150 MB)
  • Linux — .deb (Ubuntu/Debian) or AppImage
  • macOS — .dmg (Apple Silicon supported as of v1.5+)

Default install path includes Python runtime, Beremiz core, and Matiec compiler. No external dependencies.

Step 2: Workspace orientation

Three main panes:

  • Project tree (left) — Programs, Data Types, Resources, Configurations.
  • Code editor (centre) — Ladder canvas, ST text editor, SFC graphical editor depending on which POU is open.
  • Variables / messages (bottom) — local variable declaration table, compiler output, errors.

Step 3: Create a project

  1. File → New Project → choose folder.
  2. Right-click on Programs → Add → POU → name it (e.g. main) → choose Language (LD, ST, FBD, SFC).
  3. Right-click on Resources → Add → Task → period (e.g. T#20ms) → set the POU to run on this task.
  4. Declare global variables in the Configuration: %IX0.0 (digital input 0), %QX0.0 (digital output 0), %IW0 (analog input word 0), etc.

Step 4: Write a ladder rung

In the LD canvas:

  1. Right-click → Add → Rung.
  2. Drag a Contact onto the rung. Double-click to set the variable (e.g. Start).
  3. Drag a Coil onto the rung. Set its variable (e.g. Motor).
  4. Add a parallel branch with another Contact (Motor) to create a seal-in.
  5. Add an NC Contact (Stop) at the end before the coil.

Step 5: Build for the runtime

File → Generate program for OpenPLC Runtime. This invokes the Matiec compiler and produces an .st file plus a .cpp for embedded targets. Where the file goes depends on your target:

  • Linux/Windows runtime: upload the .st file via the OpenPLC web interface (port 8080).
  • Arduino: copy the generated Arduino sketch folder into Arduino IDE and upload.
  • ESP32: same as Arduino — Arduino IDE with ESP32 board package.
  • Raspberry Pi: upload via web interface; runs natively on the Pi.

Related guides