286
Index Registers Section 6-2
Note Instructions for double-length operands (i.e., those with “L” at the end) are
used for index registers IR0 to IR15 because each register contains two
words.
6-2-3 Processing Related to Index Registers
The CS/CJ-series CPU Unit’s Table Data Processing instructions complement
the functions of the Index Registers. These instructions can be broadly
divided into the stack-processing and table-processing instructions
Stack Processing
Stack instructions act on specially defined data tables called stacks. Data can
be drawn from a stack on a first-in first-out (FIFO) or last-in first-out (LIFO)
basis.
A particular region of I/O memory must be defined as a stack. The first words
of the stack indicate the length of the stack and contain the stack pointer. The
stack pointer is incremented each time that data is written to the stack to indi-
cate the next address where data should be stored.
Increment/Decrement
Instructions
DOUBLE INCREMENT BINARY ++L(591) Changes the PLC memory
address in the Index Register by
incrementing, decrementing, or
offsetting its content.
DOUBLE DECREMENT BINARY – –L(593)
Symbol Math Instructions DOUBLE SIGNED BINARY ADD WITH-
OUT 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 CV-series and
CS/CJ-series addresses.
(The CS1G/H-CPU
@@ (-V1) and
CJ1
@-CPU@@ CPU Units do not
this function.)
CONVERT ADDRESS TO CV TOCV(285)
Instruction group Instruction name Mnemonic Primary function
Processing Purpose Instructions
Stack processing Operate FIFO (first-in first-out) or
LIFO (last-in first-out) data tables,
and read, write, insert, delete, or
count data entries in data tables.
SSET(630), PUSH(632), FIFO(633),
LIFO(634), SREAD(639),
SWRITE(640), SINS(641), SDEL(642),
SNUM(638)
Ta bl e
process-
ing
Tables with one-
word records
(Range instruc-
tions)
Basic pro-
cessing
Find values such as the checksum, a
particular value, the maximum value,
or minimum value in the range.
FCS(180), SRCH(181), MAX(182),
MIN(183), and SUM(184)
Special
processing
Perform various other table process-
ing such as comparisons or sorting.
Combine Index Registers with instruc-
tions such as SRCH(181), MAX(182),
MIN(183), and comparison instruc-
tions.
Tables with multiple-word
records
(Record-table instructions)
Process data in records that are sev-
eral words long.
Combine Index Registers with instruc-
tions such as DIM(631), SETR(635),
GETR(636), and comparison instruc-
tions.