Omron CP1E-NA@@D@-@ Computer Hardware User Manual


 
2-151
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Increment/Decrement
Instructions
2
--/--L
Function
Sample program
Operation of --(592)/--L(593)
The up-differentiated variation is used in the following example, so the content of D100 will be decre-
mented by 1 only when CIO 0.00 has gone from OFF to ON.
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.
--
The --(592) instruction subtracts 1 from the binary
content of Wd. The specified word will be decre-
mented by 1 every cycle as long as the execution
condition of --(592) is ON. When the up-differenti-
ated 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
hexadecimal content of Wd+1 and Wd. The content
of the specified words will be decremented by 1
every cycle as long as the execution condition of --
L(593) is ON. When the up-differentiated 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.
-1Wd Wd
WdWd+1 Wd+1 Wd
-1
0 0 2 0
Wd: D100
0 0 1 F
Decremented every cycle
while CIO 0.00 is ON.
Wd: D100
--
D100
-1
0.00
0.00
Wd+1: D101 Wd: D100 Wd+1: D101 Wd: D100
Decrement Decrement Decrement Decrement
: Execution of --L(593)
Decremented every cycle
while CIO 0.00 is ON.
-1
--L
D100
0.00
0001
0000 0000 FFFF