Increment/Decrement Instructions - Omron CPM1 - PROGRAMING MANUAL 02-2001 Programming Manual

Hide thumbs Also See for CPM1 - PROGRAMING MANUAL 02-2001:
Table of Contents

Advertisement

Increment/Decrement Instructions

7-25 Increment/Decrement Instructions
7-25-1 BCD INCREMENT – INC(38)
Limitations
Description
Precautions
Flags
7-25-2 BCD DECREMENT – DEC(39)
Limitations
Description
Precautions
Flags
Ladder Symbols
INC(38)
@INC(38)
Wd
DM 6144 to DM 6655 cannot be used for Wd.
When the execution condition is OFF, INC(38) is not executed. When the execu-
tion condition is ON, INC(38) increments Wd, without affecting Carry (CY).
The content of Wd will be incremented every cycle if the undifferentiated form of
INC(38) is used. Use the differentiated form (@INC(38)) or combine INC(38)
with DIFU(13) or DIFD(14) to increment Wd just once.
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
DM 6144 to DM 6655 cannot be used for 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.
The content of Wd will be decremented every cycle if the undifferentiated form of
DEC(39) is used. Use the differentiated form (@DEC(39)) or combine DEC(39)
with DIFU(13) or DIFD(14) to decrement Wd just once.
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.
Wd: Increment word (BCD)
Wd
Wd: Decrement word (BCD)
Wd
Section
7-25
Operand Data Areas
IR, SR, AR, DM, HR, LR
Operand Data Areas
IR, SR, AR, DM, HR, LR
483

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents