EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 354

Omron CP - PROGRAMMING MANUAL 05-2007
1175 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...
321
Increment/Decrement Instructions Section 3-9
Description The ++(590) instruction adds 1 to the binary content of Wd. The specified
word will be incremented by 1 every cycle as long as the execution condition
of ++(590) is ON. When the up-differentiated variation of this instruction
(@++(590)) is used, the specified word is incremented only when the execu-
tion condition has gone from OFF to ON.
The Equals Flag will be turned ON if the result is 0000, the Carry Flag will be
turned ON when a digit changes from F to 0, and the Negative Flag will be
turned ON when bit 15 of Wd is ON in the result.
Both the Equals Flag and the Carry Flag will be turned ON when the content
of Wd changes from FFFF to 0000.
Flags
Examples Operation of ++(590)
In the following example, the content of D100 will be incremented by 1 every
cycle as long as CIO 0.00 is ON.
Index Registers ---
Indirect addressing
using Index Registers
,IR0 to ,IR15
–2048 to +2047, IR0 to –2048 to +2047, IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Area Wd
Wd Wd
Name Label Operation
Error Flag ER OFF
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 F to 0 during execution.
OFF in all other cases.
Negative Flag N ON if bit 15 of Wd is ON after execution.
OFF in all other cases.
Wd: D100 Wd: D100
0 0 1 9
0.00
CIO 0.00
D100
Increment Increment Increment Increment
0 0 1 A
: Execution of ++(590)
Incremented every cycle
while CIO 0.00 is ON.

Table of Contents

Related product manuals