
186
Example
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.
Stack pointer
decremented
After one
execution
After two
executions
DIST(80)
001
HR 00
LR 20
00001
Address
Instruction
Operands
00000
LD
00001
00001
COLL(81)
001
HR
00
LR
20
IR 001
Before
execution
1
2
3 4
0
0
0 2
A B C D
A B C D
0
0
0 1
0
0
0 0
IR 002
IR 003
IR 010
IR 001
IR 002
IR 003
IR 010
IR 001
IR 002
IR 003
IR 010
Stack pointer
decremented
Stack pointer
Stack area
Output
1
2
3 4
LR 20
Output
A B C D
LR 20
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.
Specifies the stack length (000 to 999).
A value of 8 indicates LIFO stack operation.
Digits of C:
3 2 1 0
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.
LIFO Stack Operation
(C=8000 to 8999)
Data Movement
Section 5-16
Summary of Contents for SYSMAC C200HE
Page 1: ...Cat No W303 E1 09 OPERATION MANUAL Programmable Controllers C200HX C200HG C200HE ...
Page 2: ......
Page 3: ...C200HX C200HG C200HE Programmable Controllers Operation Manual Revised August 2004 ...
Page 6: ...vi ...
Page 10: ......
Page 12: ......
Page 380: ......
Page 410: ......
Page 438: ......
Page 464: ......
Page 474: ......
Page 522: ......
Page 538: ......
Page 552: ...534 Programmer Program Date Page Word Contents Notes Word Contents Notes Data Storage ...
Page 554: ......
Page 560: ......
Page 584: ......
Page 585: ......
Page 586: ...W303 E1 09 ...