Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 377

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

3. Instructions
Function
--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.
--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.
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.
0.00
D100
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.
0.00
D100
340
Decremented every cycle
while CIO 0.00 is ON.
Wd:
D100
Wd:
1
Decremented every cycle
while CIO 0.00 is ON.
Wd+1:
D101
Wd:
D100
1
: Execution of
Decrement Decrement Decrement Decrement
Wd
1
Wd+1
Wd
D100
Wd+1:
D101
Wd:
D100
B(596)/
BL(597)
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Wd
Wd+1
Wd

Advertisement

Table of Contents
loading

Table of Contents