Using Index Registers - Omron CP1H-X40D Operation Manual

Cpu unit sysmac cp series
Hide thumbs Also See for CP1H-X40D:
Table of Contents

Advertisement

Index Registers

4-15-1 Using Index Registers

tions shown in the following table. Use these instructions to operate on the
Index Registers as pointers.
The Index Registers cannot be directly addressed in any other instructions,
although they can usually be used for indirect addressing.
Instruction group
Data Movement
Instructions
Table Data Processing
Instructions
Increment/Decrement
Instructions
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
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).
Instruction name
MOVE TO REGISTER
MOVE TIMER/COUNTER PV TO REG-
ISTER
DOUBLE MOVE
DOUBLE DATA EXCHANGE
SET RECORD LOCATION
GET RECORD NUMBER
DOUBLE INCREMENT BINARY
DOUBLE DECREMENT BINARY
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
Section 4-15
Mnemonic
MOVR(560)
MOVRW(561)
MOVL(498)
XCGL(562)
SETR(635)
GETR(636)
++L(591)
– –L(593)
=L(301)
< >L(306)
< L(311)
< =L(316)
> L(321)
> =L(326)
CMPL(060)
+L(401)
–L(411)
175

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cp1h-xa40dCp1h-y20dt-dCp1h

Table of Contents