Overview - ST

 

ST(Structured Text) language is one of the PLC (Programmable Logic Controller) languages that are defined by IEC61131-3.

It is an advanced language derived from the language called Pascal, and it supports operators, control syntaxes and functions. The language also supports the features as shown below.

Control syntaxes such as conditional sentence-dependent selective branch and repetitive sentence-based repetition
Expressions using operators (+, -, *, /, <, >, =, etc.)
Call of functions (PLC instructions)
Description of comments

The characters available in ST programs are as shown below.

Types

Detail

Alphanumeric

A, B, C, ... Z, a, b, c, ... z, 0, 1, 2, ... 9

Symbols

+ - * / = < > [ ] ( ) . , _ : ; $ # " ' { }

Etc

All ASCII control characters (ASCII: 0 ~ 31)

 

 

Followings are the reserved words used in ST program.

Reserved Words

IF, THEN, ELSIF, ELSE, END_IF,

CASE, OF, END_CASE,

FOR, TO, BY, DO, END_FOR,

REPEAT, UNTIL, END_REPEAT,

WHILE, END_WHILE,

EXIT, RETURN,

Names of PLC instructions, PLC Device

 

  • Reserved words cannot be used as a program’s name or a variable.