6-70
INC(P),DEC(P)
Program Example
(1) The following program outputs the present value at the counter C0 to C20 to the area Y30 to
Y3F in BCD, every time X8 is turned ON. (When present value is less than 9999)
[Ladder Mode]
[List Mode]
(2) The following is a down counter program.
[Ladder Mode]
[List Mode]
Outputs the present value of C (D+Z1) to
Y30 to Y3F in BCD.
Executes Z1 + 1.
Sets Z1 at "0" when Z1=21 or X7
(reset input) is ON.
Step
Instruction
Device
Transfers 100 to D8 when X7 goes ON.
In the state M38=OFF, decrement at D8 (D8 - 1) is
executed when X8 goes from OFF to ON.
At D8=0, M38 goes ON.
Step
Instruction
Device