Skip to content

Ladder editor (LD)

The Ladder diagram (LD) represents logic as an electrical schematic: current flows from the left rail to the right through contacts and reaches the coils. It is the most common language for bit logic, interlocks and indication.

Ladder editor

A Ladder program is a list of numbered rungs executed top to bottom every scan. Each rung has:

  • A header with its number, an editable comment (click to type) and the × button to delete it.
  • The ⌄ arrow on the left collapses or expands the rung; handy in long programs.
  • The left power rail and the right return rail.
Action How
Add rung New rung toolbar button or Ctrl+R
Move rung up / down Alt+↑ / Alt+↓
Collapse / expand rungs Alt+← / Alt+→
Select all Ctrl+A
Button Action
↶ ↷ Undo / redo (Ctrl+Z / Ctrl+Y)
✂ ⧉ 📋 Cut, copy, paste and duplicate (Ctrl+X / Ctrl+C / Ctrl+V / Ctrl+D)
New rung Adds a rung below the selected one
┤ ├ Normally open contact (Shift+F2)
┤/├ Normally closed contact (Shift+F3)
( ) Coil (Shift+F7)
🔍 − / + Zoom

Elements are inserted after the selected element. To create a parallel branch (OR logic) around the selected element, press Shift+F8.

The Library tab of the right panel contains everything that can be placed. Drag an element onto the rung and drop it where the insertion mark appears.

Ladder editor library

Category Elements
Contacts NO contact (normally open), NC contact (normally closed)
Coils Coil, Negated coil, Set coil (latches TRUE), Reset coil (clears to FALSE)
Timers TON, TOF, TP
Retentive timers RTON, TONR, RTOFF
Counters CTU, CTD, CTUD
Edge detection R_TRIG, F_TRIG
Bistables SR, RS
Transfer MOVE
Arithmetic, Comparators, Math, Scaling, Time, Signal, Control, Alarms… See the block library
Project Your own functions and function blocks
Element Conducts / acts when…
NO contact ┤ ├ the variable is TRUE
NC contact ┤/├ the variable is FALSE
Coil ( ) writes the rung result to the variable (TRUE if energised, FALSE if not)
Negated coil (/) writes the opposite value
Set coil (S) sets the variable to TRUE when energised and leaves it set
Reset coil (R) sets the variable to FALSE when energised

Contacts and coils use BOOL variables. Select an element and, in Properties, change its Type (e.g. from NO to NC without deleting it) or its Variable.

Contact inspector

Timers, counters, functions and function blocks sit on the rung like any other element:

  • The first input and output pins are in series with the rung (they carry the “power”). For example, a TON’s IN input is the rung condition and its Q output feeds whatever is to its right.
  • The other pins are direct operands: fill them with a variable or a literal in the inspector or next to the pin (PT = T#5s, PV = 10, CV = Local.Piezas).
  • Blocks with memory (FBs) show the instance name on top (e.g. C_Piezas) and the type below (CTU). The instance is added automatically to the program’s Instance table.
  • Functions without a Boolean pin get an EN input and an ENO output to control whether they run.

Rung with an R_TRIG and a CTU

Key Action
← / → Previous / next element
↑ / ↓ Previous / next rung (Shift extends the selection)
F2 or Enter Edit the selected element’s operand
Esc Clear the selection
Delete Delete the selection

Shortcuts only work with the pointer over the editor and when you are not typing in a field.

With View states on:

  • Energised lines and elements that are TRUE are drawn in green; those that are FALSE, in red.
  • Numeric block operands show their current value under the name (e.g. Local.Piezas 4).
  • Right-click a contact or coil to force the variable to 0 or 1, or to remove the force.

See Simulation.