Mitsubishi Electric M800VW Series Programming Manual page 212

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 data designated by (S2) from the 32-bit floating-point real number data des-
ignated by (S1) and stores the result of the subtraction 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 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 R0 and R1.
[Ladder mode]
X20
0
5
D4
5961.437
 The following program subtracts the 32-bit floating-point real number at D20 and D21 from the 32-bit floating-point real
number at D10 and D11, and stores the result of the subtraction at D30 and D31.
[Ladder mode]
SM400
0
5
D11
97365.203
S2+1
S
2
-
32-bit floating-point real
number
128
128
E+P
D3 D10
R0
END
[Operation]
D3
D11
D10
12003.200
+
E-P
D10 D20 D30
END
[Operation]
D10
D21
D20
76059.797
+
D+1
D
32-bit floating-point real
number
[List mode]
Steps
Inst.
Device
0
LD
X20
1
E+P
D3
D10
R0
5
END
R1
R0
17964.637
[List mode]
Steps
Inst.
Device
0
LD
SM400
1
E-P
D10
D20
D30
5
END
D31
D30
21305.406
191
IB-1501667-B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents