Repository navigation
v0.16.0 — Logix projects in as nautilus source
Logix projects in, as nautilus source, and the language catches up to IEC 61131-3
The headline is naut logix import --project: it takes an L5X export of a Studio 5000 project and writes a whole nautilus project from it, with no Rockwell software on the machine. Around it, the language gets most of the IEC 61131-3 it was missing (case-insensitive names, enumerations, the full conversion matrix, a force table, SFC timed qualifiers), and the language server gains signature help, the Outline and Find All References.
Logix: export → text → nautilus project
naut logix import --project <dir> <file.L5X>writes a project: the manifest withtarget: logixfilled in from the controller, the tags with their descriptions, UDTs as IEC types, every ladder routine as a PROGRAM in ladder source (rung comments and initial values included), and Add-On Instructions as FUNCTION_BLOCKs inlib/. A rung with no nautilus form is kept as a comment and counted under not carried; it is never guessed at.--programspicks which programs come in, and--comm-path/--hostsay how to reach the controller. On the generic DemoLine fixture:The$ naut logix import --project demoline DemoLine.L5X wrote demoline/MainProgram.ld wrote demoline/nautilus.yaml wrote demoline/tags/logix.yaml 1 ladder routine, 1 complete; 2 rungs, 2 carriedMainProgram.ldit writes:PROGRAM MainProgram VAR StartPB : BOOL; (* P-101 start pushbutton, field-wired NO *) ... HiLevelSP : REAL := 85.0; (* LAH-101 high-level alarm setpoint *) END_VAR LD RUNG r0 (* P-101 pump seal-in: Start latches the run command, Stop drops it out *) [ StartPB | RunCmd ] /StopPB ( RunCmd ) RUNG r1 (* LAH-101 high-level alarm when tank level is at or above the setpoint *) GE(LevelPct, HiLevelSP) ( HiLevelAlm ) END_LD END_PROGRAM- The whole path is in one guide. guides/logix goes
naut logix convert(ACD → L5X throughlogixd), thenimport --project, thennaut logix servewith live values in the editor. Each step names the release it needs. logixdis built from source on the licensed Windows machine: runtools\logixd\install.ps1from a clone or from this release's Source code (zip). There is no binary because it links Rockwell's SDK client, which only the SDK install provides.nautfinds it via--agent/--tokenorNAUTILUS_LOGIXD_URL/NAUTILUS_LOGIXD_TOKEN.- Authoring for Logix (experimental): write ladder or ST in nautilus and deploy it to a ControlLogix/CompactLogix controller, with Studio 5000 running headless behind
logixd. This addsnaut logix write,naut logix deploy(--online,--download --yes),naut logix mode,naut test --target logix,naut check --target logix, atarget: logixmanifest section,dialect: logix, and I/O asalias:tags. ST programs now get controller tags for the manifest tags they use (#251).naut logix drift --logiccompares logic only. See Authoring for Logix. (#225)
Language (IEC 61131-3)
- Identifiers are case-insensitive: variables, tags, POUs, types, FB pins, members, SFC steps. Names display as declared. (#241)
- Enumerations:
TYPE Mode : (Idle, Run := 10, Fault),Mode#Run, enum-typed tags, CASE on members. Live values show the member name, and writes take the name, including through member paths likeRecipe.Steps[2].Mode. (#242, #247, #250) - The full conversion matrix: every
<A>_TO_<B>, the overloadedTO_<type>(x)andTRUNC_<int>. Narrowing wraps to the target width as on Codesys, and a REAL or STRING with no value in the target faults the scan. (#244) VAR_TEMP,REGION,VAR_GLOBAL CONSTANTproject constants, CASE on named constants, partial accessw.%X3/%B1/%W0, EN/ENO in ST and FBD, and parse errors that name the token they expected. (#242, #236)- Project model: manifest tags are in scope in every PROGRAM without
VAR_EXTERNAL.type:takes any elementary type, UDT, enum or ARRAY. Codesys-style GVL files work, and a library's errors are reported once, at the library. (#243) - Force table: forces on inputs, outputs and struct members, plus Set Active Step and Fire Transition for SFC, and
force:/unforce:steps in acceptance tests. (#234) - SFC: timed qualifiers
L/D/SD/DS/SL, IEC textual associations, and step supervision withMAXTIME/ERROR. (#235)
Language server and editor
- Signature help (#168), document symbols for the Outline, breadcrumbs and Go to Symbol (#172), and Find All References, including from the diagrams (#171, #237).
- Ladder, FBD and SFC editor parity work (#232, #233, #236). It ships in the VS Code extension: pre-release 0.13.3 today, stable 0.14.0 to follow. Both need this CLI.
Also
oplog, a replicated log of operator intent agreed by a majority (library +/api/oplog,/api/quorum) (#158). Eight more operator-view UDTs inhw(#157). Sparkplug sends no DATA between a Rebirth NCMD and its NBIRTH (#166)./verified/proof pages on the docs site, built from the last green rig and CI runs (#161–#164).
Upgrading from 0.15
Run naut check after upgrading. These used to pass and now don't:
- Names that differ only in case in one scope are now a duplicate declaration (a
Runningtag and arunninglocal, say). Rename one. (#241) - A program local with a tag's name now shadows the tag, and
naut checkwarns. A tag a program uses with neithertype:nor a typedinit:is an error; addtype:. AVAR_EXTERNALthat disagrees with the tag'stype:is an error. (#243) #name(SCL's prefix) is rejected; write the bare name.- Conversions are typed to their target.
REAL_TO_INT/TIME_TO_INTgive a 16-bit INT, soREAL_TO_INT(40000.0)now faults the scan; useREAL_TO_DINT.REAL_TO_WORDand its kin are a compile error that names what to write. (#244) - A bit index past the type's width (
w.16on a WORD) is a compile error. (#222) - API clients: an enum value is its member name (a string) in
/api/stateand the stream, and/api/metacarries declared types.POST /api/tagsto a forced tag returns 409. (#250, #234)
The VS Code extension that goes with this CLI is 0.13.3 on the pre-release channel, with stable 0.14.0 to follow. Install it from the Marketplace or Open VSX (joyauto.vscode-iec). The VSIX attached here is the same extension code, built at this tag before the version bump, so it reports itself as 0.13.2.