Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>nautilus IEC 61131-3New to Visual Studio Code? Get it now.
nautilus IEC 61131-3

nautilus IEC 61131-3

joyauto

|
181 installs
| (0) | Free
IEC 61131-3 language support for the nautilus SCADA framework: Structured Text (.st), Function Block Diagram (.fbd), Ladder Diagram (.ld) and Sequential Function Chart (.sfc) with syntax highlighting, compile diagnostics, go-to-definition, live graphical diagram editors, inline live tag values from
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

nautilus IEC 61131-3

Develop PLC logic like software: IEC 61131-3 in VS Code, in git, with live values from a running controller.

Structured Text (.st), Function Block Diagram (.fbd), Ladder (.ld) and Sequential Function Chart (.sfc) are plain text files that diff and merge in git. This extension opens them as diagrams you can edit, shows what changed between any two revisions as a diagram, and paints live values and power flow from a running nautilus controller onto both the text and the diagram.

A ladder diagram with live power flow from a running controller

Get started in 3 steps

  1. Install this extension.
  2. Install the naut CLI. Click Install naut when the extension asks, or run nautilus: Install or Update the naut CLI. It downloads the release for your OS and CPU from GitHub, checks it against checksums.txt, and keeps it in the extension's storage. No Go toolchain needed. Terminals inside VS Code find it at once; to use it in other terminals too, click Add to PATH when it asks (see naut on your PATH).
  3. Create a project. Run nautilus: Create Project…, or follow the nautilus: Get Started walkthrough (install, create, open a diagram, run, test; about five minutes). The default Demo template is a three-task, three-language tour with a simulated plant. Then run naut run in the project folder and the editor goes live.

Creating a project from the Command Palette

Diagrams: FBD, Ladder and SFC

A Function Block Diagram open in the diagram editor

  • The text is the source of truth. Every gesture on the diagram is a structural edit that the Go compiler turns into a minimal text change, so the file stays small and reviewable. Layout comes from the logic; a node you drag is pinned in the file.
  • Open as Diagram Editor in a text editor's title bar turns the tab into the diagram; Show Source opens the text beside it. The preview button opens the diagram next to the text instead. To open these files as diagrams by default, set "workbench.editorAssociations": { "*.fbd": "nautilus.fbdDiagram" } (likewise nautilus.ldDiagram, nautilus.sfcDiagram).
  • FBD: drag pin to pin to wire, double-click to retype a constant or rename, insert blocks from the + add palette — function block places any standard block (PID included) or project block with every input an open pin — box-select, arrow keys to move. Double-click an FB's header to rename the instance. An insert lands beside the selected element, or where you double-click empty canvas; a network you arranged by hand keeps its layout.
  • Ladder: drag instructions from the palette onto a rung, drag elements between spots and rungs, ⊕ to insert, N for NO/NC, M for coil mode, B to branch around the selection, Ctrl-click several elements and O to OR them into one branch (a leg each), click a rung's name to select or delete the rung. FB… places any function block — standard or one of the project's library blocks — under a name you choose; double-click a block's header to rename the instance. With a controller running, power flow paints the rung.
  • SFC: steps, transitions, parallel and alternative branches, action tables and ACTION bodies, all editable in place; drag a step's handle onto another step to connect them. The active step highlights live.
  • In every diagram: copy, cut and paste (into another file of the same kind too), undo / redo / save with the usual keys, zoom and fit (Ctrl+wheel, Ctrl+= / Ctrl+- / Ctrl+0), and a ? button that lists every gesture and key for that editor.
  • Cross-reference from the diagram: select a contact, coil or block, an FBD variable chip, FB instance or pin, or an SFC step or action and press Shift+F12 (or right-click → Find All References). The References view lists every read and write of that name across the project and its declaration in nautilus.yaml or a tag file.
  • Tag descriptions on the elements: a tag's desc from nautilus.yaml (or a tag file), or a trailing (* comment *) on its VAR line, shows in the element's tooltip in all three editors, and under each ladder contact and coil as a second line, Studio 5000 style. Turn the second line off with nautilus.diagram.showDescriptions; FBD and SFC keep the description in the tooltip only, since their elements are packed too closely for another line.

