Delimiter; Operator - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

Program design
Hide thumbs Also See for MELSEC iQ-F FX5:
Table of Contents

Advertisement

Delimiter

The following delimiters are provided in ST language for clarifying the program structure.
Symbol
()
[]
. (period)
, (comma)
: (colon)
; (semicolon)
' (single quotation mark)
.. (two periods)

Operator

The following shows the operators used in a ST program and the target data types and operation result data types for each
operator.
Operator
*, /, +, -
<, >,<=, >=, =, <>
MOD
AND, &, XOR, OR, NOT
**
The following table shows the priorities of the operators.
Operator
( )
Function ( )
**
-
NOT
*
/
MOD
+
-
<, >, <=, =>
=
<>
&, AND
XOR
OR
• If an expression includes multiple operators with the same priority, the operation is performed from the leftmost operator.
• Up to 1024 operators can be used in one statement.
Description
Parenthesized
Specification of an array element
Specification of members of the structure or function block
Separation of arguments
Device type specifier
End of a sentence
Description of a character string
Specification of an integer range
Target data type
ANY_NUM
ANY_SIMPLE
ANY_INT
ANY_BIT
ANY_REAL (Base)
ANY_NUM (Exponent)
Description
Parenthesized expression
Argument of a function
Exponentiation
Inversion of sign
Bit type complement
Multiplication
Division
Modulus operation
Addition
Subtraction
Comparison
Equality
Inequality
Logical AND
Exclusive OR
Logical OR
Operation result type
ANY_NUM
Bit
ANY_INT
ANY_BIT
ANY_REAL
Example
(2+3)*(4+5)
CONCAR('AB','CD')
3.0**4
-10
NOT TRUE
10 * 20
20 / 10
17 MOD 10
1.4 + 2.5
3 - 2
10 > 20
T#26h = T#1d2h
8#15 <> 13
TRUE AND FALSE
TRUE XOR FALSE
TRUE OR FALSE
6
Priority
1
2
3
4
5
6
7
8
9
10
11
6 ST LANGUAGE
39
6.1 Configuration

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents