DEC
- 107 -
Program example
(1) Example of subtraction counter program
DECP
D8
M38
=
D8
K0
M38
18
M38 turns ON when D8 = 0.
X8
Execute D8-1 at X8 OFF to ON
when M38 turns OFF.
14
K100
D8
X7
10
MOV
Set D8 to 100 when X7 turns ON.
Coding
No. of
steps
Com-
mand
Device
10 LD X7
11 MOV K100 D8
14 LD X8
15 PLS M5
17 LD M5
18 ANI M38
19 DEC D8
21 LD= K0 D8
24 OUT M38
25