IMDHMIControls LibraryShop main store

Explainer

Why the AS228T uses DIADesigner, not CODESYS, for ST

PLC programming Published 7 min read By IMDHMI controls team

Short answer

CODESYS has no device target for the Delta AS228T, so it cannot compile or download a project for it. The controller still programs in Structured Text, in DIADesigner or ISPSoft, and the Delta controllers CODESYS does target are in the AX series. IEC 61131-3 standardizes the language, not the toolchain, so decide language support and device-target support as two separate questions.

On this page
  1. Can CODESYS program the Delta AS228T?
  2. Does the AS228T support Structured Text at all?
  3. Why does IEC 61131-3 support not make the AS228T CODESYS-compatible?
  4. Which Delta controllers can CODESYS program?
  5. How do you start a Structured Text project in DIADesigner?
  6. Can you reuse Structured Text from a CODESYS project?
  7. What do you check when the ported ST fails?
  8. Questions asked

CODESYS does not support the Delta AS228T, and Structured Text for this controller is written in Delta's own engineering tools. The AS228T is documented for ST projects in DIADesigner or ISPSoft, while the Delta controllers CODESYS can target are in the AX series. The mix-up comes from reading an IEC 61131-3 language claim as toolchain compatibility, and the standard does not promise that: it fixes the syntax and semantics of the languages and leaves the engineering environment, device target and libraries to each vendor. This article decides the two compatibility questions separately, walks the DIADesigner path for an ST project, and shows with real numbers what survives when logic leaves a CODESYS project.

Can CODESYS program the Delta AS228T? #

No: CODESYS has no device target for the AS228T, so it cannot compile or download a project to it, and the Delta controllers documented as CODESYS-compatible are the AX-3 and AX-8 series.

A working CODESYS deployment needs five things for a given controller: a device description in the CODESYS device repository, a compiler back end for that target, a runtime on the controller that CODESYS can attach to, communication support for the link, and libraries built for that runtime. Shared ST syntax is not on that list. For the AS228T, the repository search comes back empty, and that single check ends the CODESYS attempt.

Do not pick a similar Delta entry to force a build: the device definition drives compilation, memory mapping, hardware configuration and download behavior, so a wrong target produces a project for a different machine. The division is laid out in a DIADesigner versus CODESYS compatibility guide for the AS228T, which reaches the same split: ST for this controller goes through Delta's engineering tools.

Does the AS228T support Structured Text at all? #

Yes: Structured Text is a documented language for this controller, and you create the ST program in DIADesigner or ISPSoft, so the language you want already runs on the hardware you have.

Delta documents ST projects for the AS228T in either environment, alongside the controller's other IEC languages such as ladder and SFC. The documentation that seems unclear is unclear about the tool, not about the language. If ST is the right choice for the task, the reasoning in which IEC 61131-3 PLC language to use for each control task applies unchanged once you are inside DIADesigner: arithmetic, loops, arrays and state machines written in code rather than contacts. The decision at this point is to proceed with ST, in Delta's tool, and to stop evaluating CODESYS for this model.

Why does IEC 61131-3 support not make the AS228T CODESYS-compatible? #

Because IEC 61131-3 standardizes languages, not tools: it specifies the syntax and semantics of ST, ladder, FBD and SFC and says nothing about device targets, project files, compiler back ends or libraries, which each vendor's engineering system defines for itself.

That is why two compatibility questions exist and are answered independently. Question one: does the controller execute ST programs? The AS228T does. Question two: does CODESYS hold a device target for the controller? It does not. A yes to the first never implies a yes to the second, and a datasheet line reading IEC 61131-3 tells you which languages exist, not which software you install.

Which Delta controllers can CODESYS program? #

The AX-3 and AX-8 series: those are the Delta controllers documented as CODESYS-compatible, so a project that must stay in the CODESYS toolchain belongs on an AX CPU, and the AS228T belongs on the DIADesigner side of the catalog.

If the force pulling you toward CODESYS is real, such as a shared function-block library or a code base already in that environment, the decision for a new machine is an AX CPU, and the tool question on that side is covered in which CODESYS tool programs Delta AX and where G-code runs. For an AS228T already wired into a cabinet, the answer is to port the logic, which the next sections cover.

How do you start a Structured Text project in DIADesigner? #

Create a new project in DIADesigner, select the AS228T as its device, add a program unit with Structured Text as the language, and compile a minimal assignment before any real application logic goes in.

  1. Create the project and choose the AS228T in the device selection; confirm the exact target name in the project configuration before adding logic.
  2. Add a program unit and pick Structured Text from the languages the selected target offers.
  3. Declare the variables and compile a minimal assignment; the scaling example in the next section is enough.
  4. Configure the connection from the interface and address settings the installed software shows for your link, and confirm the tool identifies the controller itself, not just a reachable endpoint.
  5. Read the controller's operating state online, and make the first download with the machine in a safe state, because the new project drives the same physical outputs as the old one.

If the AS228T is absent from the device list, the installed engineering package or its device support is incomplete or wrong: get DIADesigner and the device support through Delta's official distribution rather than a third-party copy, and never substitute a neighboring model to work around the gap.

Can you reuse Structured Text from a CODESYS project? #

Yes, the language-level logic transfers: expressions, assignments, conditions, loops and variable declarations recompile in DIADesigner unchanged, while library calls, device references and task configuration must be rebuilt for the Delta target.

A level calculation shows the boundary. Take a 12-bit analog input that delivers 0 to 4095 counts and a tank span of 0 to 2.0 m. The source below declares its own variables and initial values and compiles in either tool:

