5 Understanding Programming
5-90
CJ2 CPU Unit Software User’s Manual
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).
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)
Table Data Processing
Instructions
SET RECORD LOCATION SETR(635)
GET RECORD NUMBER GETR(636) Outputs the PLC memory
address stored in an Index
Register.
Tracking Instructions Record Search Instructions RSRCH@
(Function
codes: 360 to
364, 370 to
374, and 380
to 384)
Outputs the first PLC mem-
ory address of the matching
record to an Index Register.
Record Sort Instructions RSORT@
(Function
codes: 203
205)
Outputs one higher than the
PLC memory address of the
last address in the sorted
range to an Index Register.
Data Movement Instructions DOUBLE MOVE MOVL(498) Transfers between Index
Registers. Used for
exchanges and comparisons.
DOUBLE DATA EXCHANGE XCGL(562)
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)
Special Instructions CONVERT ADDRESS FROM
CV
FRMCV(284) Convert actual PLC memory
addresses between
CVM1/CV-series and CJ-
series addresses.
CONVERT ADDRESS TO CV TOCV(285)