Omron CJ - INSTRUCTIONS Reference Manual page 591

Table of Contents

Advertisement

SNUM(638)
Counts the amount of stack data (number of words of data) from the stack pointer to the beginning of
the data region.
Pointer to last
word in stack
Pointer
Record-table Instructions
A series of data consisting of more than one record with the same number of words in each record is
called table data. Table data stored in the specified I/O memory are can be registered as the table area
using the DIM instruction. Up to 16 separate tables can be defined with table numbers 0 to 15.
Index Registers (IR) can be used to indirectly reference table data. Address calculation of the record
can be easily made by using the SETR(635) (SET RECORD NUMBER) instruction and GETR(636)
(GET RECORD NUMBER).
Range Instructions
The range instructions included here act on a specified range of words to find the maximum value
(MAX(182)) or minimum value (MIN(183)), search for a particular value (SRCH(181)), calculate the sum
(SUM(184)) or FCS (FCS(180)), or swap the contents of the leftmost and rightmost bytes in the words
(SWAP(637)).
Range
specified in
instruction
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Stack
Pointer
A
B
C
Data
D
region
E
Pointer
(Unchanged)
Counts data elements (N).
Table number 0
Table number 1
MAX or
MIN
search
Stack
Pointer to last
word in stack
Pointer
A
B
C
D
Data region
E
0005
The following diagram shows the basic
structure of a record table. Each record in a
table has the same number of words.
Table
Record
Record
Record
SRCH
SUM
search
calculation or
FCS
calculation
3. Instructions
3
Same number of words
in each record
SWAP
operation
553

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - INSTRUCTIONS and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF