Chapter 25 Constants; Decimal Constant (K); Hexadecimal Constant (H) - Mitsubishi Electric MELSEC iQ-R-R00CPU User Manual

Melsec iq-r series cpu module application user's manual
Table of Contents

Advertisement

25
CONSTANTS
This section describes constants.
25.1

Decimal Constant (K)

Use this type of constants when specifying decimal data in a program. Specify the decimal constant using K character (e.g.
K1234). The specification range depends on the argument data type of the instruction using the decimal constant as shown in
the following table:
Argument data type of the instruction
Data size
Data type name
16 bit
Word (signed)
Word (unsigned)/bit string (16 bit)
16-bit data
32 bit
Double word (signed)
Double word (unsigned)/bit string (32 bit)
32-bit data
25.2

Hexadecimal Constant (H)

Use this type of constants when specifying hexadecimal data in a program. Specify the hexadecimal constant using H
character (e.g. H1234). To specify data in BCD, specify each digit of hexadecimal value with numerical characters 0 to 9. The
specification range depends on the argument data type of the instruction using the hexadecimal constant. The range is H0 to
HFFFF for 16-bit data size, and H0 to HFFFFFFFF for 32-bit data size.
Specification range for decimal constant
K-32768 to K32767
K0 to K65535
K-32768 to K65535
K-2147483648 to K2147483647
K0 to K4294967295
K-2147483648 to K4294967295
25 CONSTANTS
25.1 Decimal Constant (K)
25
401

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents