Omron SYSMAC CJ - REFERENCE MANUAL 01-2008 Reference Manual page 464

Sysmac cs/cj/one nsj series programmable controllers
Table of Contents

Advertisement

Increment/Decrement Instructions
Flags
Precautions
Examples
@ − −BL
of the specified words is decremented only when the execution condition has
gone from OFF to ON.
Wd+1
The Equals Flag will be turned ON if the result is 0000 0000 and the Carry
Flag will be turned ON when a digit changes from 0 to 9.
Name
Label
Error Flag
ER
Equals Flag
=
Carry Flag
CY
The content of Wd+1 and Wd must be BCD. If it is not BCD, an error will occur
and the Error Flag will be turned ON.
Operation of – –BL(597)
In the following example, the 8-digit BCD content of D00101 and D00100 will
be decremented by 1 every cycle as long as CIO 000000 is ON.
Wd+1:
D00101
Wd:
Decrement Decrement Decrement Decrement
Operation of @– –BL(597)
The up-differentiated variation is used in the following example, so the BCD
content of D00101 and D00100 will be decremented by 1 only when
CIO 000000 has gone from OFF to ON.
Wd+1:
D00101
Wd
Wd+1
Operation
ON if the content of Wd+1 and Wd is not BCD.
OFF in all other cases.
ON if the result is 0000 0000 after execution.
OFF in all other cases.
ON if a digit in Wd+1 or Wd went from 0 to 9 during exe-
cution.
OFF in all other cases.
Decremented every cycle
while CIO 000000 is ON.
D00100
Wd+1:
D00101
1
: Execution of
BL(597)
Decremented only
for up-differentiation.
Wd:
D00100
Wd+1:
−1
: Execution of @− −BL(597)
Decrement
Decrement
Section 3-10
Wd
Wd:
D00100
D00101
Wd:
D00100
425

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents