The Editor never compiles IEC 61131-3 code itself. Builds go through the engineering host to the vendor compiler you already use: the TwinCAT Automation Interface, the CODESYS scripting engine and TIA Portal Openness.
State: kit shipped for TwinCAT, CODESYS and TIA Portal. The commands, tasks, status bar and Problems markers are tested on Linux against a model of the engineering host, and the real engineering host is tested on Linux, where no engine exists. No vendor compiler has run. The message formats parsed are the documented ones, not yet captured from a real build.
Build a project
Command Palette, category Neural Inverse PLC:
| Command | What it does |
|---|---|
| Build Project | Builds the project in its resident engine session |
| Rebuild Project | Rebuilds. A TIA Portal project is listed with the reason it cannot be rebuilt (Openness documents only a compile), and picking it builds nothing |
| Cancel Build | Cancels the running build |
Build Project and Cancel Build are also buttons on the TwinCAT Projects view. With several projects, the command asks which.
Build tasks
Terminal > Run Task offers, with source "PLC" and type ni-plc-build:
- a Build and a Rebuild task per TwinCAT project (
.tsproj); - a Build and a Rebuild task per CODESYS project (
name.project); - a Build task per TIA Portal project (
.apNN).
With one project in the workspace, its build is the default build task.
While it builds and after
- The status bar entry PLC Build shows "Building ..." while a build runs; click it to cancel.
- The compiler's messages go to Problems, named after the engine, for example
TwinCAT 3.1.4024.60 build,CODESYS 3.5.19.50 buildorTIA Portal V19 build. - The PLC output channel has the build's log.
| Vendor | Engine used | Where messages land |
|---|---|---|
| TwinCAT | The TwinCAT version the .tsproj pins. A project whose pinned version is not installed is not opened in another one, and the message names what was found | At the object file and line |
| CODESYS | The CODESYS of neuralInverse.plc.paths.codesys, with the profile of neuralInverse.plc.codesys.profile. Without the setting, the build says so and starts nothing | On the .project file at line 1, naming the object (... (reported at PLC_PRG)) |
| TIA Portal | TIA Portal VNN, the version of the .apNN extension, never a newer one (which would upgrade the project) | On the .apNN file at line 1, naming the object path (... (reported at PLC_1/Program blocks/Main [OB1])) |
A build in the same session opens the project again when it changed on disk and never saves it. One resident engine session per project serves its builds, and its controller actions, one after the other.
Agents can build too: the tools Build PLC Project and Rebuild PLC Project are asked every time (see Agent tools).
Project files the engineering host opens
The engineering host opens a CODESYS .project and a TIA Portal .apNN only, not archives or text-based project folders. See What's next.
Not verified
- Any build by TwinCAT, CODESYS or TIA Portal.
- Placing CODESYS and TIA Portal messages at a line.
- Build times on a project of realistic size.