Operators; Operator List - Mitsubishi Electric MELSEC Q Series Programming Manual

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

Advertisement

4 ST PROGRAM EXPRESSIONS

4.2 Operators

4.2.1 Operator list

4
4 - 2
This section gives a list of operators usable in ST programs and their examples of use.
The following table lists the operators used in ST programs and indicates the priorities
at the time of operation execution.
Operator
( )
Parenthesis expression
Function ( )
Function parameter list
**
Exponent (exponentiation) tei**shisuu
Boolean complement
NOT
(Bit inverted value)
*
Multiplication
/
Division
MOD
Modulus operation
+
Addition
-
Subtraction
<, >, <=, >=
Comparison
=
Equality
<>
Inequality
AND, &
Logical product
XOR
Exclusive logical add
OR
Logical sum
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
*, /, +, -
<, >, <=, >=, =, <>
MOD
AND, &, XOR, OR, NOT
**
*1: Except the label and constant (negative range).
Description
Applicable Data Type
ANY_NUM
ANY_SIMPLE
ANY_INT
*1
ANY_BIT
ANY_ REAL (base)
ANY_NUM (exponent)
Priority
Highest
Lowest
Operation Result Data Type
ANY_NUM
BOOL
ANY_INT
*1
ANY_BIT
ANY_ REAL
4 - 2

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents