Operators In St Language - Mitsubishi Electric MELSEC Q Series Structured Programming Manual

Fundamentals
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

5.1.2

Operators in ST language

The following table shows the operators used in the ST program and their priorities.
Operator
( )
Parenthesized expression
Function ( )
Function (Parameter list)
**
Exponentiation
NOT
Logical negation
*
Multiplication
/
Division
MOD
Modulus operation
+
Addition
-
Subtraction
<, >, <=, =>
Comparison
=
Equality
<>
Inequality
AND, &
Logical AND
XOR
Exclusive OR
OR
Logical OR
If a syntax includes multiple operators with a same priority, the operation is performed from the
leftmost operator.
The following table shows the operators, applicable data types, and operation result data types.
Operator
*, /, +, -
<, >, <=, >=, =, <>
MOD
AND, &, XOR, OR, NOT
**
Table 5.1.2-1 Operators in the ST language
Description
(1+2)*(3+4)
ADD_E(bo01, in01, in02, in03)
re01:= 2.0 ** 4.4
NOT bo01
3 * 4
12 / 3
13 MOD 3
in01 + in02
in01 - in02
in01 < in02
in01 = in02
in01 <> in02
bo01 & bo02
bo01 XOR bo02
bo01 OR bo02
Table 5.1.2-2 Data types used in operators
Applicable data type
ANY_NUM
ANY_SIMPLE
ANY_INT
ANY_BIT
ANY_REAL (Base)
ANY_NUM (Exponent)
Example
Operation result data type
ANY_NUM
Bit
ANY_INT
ANY_BIT
ANY_REAL
5.1 ST
5.1.2 Operators in ST language
Priority
Highest
Lowest
5
5-3

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l seriesMelsec-f

Table of Contents