integrations · codesys

CODESYS

A dedicated CODESYS runtime sits behind the 2ot router, synchronizing readable IEC source with the CODESYS project model and returning build diagnostics through the same workspace workflow.

Workspace-aware routing

With a CODESYS workspace configured, common operations can be invoked as 2ot pull, 2ot push, 2ot build and 2ot status. The root executable resolves the workspace and routes the command to the CODESYS runtime. Explicit 2ot codesys ... commands remain available for CODESYS-specific setup and operations.

Readable textual workspace

Pull and push operate on readable CODESYS text rather than forcing the source workflow through XML wrappers. POUs, GVLs, DUTs, interfaces, methods, actions and properties can be represented as ordinary workspace files while native sidecars remain native when CODESYS exposes them that way.

Rust orchestration, CODESYS semantics

Rust owns CLI routing, workspace configuration and process orchestration. Vendor-specific project import, export and build behavior stays in the CODESYS integration layer, keeping those semantics behind the runtime boundary instead of leaking them into the compiler core.

Bidirectional synchronization no longer depends on cds-text-sync

Readable pull, push and import flows can work directly through the current CODESYS runtime. A configured cds-text-sync root can still support comparison and resource diagnostics where useful, but it is no longer the foundation of normal workspace synchronization.

Representative operations

Representative CODESYS operations in 2ot
OperationPurpose
2ot pullExport the configured CODESYS project into the readable text workspace.
2ot pushImport workspace changes back into CODESYS and save the project through the configured runtime.
2ot buildRun the authoritative CODESYS build and collect vendor compiler diagnostics.
2ot codesys clear-projectClear supported textual project objects for deterministic rebuild and validation workflows.
2ot codesys import-rowImport generated Structured Text content and return a structured result envelope for validation workflows.

Compiler diagnostics from CODESYS

When the authoritative CODESYS build is required, the runtime collects the vendor compiler messages and returns them through the 2ot workflow. For a faster iteration loop before that build, use the compiler-only diagnostic path with 2ot check --fast.