A20400
A20000
A20401
A20400
A20401
A20001
A20002
A50013
(156)
MCRO 010 0000 0100
(156)
MCRO 010 0002 0105
(156)
MCRO 010 0005 0120
(156)
MCRO 010 0010 0150
(150)
SBN 010
(152)
RET
370
Address
Instruction
Operands
00000
LD
A50013
00001
MCRO(156)
010
0000
0100
00002
MCRO(156)
010
0002
0105
00003
MCRO(156)
010
0005
0120
00004
MCRO(156)
010
0010
0150
00005
SBN(150)
010
00006
LD
A20000
00007
OR
A20400
00008
AND
A20401
00009
OUT
A20400
00010
LD
A20001
00011
AND
A20002
00012
OUT
A20401
00013
RET(152)
5-31 Stack Instructions
Stack Instructions are used to create and manipulate data tables in memory into
which data can be placed and retrieved. Different instructions allow you take
data out of the stack in the same order or in the opposite order from which it was
placed into the stack. SSET(160) must be used to create a stack before any of
the other stack instructions can be used.
5-31-1 SET STACK: SSET(160)
(160)
SSET TB1
N
N: Number of words
CIO, G, A, T, C, #, DM, DR, IR
TB1: 1
st
stack address CIO, G, A, DM
Operand Data Areas
Ladder Symbol
Variations
j
SSET(160)
When the execution condition is OFF, SSET(160) is not executed. When the ex-
ecution condition is ON, SSET(160) defines a stack from TB1 to TB1+N–1, and
writes zeros to all words from TB1+2 to TB1+N–1.
TB1 contains the memory address of TB1+N–1, and TB1+1 contains the
memory address of the word that will be accessed by the next stack instruction.
TB1+1 is called the stack pointer, and contains the memory address for TB1+2
after SSET(160) is executed.
SSET(160) must be used to create one or more stacks before any of the other
stack instructions can be used.
N must be BCD between 0003 and 9999.
Note Refer to page 101 for general precautions on operand data areas.
Flags
ER (A50003):
Content of N is less than 0003, or is not BCD.
Content of
*
DM word is not BCD when set for BCD.
Description
Precautions
Stack Instructions
Section 5-31
Summary of Contents for CVM1D
Page 462: ...SYSMAC CVM1D Duplex System Programmable Controllers Operation Manual Revised August 2001...
Page 463: ...iv...
Page 465: ...vi...