Omron SYSMAC CP Series Instruction & Reference Manual page 187

Cpu unit
Hide thumbs Also See for SYSMAC CP Series:
Table of Contents

Advertisement

Function
--
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.
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.
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
--L
D100
CP1E CPU Unit Instructions Reference Manual(W483)
Decremented every cycle
while CIO 0.00 is ON.
Wd: D100
Wd: D100
0 0 2 0
-1
0 0 1 F
Decremented every cycle
while CIO 0.00 is ON.
Wd+1: D101
Wd: D100
0 0 0 1
0 0 0 0
-1
: Execution of --L(593)
0.00
Decrement
Decrement
Wd
-1
Wd+1
Wd
Wd+1: D101
Wd: D100
0 0 0 0
F F F F
Decrement Decrement
2 Instructions
Wd
-1
Wd+1
Wd
2-151
2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents