Sample program, 2 instructions – Omron SYSMAC CP CP1E-N@@D@-@ User Manual
Page 193

2-157
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Increm
ent/D
ecrement
In
stru
ctio
ns
2
-
-B
/-
-BL
Sample program
Operation of --B(596)/--BL(597)
In the following example, the BCD content of D100 will be decremented by 1 every cycle as long as CIO
0.00 is ON.
In the following example, the 8-digit BCD content of D101 and D100 will be decremented by 1 every
cycle as long as CIO 0.00 is ON.
Operation of @--B(596)/@--BL(597)
The up-differentiated variation is used in the following example, so the BCD content of D100 will be dec-
remented by 1 only when CIO 0.00 has gone from OFF to ON.
The up-differentiated variation is used in the following example, so the BCD content of D101 and D100
will be decremented by 1 only when CIO 0.00 has gone from OFF to ON.
0 0 2 0
Wd: D100
0 0 1 9
Decremented every cycle
while CIO 0.00 is ON.
Wd: D100
--B
D100
-1
0.00
0.00
Wd+1: D101
Wd: D100
Wd+1: D101
Wd: D100
Decrement
Decrement
Decrement
Decrement
: Execution of --B(596) / --BL(597)
Decremented every cycle
while CIO 0.00 is ON.
-1
--BL
D100
0.00
0 0 0 1
0 0 0 0
0 0 0 0
9 9 9 9
0 0 2 0
Wd: D100
0 0 1 9
Wd: D100
@--B
D100
-1
0.00
Decremented only for
up-differentiation.
0.00
Wd+1: D101
Wd: D100
Wd+1: D101
Wd: D100
Decrement
Decrement
: Execution of @--B(596) /@ --BL(597)
-1
@--BL
D100
0.00
0 0 0 1
0 0 0 0
0 0 0 0
9 9 9 9
Decremented only for
up-differentiation.