BooleX.ai DOCS Book a demo
Docs / Guides

Import code exports

Get the line's PLC or DCS code into BooleX, and keep it current when it changes.

Export the code

From the engineering tool, export the whole project for the line in the vendor's standard format: see the table in Code importers. Export the HMI tags and alarms too (WinCC or FactoryTalk View) so questions quoting a panel message reach the code.

Name it in site.yaml

site.yaml
project: line2                 # code projects are <project>-<vendor>
exports:
  rockwell: plc/rockwell/line2.L5X
  codesys: plc/codesys/line2.plcopen.xml   # a second export of the same logic, optional
default_vendor: rockwell
hmi: hmi/wincc                 # optional

Put the site's tags.csv, alarms.csv and interlocks.csv beside site.yaml; they are applied on import.

Import it

For the site folder (deploy/config/site/, read as /config/site):

shell
docker compose -f deploy/compose.yaml run --rm import-code

The import replaces the project's code with a new revision; answers that cited the old revision still open it.

Keep it current: the watched folder

For a line whose code keeps changing, put each new export in the watched folder instead (L5X, PLCopen XML including CODESYS V3.5's, SimaticML XML, Control Expert XEF, DeltaV FHX, PCS 7 or 800xA XML; STEP 7 Classic source folders go through the import above). It is imported within 5 minutes:

shell
BOOLE_WATCH_DIR=/mnt/plc-exports make up PROFILES=,watch

Check it

On Knowledge gaps, the Code panel shows the project and when its export was imported. Ask "What does interlock IL-07 do?" and open the plc:// citation. When a new revision arrives, the Code change review workflow lists the changed elements on alarm and interlock cause chains in the workflow inbox.

Note. import-code imports the site folder's plant by default. BOOLE_PLANT selects another plant by ID or folder path.