EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Page 262

Mitsubishi Electric MELSEC-Q/L
1084 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...
260
6 BASIC INSTRUCTIONS
6.2 Arithmetic Operation Instructions
The following will happen if an overflow occurs in an operation result: The carry flag (SM700) in this case does not go ON.
DBK-
This instruction subtracts BIN 32-bit data stored in the n-point devices starting from the device specified by (S2) or a
constant from BIN 32-bit data stored in n-point devices starting from the device specified by (S1), and then stores the
operation result into the nth device specified by (D) and up.
When a device is specified for (S2)
When a constant is specified for (S2)
Block subtraction is performed in 32-bit units.
The constant in the device specified by (S2) can be between -2147483648 to 2147483647 (BIN 32-bit data).
If the value specified by n is 0, the instruction will be not processed.
Specify (D) out of the range of n-point devices starting from the device specified by (S1) and (S2). However, (S1) and (S2)
can specify the same device.
The following will happen if an overflow occurs in an operation result: The carry flag (SM700) in this case does not go ON.
Operation error
In any of the following cases, an operation error occurs, the error flag (SM0) turns on, and an error code is stored into SD0.
Error
code
Error details Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4100 A negative value is specified for n. 
4101 The points specified in n exceed those of the corresponding device specified
in (S1), (S2), or (D).
The ranges of devices starting from the one specified in (S1) and (D) overlap
by n points. (except when the same device is specified in (S1) and (D)).
The ranges of devices starting from the one specified in (S2) and (D) overlap
by n points. (except when the same device is specified in (S2) and (D)).

K2147483647
(7FFFFFFF
H)
K 2147483647
(80000001
H)
+K
2
+K2
K 2147483647
K2147483647
(00000002
H
)
(
80000001
H
)
(
FFFFFFFE
H)
(
7FFFFFFF
H)
b31 b0
(BIN)
(BIN)
(BIN)
n
(BIN)
(BIN)
(BIN)
b31 b0 b31 b0
(BIN)
(BIN)
(BIN)
nn
(BIN)
30000
1234
(BIN)
44445
3333
-10000
12345
(BIN)
-55555
33333
44444
13579
54444
-1000000
S1 +1,
S1 +3,
S1 +5,
S1 +(2n-1),
S1
S1 +2
S1 +4
S1 +(2n-2)
S2 +1,
S2 +3,
S2 +5,
S2 +(2n-1),
S2
S2 +2
S2 +4
S2 +(2n-2)
D +1,
D +3,
D +5,
D +(2n-1),
D
D+2
D+4
D +(2n-2)
-
b31 b0
(BIN)
(BIN)
(BIN)
(BIN)
b31 b0 b31 b0
(BIN)
(BIN)
(BIN)
nn
(BIN)
-109998
90000
70000
9999
(BIN)
-99999
99999
-59999
79999
69998
S1 +1,
S1 +3,
S1 +5,
S1 +(2n-1),
S1
S2 +1, S2
S1 +2
S1 +4
S1 +(2n-2)
D +1,
D +3,
D +5,
D +(2n-1),
D
D+2
D+4
D +(2n-2)
-
K2147483647
(7FFFFFFF
H)
K 2147483647
(80000001
H)
K
2
K 2
K 2147483647
K2147483647
(00000002
H
)
(
80000001
H
)
(
FFFFFFFE
H )
(
7FFFFFFF
H
)

Table of Contents

Related product manuals