XG5000 Programming in Structured Text (ST)
Summary of Structured Text (ST) Language
Structured Text (ST) is one of the textual languages defined in the standard IEC61131-3. The Structured Text programs look very similar to programs written with C, JAVA, and Python.
D := B * B - 4 * A * C;
IF D < 0.0 THEN
NROOTS := 0;
ELSIF D = 0.0 THEN
NROOTS := 1;
X1 := - B / (2.0 * A);
ELSE
NROOTS := 2;
X1 := (- B + SQRT(D)) / (2.0 * A);
X2 := (- B - SQRT(D)) / (2.0 * A);
END_IF;
You can use Structured Text to program the following in the XG5000 software:
-
Main Task
-
Periodic Task
-
Initialization Task
-
Within the Sequential Function Chart (SFC) program to describe the Action and Transition programs.
-
User function
-
User function block
Structured Text Expressions and Operators
LM113