EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-R Series - Notation of Constants

Mitsubishi Electric MELSEC iQ-R Series
760 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
528
32 CONSTANTS
32.5 Notation of Constants
32.5 Notation of Constants
This section describes the notation of constants.
In the notation of binary, octal, decimal, hexadecimal, and real numbers, the numbers can be separated using
an underscore (_) to make programs easy to see. For example, the double word [unsigned] in the notation of
binary is as follows.
2#1100_1100_1100_1100
The separations by underscores (_) are ignored in program processing.
Type Notation Example Applicable data type
Boolean value Set "FALSE" or "TRUE". TRUE, FALSE Bit
Add "K" or "H" before "0" or "1". K0, K1, H0, H1
Integral Binary Add "2#" before a binary number. 2#0010, 2#01101010,
2#1111_1111
Word [unsigned]/bit string [16 bits]
Double word [unsigned]/bit string [32
bits]
Word [signed]
Double word [signed]
Octal Add "8#" before an octal number. 8#0, 8#337, 8#1_1
Decimal Directly enter a signed or unsigned decimal number. 123, +123, -123, 12_3
Add "K" before a signed or unsigned decimal number. K123, K-123
Hexadecimal Add "16#" before a hexadecimal number. 16#FF, 16#1_1
Add "H" before a hexadecimal number. HFF, HEAD
Real
number
Decimal
notation
Directly enter a signed or unsigned real decimal
number with a decimal point.
2.34, +2.34, -2.34,
3.14_15
Single-precision real number
Double-precision real number
Add "E" before a signed or unsigned real decimal
number with a decimal point.
E2.34, E-2.34
Exponential
notation
Add "E" and a signed or unsigned exponent (decimal)
at the end of the real number.
1.0E6, 1.0E-6
Add a signed exponent (decimal) at the end of the real
number with "E".
E1.001+5, E1.001-6
String String Enclose a string in single quotation marks (' '). 'ABC' String
String
[Unicode]
Enclose a string in double quotation marks (" "). "ABC" String [Unicode]
Time Add "T#" or "TIME#" at the beginning. ( Page 529
Notation of time)
T#1h,
T#1d2h3m4s5ms,
TIME#1h
Time

Table of Contents

Other manuals for Mitsubishi Electric MELSEC iQ-R Series

Related product manuals