![background image](http://html1.mh-extra.com/html/omron/sysmac-c200hs/sysmac-c200hs_operation-manual_742436175.webp)
165
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
Output
1
2
3 4
LR 20
Output
A B C D
LR 20
Stack pointer
decremented
Stack pointer
Stack area
When the execution condition is OFF, COLL(81) is not executed. When the exe-
cution 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
Содержание SYSMAC C200HS
Страница 1: ...Cat No W235 E1 05 C200HS SYSMAC Programmable Controllers...
Страница 2: ...C200HS Programmable Controllers Operation Manual Revised February 2002...
Страница 3: ...iv...
Страница 5: ...vi...
Страница 379: ...371 SR word Corresponding key s Bit 279 03 04 05 3 06 07 VER 08 09 Monitoring Operation and Modifying Data Section 7 1...
Страница 470: ...468 Programmer Program Date Page Word Contents Notes Word Contents Notes Data Storage...
Страница 471: ...469 Programmer Program Date Page TC address T or C Set value Notes TC address T or C Set value Notes Timers and Counters...