3. Instructions
348
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Function
Example Programming
z 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.
z --B
The --B(596) instruction subtracts 1 from the BCD content of
Wd. The specified word will be decremented by 1 every
cycle as long as the execution condition of --B(596) is ON.
When the up-differentiated variation of this instruction (@--
B(596)) is used, the specified word is decremented only
when the execution condition has gone from OFF to ON.
z --BL
The --BL(597) instruction subtracts 1 from the 8-digit BCD
content of Wd+1 and Wd. The content of the specified words
will be decremented by 1 every cycle as long as the execu-
tion condition of --BL(597) is ON. When the up-differentiated
variation of this instruction (@--BL(597)) is used, the content
of the specified words is decremented only when the execu-
tion condition has gone from OFF to ON.
−1
Wd Wd
Wd+1 Wd Wd+1 Wd
D100 D100
−1
Wd: Wd:
Decremented every cycle
while CIO 0.00 is ON.
D100
0.00
D100 D101 D100 D101
Decrement Decrement Decrement Decrement
Wd:Wd+1: Wd:Wd+1:
−1
Decremented every cycle
while CIO 0.00 is ON.
: Execution of −
−B(596)/− −BL(597)
D100
0.00