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,
comment spans
// 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.
GFK-2950C
multiple lines.*)
February 2018
Chapter 8. Structured Text (ST) Programming
(*This
367