A SERVICE OF

logo

8. Function Commands
B–, B–P
- 181 -
Program example
(1) Program to subtract the D10 BCD data from D3 and output to D20.
Coding
No. of
steps
Com-
mand
Device
10 LD M0
11 B- D3 D10 D20
D10D3 D20
M0
(ON)
10
B-
16
(2) Program to output the difference of the timer T3 setting value and current value to D20 BCD data.
Coding
No. of
steps
Com-
mand
Device
10 LD X3
11 OUT T3
K1800
13 LD M0
14 MOV
K1800
D2
17 BCD T3 D3
20 B- D2 D3 D20
X3
(ON)
10
T3 K1800
M0
MOV
K1800 D2
B-
D3D2
D20
BCD
T3
D3
13
25