AiVibe

PLC & Industrial Control

Structured Text (ST)

Structured text is a high-level textual programming language defined in IEC 61131-3, with a syntax resembling Pascal, used in PLCs for calculations, data handling, loops and algorithms that are awkward to express graphically.

ST programs consist of assignments and IF, CASE, FOR, WHILE and REPEAT statements operating on typed variables, arrays and structures. Expressions use familiar arithmetic, comparison and Boolean operators, and code can call standard and user-defined functions and function blocks. Its Pascal-like syntax makes it approachable for engineers with a software background.

Structured text is used for recipe management, unit conversion, string processing, communication handling, state machines and mathematical routines such as filters or custom control algorithms. Many teams write reusable function blocks in ST and call them from ladder or FBD programs, combining compact code with graphical readability for maintenance staff.

Because ST runs within the same task scheduling as the other IEC 61131-3 languages, it is subject to the same timing constraints: long or unbounded loops can exceed the cycle time and trigger a watchdog fault. Online monitoring of textual code is less visual than ladder power flow, so clear naming, comments and version control matter. The third edition of IEC 61131-3 added object-oriented features such as classes, methods and interfaces, which vendors implement to different degrees.

Key points

Where AiVibe comes in

AiVibe designs and manufactures the AiAmbA AI Factory, whose edge devices and AI agents let people talk to PLC, CNC and robot controllers in plain language. Agents only propose changes, a trained operator confirms each one, and the AI Factory never replaces a machine's control or safety systems.

Explore AiVibe’s work in PLC & Industrial Control →

Related terms

Terms that refer to Structured Text (ST)

Ask AiMuruga can explain Structured Text (ST) for your plant, product or security programme, and draw how it fits.