Mitsubishi Electric M800VW Series Programming Manual page 221

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.2 Arithmetic Operation Instructions
E/
 Divides the 32-bit floating-point real number designated by (S1) by the 32-bit floating-point real number designated by (S2)
and stores the result of the division at the device designated by (D).
S1+1
S1
32-bit floating-point real
number
 The following values can be designated and stored by (S1), (S2), or (D).
-126
0, 2
≤ | Designated value (stored value) | < 2
 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 divisor (S2) is "0". (Error code: 34)
- The operation result exceeds the following range. (When an overflow occurs) (Error code: 36)
| Operation result | < 2
- The designated device value is "-0", unnormalized number, nonnumeric, or ± ∞ . (Error code: 35)
 Program example
 The following program multiplies the 32-bit floating-point real number data at D3 and D4 by the 32-bit floating-point real
number data at D10 and D11 when X20 turns ON, and stores the result of the multiplication at R0 and R1.
[Ladder mode]
X20
0
5
D4
36.7896
 The following program divides the 32-bit floating-point real number data at (D10) and (D11) by the 32-bit floating-point real
number data at (D20) and (D21), and stores the result of the division at (D30) and (D31).
[Ladder mode]
SM400
0
5
D11
52171.39
IB-1501667-B
S2+1
S2
/
32-bit floating-point real
number
128
128
E*P D3 D10 R0
END
[Operation]
D3
D11
D10
11.9278
×
E/P D10 D20 D30
END
[Operation]
D10
D21
D20
9.73521
/
D+1
D
32-bit floating-point real
number
[List mode]
Steps
Inst.
0
LD
1
E*P
5
END
R1
R0
438.8190
[List mode]
Steps
Inst.
0
LD
1
E/P
5
END
D31
D30
5359.041
200
Device
X20
D3
D10
R0
Device
SM400
D10
D20
D30

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents