Increment - Inc(38); Decrement - Dec(39); Set Carry - Stc(40) - Omron C200H Operation Manual

Hide thumbs Also See for C200H:
Table of Contents

Advertisement

BCD Calculations
5-17-1
INCREMENT – INC(38)
Description
Flags
5-17-2
DECREMENT – DEC(39)
Description
Flags
5-17-3
SET CARRY – STC(40)
The addition and subtraction instructions include CY in the calculation as well
as in the result. Be sure to clear CY if its previous status is not required in the
calculation, and to use the result placed in CY, if required, before it is
changed by execution of any other instruction.
Ladder Symbols
INC(38)
@INC(38)
Wd
When the execution condition is OFF, INC(38) is not executed. When the
execution condition is ON, INC(38) increments Wd, without affecting Carry
(CY).
ER:
Wd is not BCD
Indirectly addressed DM word is non-existent. (Content of *DM word
is not BCD, or the DM area boundary has been exceeded.)
EQ:
ON when the incremented result is 0.
Ladder Symbols
DEC(39)
@DEC(39)
Wd
When the execution condition is OFF, DEC(39) is not executed. When the
execution condition is ON, DEC(39) decrements Wd, without affecting CY.
DEC(39) works the same way as INC(38) except that it decrements the value
instead of incrementing it.
ER:
Wd is not BCD
Indirectly addressed DM word is non-existent. (Content of *DM word
is not BCD, or the DM area boundary has been exceeded.)
EQ:
ON when the decremented result is 0.
When the execution condition is OFF, STC(40) is not executed.When the ex-
ecution condition is ON, STC(40) turns ON CY (SR 25504).
Wd: Increment word (BCD)
Wd
Wd: Decrement word (BCD)
Wd
Ladder Symbols
STC(40)
Section 5-17
Operand Data Areas
IR, AR, DM, HR, LR
Operand Data Areas
IR, AR, DM, HR, LR
@STC(40)
163

Advertisement

Table of Contents
loading

Table of Contents