Mitsubishi MELSEC QCPU Programming Manual page 215

Programmable logic controller
Table of Contents

Advertisement

6 BASIC INSTRUCTIONS
(2) The range of floating decimal point type real numbers that can be designated at
from -2147483648 to 2147483647.
(3) The integer value stored at
(4) After conversion, the first digit after the decimal point of the real number is rounded off.
[Operation Errors]
(1) In the following cases an operation error occurs, the error flag (SM0) turns ON, and an error
code is stored at SD0.
• The floating decimal point type data designated by
outside the -31768 to 32767 range.
• The floating decimal point type data designated by
was outside the -2147483648 to 2147483647 range.
[Program Example]
(1) The following program converts the floating decimal point type real number at D20 and D21 to
BIN 16-bit data, and stores the result at D0.
[Ladder Mode]
Floating decimal point type real number
Floating decimal point type real number
(2) The following program converts the floating decimal point type real number at D20 and D21 to
BIN 32-bit data and stores the result at D0 and D1.
[Ladder Mode]
Floating decimal point type real number
Floating decimal point type real number
6 - 64
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
+1 and
D
Integer
D21
D20
conversion
25915.6796
Integer
D21
D20
conversion
-33562.3211
Integer
D21
D20
conversion
-574968.321
Integer
D21
D20
conversion
2147483649.22
is stored as BIN 32 bits.
D
when the INT instruction was used was
S
when the DINT instruction was used
S
[List Mode]
Instruction
Steps
D0
25916
BIN value
Because the set data is less than -32768,
an operation error is returned
[List Mode]
Steps
Instruction
D1
D0
-574968
BIN value
Because the set data is larger than
2147483647, an operation error is returned.
MELSEC-Q/QnA
+1 or
is
S
S
Device
Device
6 - 64

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec qnacpuMelsec q modeMelsec q series

Table of Contents