A Sequential Function Chart with the active step highlighted

Export and print

nautilus: Export Diagram… (in the "…" menu of a diagram editor, a preview or a text editor, on the right-click menu of the editor or of the file in the Explorer) writes an LD, FBD or SFC diagram, or a Rockwell .L5X ladder, as:

  • PDF, paginated for printing: black on white, page breaks between rungs, networks and SFC ranks (never through one), the POU's name on every page and "Page n of N" with the file name in the footer. An SFC prints its ACTION bodies after the chart. Paper size and orientation come from nautilus.export.paper and nautilus.export.orientation; by default Letter or A4 follows the system locale, and a diagram too wide for a portrait page turns landscape.
  • SVG, the whole diagram as one vector image at screen size, for documents and slides.

nautilus: Print Diagram… makes the same PDF and opens it in the system's PDF viewer, to print from there. The diagram is drawn by the editors' own layout from the file, not captured from the screen: no selection, palette or diagnostics come along. With a controller connected, both commands ask whether to include its live values (power flow, values under the operands, active steps); the default is the program alone.

Visual diff

A ladder diff: added, removed and changed elements marked on the rungs

Review a logic change as a diagram, not as text.

  • vs git HEAD: the diff button in the diagram editor's title bar overlays your working copy on the last commit.
  • Between git revisions… (under "…"): pick any two commits from the file's history (renames followed), or one commit and the working tree.
  • vs Controller (under "…"): compare against the program a running controller is executing.
  • Added, removed and changed blocks, wires, rungs, steps and transitions are marked in place; removed elements come back ghosted. Works for FBD, Ladder, SFC and Rockwell .L5X.

Live values and online edit

Live tag values as pills next to identifiers, with the Live Values panel

  • Inline values: with a controller running, every identifier in your source gets its current value as a pill, and the diagrams animate. Values gray out when the stream goes stale. Point at a controller with nautilus: Connect to Controller… (default http://localhost:8080).
  • Live Values panel (nautilus in the Activity Bar): every tag and program local with its value; the pencil on a tag sets it.
  • Set Live Value…: right-click an identifier, or a tag's element in a diagram (a ladder contact or coil, an FBD variable chip, an SFC action or one-variable transition), to write a new value.
  • Toggle Bit: select a tag's element in a ladder, FBD or SFC diagram and press Ctrl+T (Cmd+T on macOS), as in Studio 5000, or T, to flip its BOOL tag on the controller. It is also on the right-click menu of a diagram element, of the text editor, of a BOOL's hover (next to Set value…) and of the Live Values panel. A forced tag is refused: the force would win the next scan.
  • Force… / Remove Force / Remove All Forces: hold a tag at a value against the field and the logic until you remove it — the PLC force table. Right-click an identifier or a tag's diagram element, or use the lock on a Live Values row. Forced values show an amber F on the inline pill, in the Live Values panel (a Forces group first) and on the diagrams, and a status-bar item reads N forces active until the last one is removed.
  • SFC online: right-click a step in a live SFC diagram for Set Active Step (jump the chart there, once), or a transition for Fire Transition (take it, once).
  • Online edit: Download Program to Controller swaps the running program without a restart; Diff Program with Controller, Pull Program from Controller and Rollback Controller Program do what they say. A status-bar item shows whether the file matches the controller.
  • Download and Rollback ask for confirmation, naming the controller URL and program, before changing what a controller runs (nautilus.confirmControllerWrites). For a token-protected controller, set nautilus.token in workspace settings.

HMI mimic editor

The mimic editor: tanks, pumps and valves with pipes, bound to live tags

*.mimic.json P&ID documents for the @joyautomation/nautilus-hmi <Mimic> component open in a graphical editor. The JSON stays the file you commit (Open With → Text Editor any time).

  • Equipment renders with the real HMI components (Tank, Pump, Valve, Gauge, Sparkline), and your own *.svelte components render next to them.
  • Place equipment from the palette, draw pipes that snap to ports and follow the equipment when it moves, and get an orthogonal route suggested around whatever is in the way.
  • Bind props to tags in the props panel; with a controller running, the canvas animates with the real process.
  • Operate it, too: a CommandButton or WriteToggle on the screen, or a button in your own component, writes its tag to the controller while live values are on (see Operator screens).
  • Every gesture is one text edit, so undo is text undo. Press p to edit an equipment's ports; Nautilus: Edit Component Ports… does the same for any component, built-in or custom, in the preview pane.
  • Writing a component? Open its .svelte and press the preview button in the editor title: the component renders beside the text as you type, with sample props you set in the pane and its pipe connection points drawn on the render — turn ports on in the pane's header to drag, add (double-click the render) or remove them. Props and ports both go to {Name}.component.json, so the AI or teammate who writes the next component can ship its preview data and ports with it. That sidecar opens as plain JSON; its own preview button lands the same pane on the component it describes, a kit built-in included.
  • Want your own tank symbol? nautilus: Copy Kit Component to Project… copies the kit's Tank (or any kit component) into src/lib as a component of your own, imports rewritten to the package, sidecar seeded with the kit's ports, and opens it with the preview beside — change the drawing from there. Register it on the page with <Mimic registry={{ MyTank }}> and point equipment at it by name.
  • Writing a page? Open a +page.svelte and press its browser button (nautilus: Preview HMI Page): the project's own npm run dev starts in a terminal and the page's route opens in VS Code's Simple Browser beside the text, live-reloading as you type, with values from the controller at nautilus.runtimeUrl. Hold Alt+X in the page and hover to see which .svelte drew what; click to jump to it. Also works from a Remote SSH window.

3D scene editor

*.scene.json documents for the @joyautomation/nautilus-hmi-3d <SceneView> component open as the 3D view itself, with the same renderer the built HMI uses. The JSON stays the file you commit (Open With → Text Editor any time), which is the point: an AI or naut scene init writes the scene, and you drag what landed in the wrong place.

  • The palette lists the built-in kinds and the document's own (glTF models, assemblies, component kinds). Pick one, click the ground, and a node lands there on the grid.
  • Click a node for a gizmo: move (G) or turn (R), snapped to the grid cell and 15° unless you hold Shift. The panel beside it edits the same fields by number. Del deletes, Esc deselects, Save view writes the orbit camera into the document. A click picks through glass (the pump inside the tank, not the tank); click the same spot again to go one deeper, or click a node's label.
  • Pipes port to port. Every node's ports wear amber marks; click one, then another, and a pipe runs between them (an orthogonal route, anchored at both ends, so it follows its nodes). Select a pipe in the panel and its points wear handles: click one for the gizmo, drag, Del removes the point, Esc clears. A pipe still on its suggested route is re-routed when either node moves; one you laid by hand is left as laid.
  • Lit / Flat / Paper in the toolbar previews a look; Use … as the scene's look in the panel writes it to the document; the models render in every look (on paper as white fills with inked edges).
  • Models, textures and HDRIs are found where naut check finds them (next to the scene, under hmi/static/, hmi/build/); a missing file is named in a banner and its kind draws as a grey box. A component kind draws as a box of its declared bounds — the editor places it, the app renders it.
  • With a controller running, bound nodes animate while you place them. Every gesture is one text edit, so undo is text undo and a move diffs as one pos line.

3D kind editor

A {Name}.kind.json — a 3D kind in a file of its own, the same keys a scene's kinds entry takes (type, members, model, bounds, labelAt, status, drive), named by the scene as "pump": "hmi/src/lib/kinds/pump.kind.json" — opens as the kind itself: its model on a turntable (T toggles), in the lit, flat or paper look.

  • Click a part on the model to pick it. The part under the pointer lights up; a click picks it (a second click on the same spot goes to the part behind — the impeller inside the volute), the panel names it with the parts it sits in and its drives, and Add drive starts on it. The Parts list picks by name; hovering a name or a drive row lights the part on the model. Esc or a click on the ground clears.
  • Ports go where you click. With a part picked, Add port here puts a port at the point the click landed, facing out of the surface ("ports": { "discharge": { "at": [...], "dir": [...] } }); each port is an amber mark on the model and a row in the panel (name, at, dir, here to move it to the last click, ×). A scene anchors a pipe end to a port — "from": { "node": "P101", "port": "discharge" } — and the pipe follows the node when it is moved. The built-in tank, pump and valve have ports of their own (inlet / outlet, suction / discharge, in / out).
  • A point by name. A port's at, and labelAt, may be a place on a box instead of metres: Add port at… top of Motor writes { "part": "Motor", "anchor": "top" }; "labelAt": "top" is the top of the bounds; top-front, left, center and an offset are there too. It survives the model being re-exported. Each such row has a mode menu (metres · on the bounds · on a part).
  • A colour from a number. Tick ramp on a tint or emissive drive and it becomes stops of value → colour ("ramp": [[20, "fluid"], [90, "critical"]]), interpolated between stops and clamped beyond them; the sample value slides the colour live.
  • Blink and pulse in one click. Blink on {member} puts a glow on the picked part that flashes twice a second while the member is true; Pulse on {member} makes the part breathe (±10 % once a second). Each is an ordinary drive row afterwards: every boolean row (tint, emissive, visible) has a blink field in Hz, and a pulse row has Hz and ± ("pulse": { "bind": "Alarm", "hz": 1, "amount": 0.1 }).
  • The model's named objects fill every drive's mesh menu, so a drive targets something that exists; a name the model lacks is flagged. A drive is a row: its mesh, its channel (spin, turn, scale, tint, emissive, visible, pulse) and the channel's few fields. Add drive, × removes.
  • Eject to component… writes {Name}.svelte beside the kind file — the model and these drives as code (<ModelNode data={{ model, drive }} …/> from @joyautomation/nautilus-hmi-3d, plus the contract naut check holds nodes to), offers to point the scenes that name the file at it, and opens it beside: the place for anything the drive vocabulary cannot say, with nothing lost on the way out. The kind file stays.
  • Ask AI… picks a prompt about this file — a model from a picture, sensible part names, drives for the UDT's members, a variant — and opens your editor's chat with it (or copies it for Claude Code). The open-ended work is the AI's; the tweaks stay in this panel.
  • Sample values for the members the kind reads (a checkbox where a tint or a {X?a:b} reads it, a number elsewhere) drive the meshes and preview the status text; they are never written to the file.
  • type, members, model, status, labelAt and bounds are edited beside it. Every change is one text edit, one drive per line, so undo is text undo and a drive diffs as one line. The scene editor's palette captions a file-backed kind glTF · file and its edit kind link opens the file beside the scene.
  • The model is found up from the file's folder through the same roots the scene editor uses (hmi/static/, hmi/build/); not found, the panel says so and the kind draws as a grey box with its drives still editable by name.

Testing

Acceptance tests in the Testing view, with a failure shown on the assertion

  • *_test.yaml acceptance suites appear in VS Code's Testing view, run through naut test.
  • Tests run on a virtual clock, so a ten-second alarm delay is asserted exactly, in milliseconds, without waiting.
  • Run one test from the gutter; a failure shows the tag value that broke (PumpRun = false, want true) inline on the failing line of expect:; the peek adds the step, the virtual time and the traced tags.
  • nautilus.yaml (including drivers:), tag, alarm and test files get completion and validation from bundled JSON schemas, in any YAML editor that honors schema associations (for example Red Hat's YAML extension).

Rockwell L5X

  • A Logix .L5X export opens as ladder: Open as Diagram Editor, or nautilus: Open Ladder Diagram Preview. No Rockwell software, licence or Windows; the file is parsed, not executed.
  • The diagram is read-only (the controller is the source of truth), marked with a read-only · Logix export pill.
  • Diff vs HEAD and between git revisions work on .L5X, so a changed rung reads as a changed rung rather than a wall of XML.

Language intelligence

The extension runs naut lsp, the real nautilus compiler as a language server.

  • Diagnostics as you type in .st, .fbd, .ld and .sfc: parse errors, undeclared identifiers, unknown FB fields and type mismatches, on the exact line (on the rung or step in a diagram).

  • Go to definition, hover (type, var section, a tag's unit and description) and completion (in-scope variables, keywords, types, and the compiler's own function and function-block registries).

  • Signature help while you type a call: the function's parameters with their types (LIMIT(MN, IN, MX)), or a function block's input pins and, after =>, its outputs, with the one you are on highlighted — by position after each ,, or by name once you write PT :=.

  • Find all references (Shift+F12, or Go to References): a tag in every program that binds it — .st, and .fbd/.ld/.sfc on the diagram file's own lines — and where nautilus.yaml or a tag file names it; a local only inside its POU; t1.Q only as that instance's Q.

  • Outline, breadcrumbs and Go to Symbol (Ctrl+Shift+O) in .st, .fbd, .ld and .sfc: each POU and TYPE, its VAR sections and their declarations (name : type), STRUCT fields; then the FBD netlist statements, the ladder rungs (name and comment), or the SFC steps (the initial one marked), transitions (From → To) and actions. It keeps working while a line is half typed.

  • Syntax highlighting works with no CLI at all.

Requirements

  • VS Code 1.82 or newer, on Linux, macOS or Windows.
  • The naut CLI, 0.13.0 or newer, for diagnostics, the diagram editors, and online edits (which ask naut compose for the program's composition). nautilus: Install or Update the naut CLI installs it; a naut on your PATH (for example from go install github.com/joyautomation/nautilus/cmd/naut@latest) is used first. The extension warns when the one it finds is older than it needs.

naut on your PATH

When the extension runs its own copy of naut:

  • Terminals inside VS Code get its folder first on their PATH, so naut there is the one the editor uses. New terminals have it; relaunch any that were open. When the extension runs a naut of your own instead (on PATH, or nautilus.cliPath), their PATH is left alone.
  • Other terminals: after installing, the extension asks before changing anything and lists exactly what will change. Click Add to PATH, or Not now (remembered; run nautilus: Add naut to PATH later). With your OK, and no admin rights:
    • macOS and Linux: a link ~/.local/bin/naut to the extension's copy (so updates follow). If ~/.local/bin isn't on PATH yet, one line that appends it, ending # added by the nautilus VS Code extension, goes into your shell's startup files. macOS: ~/.zprofile (~/.bash_profile if your shell is bash), and the other one if it exists. Linux: ~/.profile (~/.zshrc if your shell is zsh), plus ~/.bashrc, ~/.zshrc, ~/.profile and, for zsh, ~/.zprofile where they exist. fish (if ~/.config/fish exists): ~/.config/fish/conf.d/nautilus.fish. Other shells: add ~/.local/bin to PATH yourself. The prompt names the exact files.
    • Windows: the extension's folder is appended to your user PATH (HKCU\Environment, kept as an expandable string so %USERPROFILE% entries still work).
    • Open a new terminal window afterwards. A naut you installed yourself keeps winning (the folder is appended, not prepended), and an existing ~/.local/bin/naut the extension didn't make is never replaced.
  • nautilus: Remove naut from PATH undoes it: the link, the marked lines, the fish file, the user PATH entry, and the integrated terminals' PATH. It touches nothing it didn't add.
  • A running nautilus controller (naut run) for live values, online edit and the controller diff.

Settings

Setting Default Description
nautilus.cliPath naut The naut CLI. A bare name is looked up on PATH, then the copy the install command manages, then $GOBIN, $GOPATH/bin, ~/go/bin, ~/.local/bin, /usr/local/bin, /opt/homebrew/bin (%LOCALAPPDATA%\nautilus on Windows). A full path skips the search.
nautilus.runtimeUrl http://localhost:8080 Base URL of the controller for live values, online edit and the controller diff.
nautilus.liveValues.enabled true Show live values inline and on diagrams when a controller is reachable.
nautilus.token "" Bearer token for writes to a controller started with NAUTILUS_TOKEN. Set it in workspace settings.
nautilus.confirmControllerWrites true Confirm before Download or Rollback changes what a controller runs. Leave it on for anything that might be live.
nautilus.logix.resetValuesOnDownload false Download Project to Logix Controller keeps the controller's tag values where the tag is unchanged; turn this on to start every tag at the project's value (naut logix deploy --download --reset-values).
nautilus.export.paper auto Paper for exported and printed diagrams: letter, a4, or auto (Letter where the system locale's region uses it, A4 elsewhere).
nautilus.export.orientation auto portrait, landscape, or auto (portrait unless the diagram is clearly wider than a portrait page).
nautilus.mimic.snapToGrid true Snap dragged equipment, labels and pipe points to the grid in the mimic editor.
nautilus.scene.snapToGrid true Snap a dragged node to the grid cell and its rotation to 15° in the scene editor; Shift while dragging is a free move.

Commands

The most used; all are under nautilus: in the Command Palette.

Command What it does
Install or Update the naut CLI Download and verify the latest naut release
Create Project… Scaffold a project with naut new
Get Started Open the walkthrough
Open as Diagram Editor / Show Source Switch a file between text and diagram
Open FBD / Ladder / SFC Diagram Preview Diagram beside the text
Open Component Preview / Preview HMI Page A .svelte component, or a whole route, beside the text
Copy Kit Component to Project… Start your own symbol from one the kit ships
Diff … Diagram (vs git HEAD / between git revisions… / vs Controller) Visual diff
Export Diagram… / Print Diagram… An LD, FBD or SFC diagram as a paginated PDF or one SVG image; print through the system's PDF viewer
Connect to Controller… Set nautilus.runtimeUrl for this workspace
Set Live Value… Write a tag on the controller
Toggle Bit Flip a BOOL tag on the controller (Ctrl+T / Cmd+T in a ladder, FBD or SFC diagram)
Force… / Remove Force / Remove All Forces / Show Forces Hold a tag at a value until removed; list and clear forces
Set Active Step / Fire Transition Jump a running SFC chart to a step, or take one transition, once
Download Program to Controller Online edit
Diff / Pull / Rollback Program Compare with, bring back, or undo on the controller
Show CLI Info Which naut is in use, and its version
Add naut to PATH / Remove naut from PATH Make the extension's naut usable in any terminal, or undo that (details)

Troubleshooting

  • "Couldn't find the nautilus CLI." Run Install or Update the naut CLI. VS Code started from a desktop launcher or the macOS Dock doesn't see a PATH set in your shell profile; the extension searches the usual install directories, and the nautilus output channel lists every one it tried. Show CLI Info says which naut it picked.
  • naut: command not found in a terminal. Inside VS Code, relaunch the terminal. Outside, run nautilus: Add naut to PATH and open a new terminal window (see naut on your PATH).
  • Flatpak VS Code. Its sandbox can't run programs installed on the host, so a naut on your PATH is invisible. The install command puts a copy inside the sandbox; or use VS Code from a .deb, .rpm or tarball.
  • Closing the Show Source tab asks to save. A diagram editor and the text editor share one document. Closing a dirty text tab prompts Save / Don't Save, and Don't Save discards unsaved diagram edits too, not just the text tab's — so save first (Ctrl+S) or close with Cancel. This is VS Code behaviour for custom text editors, not something the extension can opt out of.
  • No live values / "no controller at …". Check that naut run is running and that its URL matches nautilus.runtimeUrl. The status-bar item shows the connection state and toggles live values.
  • The controller URL setting seems ignored. A scaffolded project's .vscode/settings.json sets nautilus.runtimeUrl to http://localhost:8080, and workspace settings win over user settings. Use Connect to Controller… (it writes the workspace setting) or edit that file.
  • .st files have someone else's highlighting and no diagnostics. Another extension claimed .st. Add "files.associations": { "*.st": "iec-st" } (scaffolded projects already have it).
  • Commands appear but do nothing (local VSIX). A VSIX built with vsce package --no-dependencies can't load its language client. Build without that flag; see CONTRIBUTING.md.

Release channels

  • Stable (even minor versions, 0.10.x, 0.12.x, …): what you get by default. Each stable release is a pre-release that ran for a few days without a follow-up fix.
  • Pre-release (odd minor versions, 0.11.x, …): built from main on every version bump. Choose Switch to Pre-Release Version on the extension page, or code --install-extension joyauto.vscode-iec --pre-release.

The CHANGELOG lists every change on both channels.

Links

  • nautilus on GitHub: the runtime, the naut CLI and this extension (tools/vscode-iec)
  • Documentation
  • Issues
  • Contributing to the extension

Licensed under the Apache License 2.0.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft