8. Function Commands
D+, D+P
- 165 -
(2) -2147483648 to 2147483647 (BIN 32-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
(B31).
B31
Judgment of
positive/negative
0 Positive
1 Negative
(4) The carry flag will not turn ON if the 31st bit overflows.
Execution conditions
The execution conditions for D+, D+P are as shown below.
Addition command OFF
D+
ON
Executed per scan
Executed per scan
D+P
Program example
(1) Program to add the D0, 1 data and D9, 10 data when X0 turns ON, and output the results to D20,
21.
Coding
No. of
steps
Com-
mand
Device
10 LD X0
11 D+ D0 D9 D20
D+
D9
D0
D20
X0
10
15