Mitsubishi Electric M800VW Series Programming Manual page 250

Plc programming
Hide thumbs Also See for M800VW Series:
Table of Contents

Advertisement

M800V/M80V Series PLC Programming Manual (1/2)
8 Function Instructions
8.3 Data Conversion Instructions
ECON, ECONP: Conversion from single precision to double precision
Setting
Bit devices
data
X
Y
M
L
F
S
D
[Instruction symbol] [Execution condition]
ECON
ECONP
 Setting data
Setting data
Data to be converted, or the first number of the device where data to be converted
S
is stored.
The first number of the device that will store the converted data.
D
 Functions
ECON
 Converts the 32-bit floating-point real number designated by (S) to a 64-bit floating-point real number, and stores the result
of the conversion at the device designated by (D).
S+1
S
32-bit floating-point real
number
 When setting input values from programming tools, rounding errors may occur.
For precautions when setting input values from programming tools, refer to "6.3.4 Single/Double-Precision Real Number
Data".
 Operation errors
 In the following cases, an arithmetic error occurs, the error flag (SM0) turns ON, and an error code is stored at SD0.
- The value of (S) is "-0", unnormalized number, nonnumeric, ± ∞ , or is outside the following range. (Error code: 35)
-126
128
0, 2
≤ | S | < 2
 Program example
 The following program converts the 32-bit floating-point real number at D10 to D11 to a 64-bit floating-point real number
when X0 turns ON, and stores the result of the conversion at D0 to D3.
[Ladder mode]
X0
0
ECON D10 D0
4
Usable devices
B SB
T SM V
T
C
Command
Command
Meaning
D+3
D+2
D+1
D
64-bit floating-point real
number
END
Con-
Word devices
stant
D
R/ZR W SW SD
Z
[List mode]
Steps
Inst.
0
LD
1
ECON
4
END
229
Digit
Pointer
designa-
Index
tion
E
P
indicates the sign "ECON".
S
D
P
S
D
Data type
Single precision real
number
Double precision real
number
Device
X0
D10
D0
IB-1501667-B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents