EasyManua.ls Logo

Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 - Page 462

Omron SYSMAC CJ - REFERENCE MANUAL 08-2008
1405 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
422
Increment/Decrement Instructions Section 3-10
The Equals Flag will be turned ON if the result is 0000 and the Carry Flag will
be turned ON when a digit changes from 0 to 9.
Flags
Precautions The content of Wd must be BCD. If it is not BCD, an error will occur and the
Error Flag will be turned ON.
Examples Operation of – –B(596)
In the following example, the BCD content of D00100 will be decremented by
1 every cycle as long as CIO 000000 is ON.
Operation of @– –B(596)
The up-differentiated variation is used in the following example, so the BCD
content of D00100 will be decremented by 1 only when CIO 000000 has gone
from OFF to ON.
1
Wd Wd
Name Label Operation
Error Flag ER ON if the content of Wd is not BCD.
OFF in all other cases.
Equals Flag = ON if the content of Wd is 0000 after execution.
OFF in all other cases.
Carry Flag CY ON if a digit in Wd went from 0 to 9 during execution.
OFF in all other cases.
D00100 D00100
1
Decrement Decrement Decrement Decrement
Wd: Wd:
Decremented every cycle
while CIO 000000 is ON.
: Execution of − − B(596)
@
−−
B
D00100 D00100
1
Decrement Decrement
Wd: Wd:
Decremented only
for up-differentiation.
: Execution of @− −B(596)

Table of Contents

Related product manuals