EasyManuals Logo

Mitsubishi MELSEC QCPU User Manual

Mitsubishi MELSEC QCPU
285 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
Page #215 background imageLoading...
Page #215 background image
6 - 64 6 - 64
MELSEC-Q/QnA
6 BASIC INSTRUCTIONS
(2) The range of floating decimal point type real numbers that can be designated at
S
+1 or
S
is
from -2147483648 to 2147483647.
(3) The integer value stored at
D
+1 and
D
is stored as BIN 32 bits.
(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
S
when the INT instruction was used was
outside the -31768 to 32767 range.
• The floating decimal point type data designated by
S
when the DINT instruction was used
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] [List Mode]
Steps
Instruction
Device
Integer
conversion
BIN value
D0
25916
Integer
conversion
Because the set data is less than -32768,
an operation error is returned
Floating decimal point type real number
D21
-33562.3211
D20
Floating decimal point type real number
D21
25915.6796
D20
(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] [List Mode]
Steps
Instruction
Device
Integer
conversion
Because the set data is larger than
2147483647, an operation error is returned.
Floating decimal point type real number
D21
2147483649.22
D20
Floating decimal point type real number
D21
-574968.321
D20
BIN value
D1
-574968
D0
Integer
conversion
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC QCPU and is the answer not in the manual?

Mitsubishi MELSEC QCPU Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC QCPU
CategoryController
LanguageEnglish

Related product manuals