8. Function Commands
+, +P
- 163 -
(2) -32768 to 32767 (BIN 16-bit) can be designated in S1, S2 and S.
(3) The positive/negative of the data in S1, S2, S and D is determined with the highest-order bit
(B15).
B15
Judgment of
positive/negative
0 Positive
1 Negative
(4) The carry flag will not turn ON if the 15th bit overflows.
Execution conditions
The execution conditions for +, +P are as shown below.
Addition command OFF
+
ON
+P
Executed per scan
Executed per scan
Program example
(1) Program to add the D0 BIN data and D10 BIN data and output to D20.
Coding
No. of
steps
Com-
mand
Device
10 LD M0
11 + D0 D10 D20
+
D10
D0
D20
M0
(ON)
10
15