Push Onto Stack: Push(161) - Omron SYSMAC CVM1 Series Operation Manual

Duplex system
Hide thumbs Also See for SYSMAC CVM1 Series:
Table of Contents

Advertisement

Stack Instructions
Example
0000
00

5-31-2 PUSH ONTO STACK: PUSH(161)

Ladder Symbol
(161)
PUSH TB1
Variations
j PUSH(161)
Description
Precautions
Flags
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.
(160)
SSET
D00000
D00000 $2006 (Address of last stack word)
D00001 $2002 (Adr. of first stack word+2)
D00002 0000
D00003 0000
7 words
D00004 0000
D00005 0000
D00006 0000
S
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.
ER (A50003):
Content of TB1+1 is greater than the content of TB1.
Content of *DM word is not BCD when set for BCD.
#0007
Operand Data Areas
st
TB1: 1
stack address CIO, G, A, DM
S: Source word
CIO, G, A, T, C, #, DM, DR, IR
Section 5-31
Address Instruction
Operands
00000
LD
000000
00001
SSET(160)
D00000
Memory
address
$2000
$2001
$2002
$2003
$2004
$2005
$2006
#0007
371

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cv seriesSysmac cvm1d series

Table of Contents