First In First Out: Fifo(163) - Omron SYSMAC CVM1 Series Operation Manual

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

Advertisement

Stack Instructions
D00000 $2006 (Final stack address)
D00001 $2004 (Stack pointer)
D00002 ABCD
D00003 37B4
D00004 0000
D00005 0000
D00006 0000

5-31-4 FIRST IN FIRST OUT: FIFO(163)

Ladder Symbol
(163)
FIFO TB1
Variations
j FIFO(162)
Description
Precautions
Flags
Example
0000
00
D00000 $2006 (Final stack address)
D00001 $2005 (Stack pointer)
D00002 ABCD
D00003 37B4
D00004 8E19
D00005 0000
D00006 0000
Memory
address
$2000
$2001
$2002
$2003
$2004
Stack pointer
$2005
decremented
$2006
D
When the execution condition is OFF, FIFO(163) is not executed. When the ex-
ecution condition is ON, FIFO(163) writes zeros into the last word of the stack
and shifts the contents of each word within the stack down by one address, final-
ly shifting the data from TB1+2 (the first value written to the stack) to the destina-
tion word (D). The memory address in the stack pointer (TB1+1) is then decrem-
ented by one.
TB1 must be the first address of a stack defined using SSET(160).
Do not allow the stack pointer to be decremented to the memory address of the
stack pointer. If the content of the stack pointer is less than or equal to the
memory address of the stack pointer itself, the ER Flag (A50003) will be turned
ON.
Note Refer to page 101 for general precautions on operand data areas.
ER (A50003):
TB1+1 is less than or equal to the address of the stack pointer.
Content of *DM word is not BCD when set for BCD.
When CIO 000000 is ON in the following example, the first value in the stack
(ABCD at D00002) is moved to CIO 2001 and all values remaining in the stack
are moved up on word in the stack.
(163)
FIFO
D00000
Memory
address
$2000
$2001
$2002
$2003
$2004
$2005
$2006
D00000 $2006 (Final stack address)
D00001 $2003 (Stack pointer)
D00002 ABCD
D00003 37B4 (Moved to CIO 0200)
D00004 0000
D00005 0000
D00006 0000
Operand Data Areas
st
TB1: 1
stack address CIO, G, A, DM
D: Destination word
CIO, G, A, DM, DR, IR
2001
D00000 $2006 (Final stack address)
D00001 $2004 (Stack pointer)
D00002 37B4
D00003 8E19
D00004 8E19
D00005 0000
D00006 0000
Section 5-31
Memory
address
$2000
$2001
$2002
$2003
$2004
2000
$2005
37B4
$2006
Address Instruction
Operands
00000
LD
000000
00001
FIFO(163)
D00000
Memory
address
$2000
$2001
$2002
$2003
$2004
CIO 2001
$2005
ABCD
$2006
2001
373

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cv seriesSysmac cvm1d series

Table of Contents