
184
When the execution condition is OFF, DIST(80) is not executed. When the
execution 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. The Negative Flag also changes.
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 C200HE
Страница 1: ...Cat No W303 E1 09 OPERATION MANUAL Programmable Controllers C200HX C200HG C200HE ...
Страница 2: ......
Страница 3: ...C200HX C200HG C200HE Programmable Controllers Operation Manual Revised August 2004 ...
Страница 6: ...vi ...
Страница 10: ......
Страница 12: ......
Страница 380: ......
Страница 410: ......
Страница 438: ......
Страница 464: ......
Страница 474: ......
Страница 522: ......
Страница 538: ......
Страница 552: ...534 Programmer Program Date Page Word Contents Notes Word Contents Notes Data Storage ...
Страница 554: ......
Страница 560: ......
Страница 584: ......
Страница 585: ......
Страница 586: ...W303 E1 09 ...