Mitsubishi Electric M800VW Series Programming Manual page 214

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-
 Subtracts the 32-bit floating-point real number designated by (S) from the 32-bit floating-point real number designated by
(D) and stores the result of the subtraction at the device designated by (D).
D+1
D1
32-bit floating-point real
number
 The following values can be designated and stored by S 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 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 adds the 32-bit floating-point real number at D3 and D4 to the 32-bit floating-point real number at
D10 and D11 when X20 turns ON, and stores the result of the addition at D3 and D4.
[Ladder mode]
X20
0
4
D4
5961.437
 The following program subtracts the 32-bit floating-point real number data at (D10) and (D11) from the 32-bit floating-point
real number data at (D20) and (D21), and stores the result of the subtraction at (D20) and (D21).
[Ladder mode]
SM400
0
4
D21
97365.203
S+1
S
-
32-bit floating-point real
number
128
128
E+P
D10 D3
END
[Operation]
D3
D11
D10
12003.200
+
E-P D10 D20
END
[Operation]
D20
D11
D10
76059.797
-
D+1
D
32-bit floating-point real
number
[List mode]
Steps
Inst.
Device
0
LD
X20
1
E+P
D10
D3
4
END
D4
D3
17964.637
[List mode]
Steps
Inst.
Device
0
LD
SM400
1
E-P
D10
D20
4
END
D21
D20
21305.406
193
IB-1501667-B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents