EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Page 282

Mitsubishi Electric MELSEC-Q/L
1084 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
Loading...
280
6 BASIC INSTRUCTIONS
6.3 Data Conversion Instructions
Operation error
In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Program example
The following program converts the 64-bit floating decimal point type real number at D20 to D23 with BIN 16-bit data, and
stores the result at D0.
The following program converts the 64-bit floating decimal point type real number at D20 to D23 with BIN 32-bit data and
stores the result at D0 and D1.
Error
code
Error details Q00J/
Q00/Q01
QnH QnPH QnPRH QnU LCPU
4140 (S) is -0, a subnormal number, NaN (not a number), , or a
value outside the following ranges.
0, 2
-1022
|(S)| < 2
1024

4100 The 64-bit floating point data specified by (S) when the INTD
instruction is used is outside the -32768 to 32767 range.

The 64-bit floating point data specified by (S) when the DINTD
instruction is used is outside the -2147483648 to 2147483647
range.

[Ladder Mode] [List Mode]
[Operation]
[Ladder Mode] [List Mode]
[Operation]
Step
Instruction
Device
Conversion to integer
BIN value
D0
25916
Conversion to integer
An operation error occurs because the specified data is larger than -32768.
D21
25915.6796
D20D23 D22
D21
33562.3211
D20D23 D22
64-bit floating-point real number
64-bit floating-point real number
Step
Instruction
Device
D1
574968
D0
D21
574968.321
D20D23 D22
D21
2147483649.22
D20D23 D22
Conversion to integer
BIN value
Conversion to integer
An operation error occurs because the
specified data is larger than 2147483647.
64-bit floating-point real number
64-bit floating-point real number

Table of Contents

Related product manuals