Four languages, one program model
A nautilus program file is .st, .ld, .fbd, or .sfc. Pick the
language per task and mix them freely in one controller: the demo project
runs its control loop in FBD, its interlocks in ladder, and its plant
simulation in ST, all against one tag store.
Text first
Section titled “Text first”IEC 61131-3 defines ladder, function block, and sequential function chart
graphically. nautilus gives each one a text form that carries the standard’s
semantics with no vendor dialect: rung text for ladder, a netlist for FBD,
and the standard’s own textual keywords for SFC. The text file is the
program. The VS Code extension projects it into a full diagram editor where
every gesture is a structural edit to the text underneath, so a wiring
change, a new rung, or a new step shows up in git diff as a few readable
lines.
One compile chain
Section titled “One compile chain”Each graphical language transpiles toward Structured Text, one hop for FBD and SFC and two for ladder, and ST lowers to the typed IR the runtime executes:
.st ─────────────────────────► IR .fbd ── transpile ──► ST ──────► IR .ld ── transpile ──► FBD ──► ST ─► IR .sfc ── transpile ──► ST ──────► IRBecause the hops preserve line maps, a diagnostic anywhere in the chain
lands on your source: an .ld error points at the rung, an .sfc error at
the step or transition. And because everything ends in one IR, the whole
toolchain is shared. Built-in functions and function blocks, user
FUNCTION_BLOCKs from .st, .ld, or .fbd library files, arrays and
structs, nautilus check,
acceptance tests, live values, online edits, and visual diffs behave the
same in every language.
Which language for which job
Section titled “Which language for which job”| Logic | Language | Why |
|---|---|---|
| Interlocks, permissives, latches, annunciators | Ladder | Reads as the relay logic it replaces; power flow is the review |
| Loops, signal conditioning, continuous control | Function Block Diagram | Data flow between blocks is the natural shape |
| Math, arrays, structs, physics, anything algorithmic | Structured Text | The full language; the other three lower to it |
| Batch sequences, state machines, startup and shutdown | Sequential Function Chart | Steps and transitions are the spec of the process |
nautilus new --language ld (or fbd, sfc) scaffolds a minimal project
in that language. Tasks are declared in nautilus.yaml, one program file
each, at their own scan rate. See Function blocks, libraries, and
tasks for structuring logic across files and
tasks, and the language reference for evaluation
semantics and every built-in.