PROGRAM LevelScale
VAR
    RawCounts : INT := 2048;   (* example input: counts from a 12-bit channel *)
    Level_m   : REAL := 0.0;   (* result: tank level in meters *)
END_VAR

Level_m := INT_TO_REAL(RawCounts) * 2.0 / 4095.0;

With the example input of 2048 counts, the line evaluates as 2048 counts × 2.0 m ÷ 4095 counts = 4096 ÷ 4095 = 1.000244 m. The online test that proves the port: monitor the level variable and confirm 0 counts reads 0.0 m, 4095 counts reads 2.0 m, and 2048 counts reads 1.000244 m at REAL precision. The conversion INT_TO_REAL is the standard's own function and every operator is core ST, so this exact text gives the same result in CODESYS and in DIADesigner. That is the whole of what shared ST support transfers.

Everything around the text is rebuild material. Inventory the old project, meaning its program units, data types, global variables, libraries, hardware references, task configuration and retained data, and mark only the language-level logic as direct-transfer code. Then re-enter declarations and logic in stages, compiling after each stage, and chase the first diagnostic, because later errors usually cascade from one failed declaration or one unresolved function block.

Area Check in the DIADesigner project Proof
Variables and types declaration syntax, scope, initial values, supported types no declaration errors
Function and block calls names, parameter order, types, library availability every call resolves to a declared implementation
I/O references binding of symbolic variables to configured hardware channels each field signal maps to its intended channel
Execution assignment of the program to the execution configuration the ST program is scheduled and runs
Retained state retention attributes the destination project supports values survive the tested state change

What do you check when the ported ST fails? #

Chase the faults in a fixed order: missing target, missing language, compile diagnostics, dead I/O, download failure, then changed behavior, because each stage has one family of causes and fixing them out of order burns online time.

  • The AS228T is missing from the device list: the engineering package or its device support is wrong, so fix the installation and keep the correct model.
  • Structured Text is missing from the language choices: the project was created for the wrong controller or for a project type with a different language set, so recreate it for the correct target.
  • The source will not compile: read the first diagnostic, replace tool-specific calls with functions the DIADesigner project actually offers, and recompile before touching the next section.
  • It compiles but the I/O does not respond: compilation validates program text, not wiring or channel mapping, so inspect the hardware configuration, the symbolic bindings and the execution assignment.
  • The download will not start: resolve the physical interface, address selection, reachability and controller state before questioning valid logic.
  • It downloads but behaves differently: monitor inputs, intermediate states, output commands, timers and block instances scan by scan against the intended sequence instead of assuming equivalent library behavior.

The decision, case by case. Keeping the AS228T: write the ST in DIADesigner or ISPSoft, and treat every CODESYS-specific element of an old project as rebuild material. Porting an existing CODESYS application: transfer the logic, rebuild libraries, bindings and task setup in stages, and prove each stage with an online test before the machine runs on it. Needing the CODESYS toolchain itself: specify an AX CPU for the new machine and keep one environment across the fleet.

Questions asked

Does choosing ISPSoft instead of DIADesigner change the CODESYS answer?

No. Both are Delta engineering environments that document ST for this controller, and neither turns it into a CODESYS target. Choose whichever your plant already standardizes on, so existing projects, backups and spare engineering stations stay readable by the same tool, and keep one environment per controller family to avoid maintaining two sets of libraries and device support.

Can you paste ST source text from CODESYS straight into DIADesigner?

Yes, as source. ST is plain text, so declarations, expressions and assignments copy across and recompile, which is faster than retyping. What arrives broken is everything that referenced the old project's libraries, device objects or compiler directives: those names have no implementation behind them in the new project, and the first compile diagnostic lists exactly which calls you must replace or rebuild.

When is replacing the AS228T with an AX controller the right decision?

Only for a new machine or a major retrofit whose code base must live in the CODESYS toolchain, for example to share function-block libraries with the rest of the plant. Then an AX-3 or AX-8 CPU keeps one environment across the fleet. For a single AS228T already wired and running, porting the ST into DIADesigner is the smaller job: the language transfers and only the tool-specific parts need rebuilding.

Does the answer change if the program is ladder or SFC instead of ST?

No. The toolchain question is independent of the language: ladder and SFC for this controller also go through Delta's engineering environment, because what the AS228T lacks is a CODESYS device target, not individual languages. Switching language never opens a CODESYS path to this hardware, so write ladder and SFC in DIADesigner or ISPSoft as well.

Keep reading

  • Troubleshooting

    When a CODESYS TON works in structured text but not ladder

    The structured text routine counts because its four statements run in sequence inside one scan; the ladder version fails when the reset network clears Timer.Q before the addition samples it, or an unconditional reset restarts the timer every cycle. Put the call, the Q test, the addition and the reset of the same TON instance in one ladder network, left to right in that order, and it counts exactly one B per interval.

    PLC programming

  • Troubleshooting

    Why GX Works 2 ST pulse timer TP fails with error C9009

    Error C9009 on a structured text TP pulse timer in GX Works 2 is a compile-stage failure in device/label automatic assignment, not a broken timer. Test the unchanged FX3S project in GX Works 2 1.620W first: the same code that fails in 1.586L compiles there, so the installed build is the first suspect. Widen the automatic-assign timer range only when counted label consumption proves a real shortage.

    PLC programming

  • Explainer

    How a REPEAT loop runs in PLC structured text

    In IEC 61131-3 structured text, a REPEAT loop executes its body first and evaluates the UNTIL condition after it, so the body always runs at least once and the whole loop completes inside one task invocation. With i := 0 and UNTIL i >= 10, the body runs 10 times and i ends at exactly 10; the test position is what explains the off-by-one cases and when WHILE fits better.

    PLC programming