Mitsubishi Electric MELSEC-Q/L Programming Manual page 282

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

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.
Error
Error details
code
(S) is -0, a subnormal number, NaN (not a number), , or a
4140
value outside the following ranges.
-1022
|(S)| < 2
0, 2
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.
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.
[Ladder Mode]
[Operation]
D23 D22
D21
D20
25915.6796
64-bit floating-point real number
D23 D22
D21
D20
33562.3211
64-bit floating-point real number
• 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.
[Ladder Mode]
[Operation]
D23 D22
D21
D20
574968.321
64-bit floating-point real number
D23 D22
D21
D20
2147483649.22
64-bit floating-point real number
6 BASIC INSTRUCTIONS
280
6.3 Data Conversion Instructions
1024
D0
Conversion to integer
25916
BIN value
Conversion to integer
An operation error occurs because the specified data is larger than -32768.
D1
Conversion to integer
BIN value
Conversion to integer
An operation error occurs because the
specified data is larger than 2147483647.
Q00J/
Q00/Q01
[List Mode]
Step
[List Mode]
Step
D0
574968
QnH
QnPH
QnPRH
Instruction
Device
Instruction
Device
QnU
LCPU

Advertisement

Table of Contents
loading

Table of Contents