![background image](http://html1.mh-extra.com/html/omron/sysmac-c200hs/sysmac-c200hs_operation-manual_742436173.webp)
163
When the execution condition is OFF, DIST(80) is not executed. When the exe-
cution condition is ON, DIST(80) operates a stack from DBs to DBs+C–9000.
DBs is the stack pointer, so S is copied to the word indicated by DBs and DBs is
incremented by 1.
Specifies the stack length (000 to 999).
A value of 9 indicates stack operation.
Digits of C:
3 2 1 0
Data can be added to the stack until it is full. DIST(80) is normally used together
with COLL(81), which can be set to read from the stack on a FIFO or LIFO basis.
Refer to 5-16-7 DATA COLLECT – COLL(81) for details.
Example of Stack Operation
In the following example, the content of C (LR 10) is 9010, and DIST(80) is used
to write the numerical data #00FF to the 10-word stack from HR 20 to HR 29.
During the first cycle when IR 00001 is ON, the data is written to DBs+1 (HR 21)
and the stack pointer is incremented by 1. In the second cycle the data is written
to DBs+2 (HR 22) and the stack pointer is incremented, and so on.
1
HR 20
0 0 0
F
HR 21
0 0 F
HR 22
HR 29
Stack pointer
incremented
2
HR 20
0 0 0
F
HR 21
0 0 F
F
HR 22
0 0 F
HR 29
After one
execution
After two
executions
DIST(80)
# 00FF
HR 20
LR 10
00001
Address
Instruction
Operands
00000
LD
00001
00001
DIST(80)
#
00FF
HR
20
LR
10
Stack pointer
Stack area
Flags
ER:
The content of C is not BCD or 6655<C<9000.
When C
≤
6655, DBs and DBs+C are not in the same data area.
When C
≥
9000, DBs and DBs+C–9000 are not in the same data area.
Indirectly addressed DM word is non-existent. (Content of
∗
DM word is
not BCD, or the DM area boundary has been exceeded.)
EQ:
ON when the content of S is zero; otherwise OFF.
Stack Operation
(C=9000 to 9999)
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...