Structured Text (St) - SMB MAT-LC-C Series User Manual

Plc based motion controller
Table of Contents

Advertisement

Here Erg is 7, but if you add a parenthesis:
LD 2
MUL (2
ADD 3
)
ST Erg
The result of Erg is 10, and the operation MUL starts to calculate when ")" is reached; at this time,
the operand 5 calculates the MUL.
6.2.2

Structured Text (ST)

Structured text contains a series of instructions written in a high-level language that can be
executed (eg IF...THEN...ELSE) or in a loop (WHILE...DO).
Expression
An expression is a structure that returns a value after an operation. Expressions consist of
operators and operands, which can be constants, variables, function calls, or other expressions.
Evaluating expressions
The value of the expression is calculated by processing the operands according to certain rules,
with the most binding operators participating first, followed by the slightly more binding operators,
until all operators have been processed. Operation symbols of the same binding force are
processed in left-to-right order.
The following is a hierarchical arrangement of operator symbol constraints in structured text:
Action
Put in parentheses
Function call
Exponentiation
Negate number
Multiplication
Division
Modulo
Addition
Subtraction
Compare
Equal
Not equal
Boolean
"and"
Boolean
"XOR"
Boolean
"XOR"
The following are other instructions in structured text, arranged in a table with the example.
(expression)
Function name (parameter list)
EXPT
-
*
/
MOD
+
-
<,>,<=,>=
=
<>
operation
AND
operation
XOR
operation
OR the weakest binding
Symbol
56
Binding
The strongest binding force

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MAT-LC-C Series and is the answer not in the manual?

This manual is also suitable for:

Mat-lc-c0 seriesMat-lc-c06Mat-lc-c07

Table of Contents