Chapter 6 Constants; Decimal Constant (K); Hexadecimal Constant (H) - Mitsubishi Electric L02SCPU User's Manual And Reference

Melsec-l series, cpu module
Table of Contents

Advertisement

CHAPTER 6
The following constants can be used in the CPU module.

• Decimal constant (K)

• Hexadecimal constant (H)

• Real number (E)
• Character string (" ")
6.1
Decimal Constant (K)
The decimal constant (K) is a device used to specify decimal data in programs. Specify it as K (example: K1234) in
programs. In the CPU module, data are stored in binary (BIN). ( Page 389, Appendix 4)
The specification ranges for decimal constants are as follows:
The most significant bit represents a sign bit.
• When using word data (16-bit data): K-32768 to K32767
• When using 2-word data (32-bit data): K-2147483648 to K2147483647
6.2
Hexadecimal Constant (H)
The hexadecimal constant (H) is a device used to specify hexadecimal or BCD data in programs. (For BCD data, each
digit of a hexadecimal number is specified with 0 to 9.) In programs, specify it as H (example: H1234). ( Page
389, Appendix 4)
The specification ranges for hexadecimal constants are as follows:
• When using word data (16-bit data): 0000
• When using 2-word data (32-bit data): 00000000
342
CONSTANTS
to FFFF
H
H
to FFFFFFFF
H
(For BCD data, 0000
to 9999
H
(For BCD data, 00000000
H
)
H
to 99999999
)
H
H

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents