Chapter 8. Structured Text (ST) Programming
GFK-2950C February 2018 367
8.1.4 Structured Text Syntax
The syntax of the ST implementation for PACSystems follows the IEC 61131-3 standard.
â–ª Structured Text statements must end in a semi-colon (;).
â–ª Structured Text variables must be declared in the variable list for the target.
These symbols have the following functions.
:= assigns an expression to a variable
; required to designate the end of a statement
[ ] used for array indexing where the array index is an integer. For example, this sets the third
element of an array to the value j+10: intarray[3]: = j + 10;
(* *) designates a comment. These comments can span multiple lines. For example, (*This
comment spans
multiple lines.*)
// or ‘ designates a single line comment. For example,
c :=a+b; //This is a single line comment.
C :=a+b; ‘This is a single line comment.