4 Understanding Programming
4-30
CP2E CPU Unit Software User’s Manual(W614)
z Direct Addressing of Index Registers
The size of an index registers is two words per register for Index Registers IR0 to IR15, so use a
double-word instruction (with an “L” in the mnemonic).
It is possible to monitor Index Registers as follows:
• To use the CX-Programmer to monitor the final Index Register values for each task.
• To monitor the Index Register values using Host Link commands or FINS commands, write a pro-
gram to store Index Register values from each task to another area (e.g., DM area) at the end of each
task, and to read Index Register values from the storage words (e.g., DM area) at the beginning of
each task. The values stored for each task in other areas (e.g., DM area) can then be edited using
the CX-Programmer, Host Link commands, or FINS commands.
Instruction group Instruction name Mnemonic Primary function
Data Movement Instructions MOVE TO REGISTER MOVR(560) Stores the PLC memory
address of a bit or word in an
Index Register.
MOVE TIMER/COUNTER PV
TO REGISTER
MOVRW(561)
DOUBLE MOVE MOVL(498) Transfers between Index
Registers. Used for
exchanges and comparisons.
Comparison Instructions
DOUBLE EQUAL =L(301)
DOUBLE NOT EQUAL < >L(306)
DOUBLE LESS THAN < L(311)
DOUBLE LESS THAN OR
EQUAL
< =L(316)
DOUBLE GREATER THAN >L(321)
DOUBLE GREATER THAN OR
EQUAL
>=L(326)
DOUBLE COMPARE CMPL(060)
Increment/Decrement
Instructions
DOUBLE INCREMENT BINARY ++L(591) Changes the PLC memory
address in the Index Register
by incrementing, decrement-
ing, or offsetting its content.
DOUBLE DECREMENT
BINARY
−−L(593)
Symbol Math Instructions
DOUBLE SIGNED BINARY
ADD WITHOUT CARRY
+L(401)
DOUBLE SIGNED BINARY
SUBTRACT WITHOUT CARRY
−L(411)
4-6-3 Monitoring Index Registers