Mitsubishi MELSEC QCPU Programming Manual page 192

Programmable logic controller
Table of Contents

Advertisement

6 BASIC INSTRUCTIONS
E -
(1) Subtracts a floating decimal point type real number designated by
point type real number designated by
Floating decimal point
(2) Values which can be designated at
-126
0, ±2
[Operation Errors]
(1) In the following cases an operation error occurs, the error flag (SM0) turns ON, and an error
code is stored at SD0.
• The contents of the designated device or the result of the addition or subtraction operation
are not "0", or not within the following range: (Error code: 4100)
-126
±2
• When the specified device contains -0 (Q4ARCPU)
(Operation error does not occur even if -0 is stored if SM707 is turned on.) (Error code: 4100)
[Program Example]
(1) The following program adds the floating decimal point type real numbers at D3 and D4 and the
floating decimal point type real numbers at D10 and D11 when X20 goes ON, and stores the
result at D3 and D4.
[Ladder Mode]
(2) The following program subtracts the floating decimal point type real number at D10 and D11
from the floating decimal point type real numbers at D20 and D21, and stores the result of the
subtraction at D20 and D21.
[Ladder Mode]
6 - 41
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
+1
+1
D
D
S
-
Floating decimal point
type real number
type real number
| Designated value (stored value) | < ±2
| Contents of designated device/operation result | < ±2
D4
D3
D11
5961.437
+
D21
D20
D11
-
97365.2
, and stores the result at a device designated by
S
+1
S
D
Floating decimal point
type real number
and
and which can be stored, are as follows:
S
D
128
[List Mode]
Steps
Instruction
D10
D4
12003.2
17964.64
[List Mode]
Steps
Instruction
D10
D21
76059.8
21305.41
MELSEC-Q/QnA
and a floating decimal
D
D
128
Device
D3
Device
D20
6 - 41
.
D

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec qnacpuMelsec q modeMelsec q series

Table of Contents