Skip to main content
Search

Programming in Structured Text (ST)

Principle

The "Structured Text" and "Extended Structured Text" programming languages are programmed in the ST editor. The program code consists of a combination of expressions and statements, which can also be executed conditionally or in loops. You must conclude each statement 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. Click Project → Add Object → POU.

    The Add POU dialog opens.

  3. Specify a name and select the Implementation language Structured Text (ST).

    Click 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.