ST limits and unsupported features

ST is bounded so a loop cannot hold the scan forever. Use small, finite loops for work that belongs in one scan.

Execution limits

  • Each loop may run at most 10,000 iterations per entry. Entering it again starts a new loop-entry count.
  • A routine may use at most 100,000 statement/iteration steps per scan, shared across all calls to that routine during the scan. Loop iterations also consume this budget, even for an empty body.

Trying to exceed either limit records a fault on the loop or statement and stops that routine for the rest of the scan. Writes already completed are kept. It does not undo the scan or stop the whole controller. The next scan gets a new budget; fix the cause rather than relying on the limit as normal control flow.

Tags to create: Count — DINT; Index — DINT.
Count := 0;
FOR Index := 1 TO 3 DO
  Count := Count + Index;
END_FOR;

Not available in ST yet

  • Arrays and indexed access.
  • Strings and string literals.
  • User-defined type (UDT) tags and their members.
  • VAR sections and declarations inside source text: create project tags instead.
  • User functions and function blocks: use the built-in calls.
  • The ** power operator.
  • Bit access by number, such as a word’s numbered bit.
  • Jumps and labels.

The editor names these unsupported constructs when typed; Build reports them as errors. A type or instruction available in another language is not automatically available in ST.

Related