EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Conversion from Single Precision to Double Precision

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...
6 BASIC INSTRUCTIONS
6.3 Data Conversion Instructions
295
6
Conversion from single precision to double precision
ECON(P)
Processing details
Converts 32-bit floating-point real number specified for (S) into 64-bit floating-point real number, and stores the conversion
result to the device specified for (D).
When an input value is set using a programming tool, a rounding error may occur. For precautions, refer to Page 89
Precautions.
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 program which converts 32-bit floating-point real number of the devices, D10 to D11, into 64-bit floating-point real
number when X0 turns ON, and outputs the conversion result to the devices, D0 to D3.
(S): Conversion source data, or head number of the device where conversion source data is stored (Real number (single precision))
(D): Head number of the device where the converted data is stored (Real number (double precision))
Setting
data
Internal device R, ZR J\ U\G Zn Constant
E
Others
Bit Word Bit Word
(S) 
(D) 
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
-126
|(S)| < 2
128

[Ladder Mode] [List Mode]
Universal
LCPU
Basic
High
performance
Process
Redundant
ECON
ECONP
S
D
S D
ECON
ECONP
Command
Command
+1
S S
32-bit floating-point real number
+3 +2
+1
DDD
D
64-bit floating-point real number
Step
Instruction
Device

Table of Contents

Related product manuals