4 - 2 4 - 2
4 ST PROGRAM EXPRESSIONS
4.2 Operators
This section gives a list of operators usable in ST programs and their examples of use.
4.2.1 Operator list
The following table lists the operators used in ST programs and indicates the priorities
at the time of operation execution.
Operator Description
Priority
( )
Parenthesis expression
Highest
Function ( )
Function parameter list
** Exponent
(exponentiation)
tei**shisuu
NOT
Boolean complement
(Bit inverted value)
*
/
MOD
Multiplication
Division
Modulus operation
+
-
Addition
Subtraction
<, >, <=, >=
Comparison
=
<>
Equality
Inequality
AND, &
Logical product
XOR
Exclusive logical add
OR Logical
sum
Lowest
When the priorities are the same, evaluation is made from the left-hand side to the
right-hand side operators.
The following table lists the operators, applicable data types and operation result data
types.
Operator
Applicable Data Type
Operation Result Data Type
*, /, +, -
ANY_NUM ANY_NUM
<, >, <=, >=, =, <>
ANY_SIMPLE BOOL
MOD
ANY_INT ANY_INT
AND, &, XOR, OR, NOT
ANY_BIT
*1
ANY_BIT
*1
**
ANY_ REAL (base)
ANY_NUM (exponent)
ANY_ REAL
*1: Except the label and constant (negative range).
4
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......