Expressing Methods Of Constants - Mitsubishi Electric MELSEC Q Series Structured Programming Manual

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

Advertisement

4.3.6

Expressing methods of constants

The following table shows the expressing method for setting a constant to a label.
Constant
type
Bool
Input FALSE or TRUE, or input 0 or 1.
Binary
Append '2#' in front of a binary number.
Octal
Append '8#' in front of an octal number.
Decimal
Directly input a decimal number, or append 'K' in front of a decimal number.
Append '16#' or 'H' in front of a hexadecimal number.
Hexadecimal
When a lowercase letter 'h' is appended, it is converted to uppercase automatically.
Real number
Directly input a real number, or append 'E' in front of a real number.
Character
Enclose a character string with single quotations (') or double quotations (").
string
Time
Append 'T#' in front.
4.3 Labels
4-20
4.3.6 Expressing methods of constants
Table 4.3.6-1 Constant expressing method
Expressing method
Example
TRUE, FALSE
2#0010, 2#01101010
8#0, 8#337
123, K123
16#FF, HFF
2.34, E2.34
'ABC', "ABC"
T#1h,
T#1d2h3m4s5ms

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l seriesMelsec-f

Table of Contents