Structured Text (ST) Programming Language

Structured Text (ST) is a text-based, high-level programming language defined in the IEC 61131-3 standard.

It is designed for writing complex algorithms and control flows, similar to traditional programming languages.

Key Features:

  • Supports conditional statements like: IF…THEN…ELSE
  • Supports looping constructs: WHILE…DO, FOR…TO

Expressions – An expression returns a value after evaluation

Composed of:

  • Operators (e.g., +, -, AND, OR)
  • Operands (constants, variables, function calls, or other expressions)

Expression Evaluation:

  • Follows operator binding rules:
    • Operators with higher precedence are evaluated first
    • Operators with the same precedence are evaluated left to right