Read a Logix project as text, with no Rockwell software
Your Logix project lives in an .ACD, a binary only Studio 5000 can open.
An L5X export is the same project as XML, and naut reads it with no
Rockwell software, no licence and no Windows. In this lesson you turn an
export into plain files, look at them, and run the logic on your computer.
About fifteen minutes. You need naut
(install) and any L5X.
Logix stays your controller here. This is a copy to read, diff, test and review; nothing is written back to a PLC.
Export from Studio 5000
Section titled “Export from Studio 5000”In Logix Designer, choose File, then Export and save an .L5X. (If you
only have an .ACD on another machine, Allen-Bradley
Logix shows how to convert it with an agent beside a
licensed Studio 5000.) The output below is from a small project: a receiving
tank and a transfer handshake, one task, one routine.
Import it
Section titled “Import it”naut logix import --project line Line.L5Xwrote line/MainProgram.ldwrote line/lib/logix_types.stwrote line/nautilus.yamlwrote line/tags/logix.yaml1 ladder routine, 1 complete; 5 rungs, 5 carriedThe last line is the report: how many ladder routines it found and how many rungs it could carry into nautilus. A rung it cannot carry stays in the program as a comment, and the report lists it, so nothing disappears silently.
cd linenaut checknaut check: 2 file(s), 0 with errorsRead the ladder
Section titled “Read the ladder”Open MainProgram.ld. Each routine became a program; the rungs are the same
rungs, as text:
RUNG r1 (* A request, no fault, and a ready tank starts the accept-handshake timer *) Line_Request Line_Ready /Line_Fault AcceptTmr:TON(PT := T#2S)
RUNG r2 (* Accept once the handshake timer has settled *) AcceptTmr.Q ( Line_Accept )A contact is the tag’s name, /Line_Fault is a normally closed contact, and
( Line_Accept ) is the coil. The TON is dropped into the rung, and its
.DN bit is .Q. The rung comments came across, including the
interlock one of the engineers added after commissioning. The
Studio 5000 instruction map lists every
instruction.
Run it
Section titled “Run it”naut runThe logic scans on your computer, against an in-memory stand-in for the field:
curl -s localhost:8080/api/state | jq -c .tags{"Line_Accept":false,"Line_BatchId":0,"Line_Fault":false,"Line_Ready":true,"Line_Request":false,"Line_Status":{"Alarm":false,"Mode":1},"Line_TankLevel":20}Line_Ready is true because the tank level, 20, is below the 80 that rung
r0 allows. Line_Request is an input: it belongs to the field, so a write is refused,
and you hold it with a force (the dashboard
lesson
shows how):
curl -s -X POST localhost:8080/api/forces -d '{"name":"Line_Request","value":true}'The handshake timer starts, and two seconds later Line_Accept goes true.
You are watching your Logix program run without a Logix controller.
Where things live: what each file is, against the Studio 5000 organizer you know. To write the project back to a controller, read Allen-Bradley Logix.
nautilus is free and open source (Apache 2.0), built by Joy Automation. For implementation or support on your site, see Joy Automation services. Privacy.