Omron CJ - REFERENCE MANUAL 10-2009 Reference Manual page 372

Table of Contents

Advertisement

3. Instructions
Function
--
The --(592) instruction subtracts 1 from the binary content of
Wd. The specified word will be decremented by 1 every
cycle as long as the execution condition of --(592) is ON.
When the up-differentiated variation of this instruction (@ --
(592)) is used, the specified word is decremented only when
the execution condition has gone from OFF to ON.
--L
The --L(593) instruction subtracts 1 from the 8-digit hexa-
decimal content of Wd+1 and Wd. The content of the speci-
fied words will be decremented by 1 every cycle as long as
the execution condition of --L(593) is ON. When the up-dif-
ferentiated variation of this instruction (@--L(593)) is used,
the content of the specified words is decremented only when
the execution condition has gone from OFF to ON.
Sample program
Operation of --(592)/--L(593)
The up-differentiated variation is used in the following example, so the content of D100 will be
decremented by 1 only when CIO 0.00 has gone from OFF to ON.
0.00
D100
In the following example, the 8-digit hexadecimal content of D101 and D100 will be decremented by 1
every cycle as long as CIO 0.00 is ON.
0.00
D100
334
Decremented every cycle
while CIO 0.00 is ON.
Wd:
D100
Wd:
D100
1
0 0 2 0
0 0 1 F
Decremented every cycle
while CIO 0.00 is ON.
Wd+1:
D101
Wd:
D100
1
: Execution of
Decrement Decrement
Wd
Wd+1
Wd
Wd+1:
D101
Wd:
D100
L(593)
Decrement
Decrement
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Wd
Wd+1
Wd

Advertisement

Table of Contents
loading

Table of Contents