EasyManua.ls Logo

Mitsubishi MELSEC QCPU - Page 192

Mitsubishi MELSEC QCPU
285 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6 - 41 6 - 41
MELSEC-Q/QnA
6 BASIC INSTRUCTIONS
E
-
(1) Subtracts a floating decimal point type real number designated by
D
and a floating decimal
point type real number designated by
S
, and stores the result at a device designated by
D
.
+1
Floating decimal point
t
y
pe real number
+1
+1
SD D S D D
Floating decimal point
t
y
pe real number
Floating decimal point
t
y
pe real number
-
(2) Values which can be designated at
S
and
D
and which can be stored, are as follows:
0, ±2
-126
| Designated value (stored value) | < ±2
128
[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)
±2
-126
| Contents of designated device/operation result | < ±2
128
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] [List Mode]
Steps
Instruction Device
+
D4
5961.437
D3
D11
12003.2
D10
D4
17964.64
D3
(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] [List Mode]
Steps
Instruction
Device
D21
97365.2
D20
D11
76059.8
D10
D21
21305.41
D20
-
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Table of Contents

Related product manuals