Omron C200HX Operation Manual page 204

Hide thumbs Also See for C200HX:
Table of Contents

Advertisement

Data Movement
Example
00001
Stack pointer
Stack area
LIFO Stack Operation
(C=8000 to 8999)
186
In the following example, the content of C (HR 00) is 9010, and COLL(81) is used
to copy the oldest entries from a10-word stack (IR 001 to IR 010) to LR 20.
DIST(80)
001
HR 00
LR 20
Before
execution
Stack pointer
IR 001
decremented
0 0 0 2
IR 002
1 2 3 4
IR 003
A B C D
IR 010
When the execution condition is OFF, COLL(81) is not executed. When the
execution condition is ON, COLL(81) copies the data most recently recorded in
the stack to D. The stack pointer, SBs, is then decremented by 1.
Digits of C:
Data can be added to the stack until it is full. DIST(80)'s stack operation can be
used together with COLL(81)'s read stack operation. COLL(81) can be set to
read on a FIFO or LIFO basis. Refer to 5-16-6 SINGLE WORD DISTRIBUTE
(80) for details.
Note LIFO stands for Last-In-First-Out.
Address
Instruction
Operands
00000
LD
00001
COLL(81)
HR
LR
After one
execution
Stack pointer
IR 001
decremented
0 0 0 1
IR 002
A B C D
IR 003
IR 010
Output
LR 20
1 2 3 4
3 2 1 0
Specifies the stack length (000 to 999).
A value of 8 indicates LIFO stack operation.
Section 5-16
00001
001
00
20
After two
executions
IR 001
0 0 0 0
IR 002
IR 003
IR 010
Output
LR 20
A B C D

Advertisement

Table of Contents
loading

This manual is also suitable for:

C200hgC200he

Table of Contents