4-11-1 Using Index Registers - Omron CP1L Operation Manual

Sysmac cp series
Hide thumbs Also See for CP1L:
Table of Contents

Advertisement

Index Registers

4-11-1 Using Index Registers

164
Instruction group
Comparison Instructions
Symbol Math Instructions DOUBLE SIGNED BINARY ADD WITH-
The SRCH(181), MAX(182), and MIN(183) instructions can output the PLC
memory address of the word with the desired value (search value, maximum,
or minimum) to IR0. In this case, IR0 can be used in later instructions to
access the contents of that word.
Processing of multiple (identical) instructions such as consecutive addresses
for table data can be merged into one instruction by combining repetitive pro-
cessing (e.g., FOR(513) and NEXT(514)instructions) with indirect addressing
using Index Registers, thereby simplifying programming.
Instruction execution
repeatedly incrementing
IR0 by 1
Indirect
Instruction
addressing
,IR0
The Index operation uses the following procedure.
1. PLC memory addresses for the addresses in the Index Registers are
stored using a MOVR instruction.
2. Operation is then executed by indirectly addressing Index Registers to the
operand for Instruction A.
3. The addresses are moved using processing such as adding, subtracting,
incrementing, or decrementing the Index Register (see note).
4. Steps 2 and 3 are processed repeatedly until the conditions are met.
Note Adding, subtracting incrementing, or decrementing for the Index
Register is performed using one of the following methods.
• Each Type of Indirect Addressing for Index Registers:
Auto-increment (,IR@+ or ,IR@++), auto-decrement (,-IR@ or ,--IR@),
constant offset (constant ,IR@), and DR offset (DR@,IR@) for Index
Registers
• Instructions for Direct Addressing of Index Registers:
DOUBLE SIGNED BINARY ADD WITHOUT CARRY (+L), DOUBLE
SIGNED BINARY SUBTRACT WITHOUT CARRY (-L), DOUBLE IN-
CREMENT BINARY (++L), DOUBLE DECREMENT BINARY (--L)
Instruction name
DOUBLE EQUAL
DOUBLE NOT EQUAL
DOUBLE LESS THAN
DOUBLE LESS THAN OR EQUAL
DOUBLE GREATER THAN
DOUBLE GREATER THAN OR EQUAL
DOUBLE COMPARE
OUT CARRY
DOUBLE SIGNED BINARY SUBTRACT
WITHOUT CARRY
Table data
IR0
Section 4-11
Mnemonic
=L(301)
< >L(306)
< L(311)
< =L(316)
> L(321)
> =L(326)
CMPL(060)
+L(401)
–L(411)

Advertisement

Table of Contents
loading

Table of Contents