Programming Structured Text (ST)

Principle

The programming languages ‘Structured Text’ and ‘Extended Structured Text’ are programmed in the ST editor. The program code consists of a combination of expressions and instructions, which can also be executed conditionally or in loops. You must conclude each instruction with a semicolon ;.

The variables are declared in the declaration editor.

Creating a POU in the Structured Text (ST) implementation language

  1. Select an application in the device tree.

  2. Select the command Project ‣ Add object ‣ POU .

    ⇒ The dialog box Add POU opens.

  3. Enter a name and select the Implementation languageStructured Text (ST). Click on Add.

    ⇒ The POU is added to the device tree and opened in the editor.

    Now insert the variable declarations in the upper part of the POU and enter the ST program code in the lower part of the POU.

See also