EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Page 280

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...
278
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 32-bit floating decimal point type real number at D20 and D21 to BIN 16-bit data, and
stores the result at D0.
The following program converts the 32-bit floating decimal point type real number at D20 and D21 to 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 The specified device value is not within the following range:
0, 2
-126
| Specified device value | < 2
128
The specified device value is -0, unnormalized number,
nonnumeric, and .

4100 The 32-bit floating point data specified by (S) when the INT
instruction is used is outside the -32768 to 32767 range.

The 32-bit floating point data specified by (S) when the DINT
instruction is used is outside the -2147483648 to 2147483647
range.

[Ladder Mode] [List Mode]
[Operation]
[Ladder Mode] [List Mode]
[Operation]
Step
Instruction
Device
Integer
conversion
BIN value
D0
25916
Integer
conversion
An operation error occurs
since "setting data < -32768."
32-bit floating-point
real number
D21
-33562.3211
D20
32-bit floating-point
real number
D21
25915.6796
D20
Step
Instruction
Device
Integer
conversion
Integer
conversion
An operation error occurs
since "setting data > 2147483647."
32-bit floating-point
real number
D21
2147483649.22
D20
32-bit floating-point
real number
D21
-574968.321
D20
BIN value
D1
-574968
D0

Table of Contents

Related product manuals