![Omron CVM1D Скачать руководство пользователя страница 376](http://html1.mh-extra.com/html/omron/cvm1d/cvm1d_operation-manual_742532376.webp)
(160)
SSET
D00000
#0007
0000
00
371
Example
When CIO 000000 is ON in the following example, SSET(160) defines a 7-word
stack from D00000 to D00006. The memory address of the last word in the
stack, $2006, is written into D00000 and the memory address of TB1+2, $2002,
is written into D00001. The rest of the words in the stack, D00002 to D00006, are
reset.
Address
Instruction
Operands
00000
LD
000000
00001
SSET(160)
D00000
#0007
D00000 $2006 (Address of last stack word)
$2000
D00001 $2002 (Adr. of first stack word+2)
$2001
D00002 0000
$2002
D00003 0000
$2003
D00004 0000
$2004
D00005 0000
$2005
D00006 0000
$2006
Memory
address
7 words
5-31-2 PUSH ONTO STACK: PUSH(161)
(161)
PUSH TB1
S
S: Source word
CIO, G, A, T, C, #, DM, DR, IR
TB1: 1
st
stack address CIO, G, A, DM
Operand Data Areas
Ladder Symbol
Variations
j
PUSH(161)
When the execution condition is OFF, PUSH(161) is not executed. When the ex-
ecution condition is ON, PUSH(161) copies the data from the source word (S) to
the word indicated by the stack pointer (TB1+1). The address in the stack pointer
is then incremented by one.
TB1 must be the first address of a stack defined using SSET(160).
Do not allow the stack pointer to be incremented higher than the address of the
last word in the stack. If the content of the stack pointer is greater than the ad-
dress in TB1, the ER Flag (A50003) will be turned ON.
Note Refer to page 101 for general precautions on operand data areas.
Flags
ER (A50003):
Content of TB1+1 is greater than the content of TB1.
Content of
*
DM word is not BCD when set for BCD.
Description
Precautions
Stack Instructions
Section 5-31
Содержание CVM1D
Страница 462: ...SYSMAC CVM1D Duplex System Programmable Controllers Operation Manual Revised August 2001...
Страница 463: ...iv...
Страница 465: ...vi...