Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 Reference Manual page 739

Programmable controllers
Hide thumbs Also See for SYSMAC CJ - REFERENCE MANUAL 08-2008:
Table of Contents

Advertisement

Table Data Processing Instructions
Stack region
PC memory address of the
last word in the stack
PC memory address of the
next data word (stack pointer)
End of
stack
Pointer
The following diagram shows the basic structure of a stack.
Words in
stack region
Data region
The following instructions define or act on stack regions. Basically,
PUSH(632) stores data in the next available data word in the stack. FIFO(633)
and LIFO(634) read data from the stack. FIFO(633) reads the first word that
was stored, while LIFO(634) reads the last word that was stored.
The last five instructions are supported by CS1-H, CJ1-H, CJ1M, and CS1D
CPU Units only. SNUM(638) counts the number of data elements (words) in
the specified stack; for example, this instruction could be used to indicate the
number of items on a conveyor. Use the SREAD(639), SWRIT(640),
SINS(641), and SDEL(642) instructions to read, overwrite, insert, and delete
data elements in a stack. For example, when items are being handled on a
conveyor, these instructions can add, remove, or change a data element in
the stack that corresponds to an item on the conveyor.
PUSH(632)
Stores data in the address indicated by the stack pointer and increments the
pointer by one.
Pointer
FIFO(633)
Reads first (oldest) word of data that was stored in the stack, shifts the
remaining data down one word, and decrements the pointer by one.
Stack
Pointer to last
word in stack
Pointer
to
Data region
Example
Stack region
Pointer
Stack
Stack
to
Pointer
Reads the content of A, decrements the pointer
by 1, deletes A, and shifts remaining data down.
Section 3-17
PC memory
address
16 words
Stack
A
Pointer
Data region
699

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents