EasyManua.ls Logo

FATEK FBs-CB2 - QUEUE (FUN110 QUEUE)

FATEK FBs-CB2
348 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Advanced Function Instruction
7-94
FUN110 D P
QUEUE
QUEUE
FUN110 D P
QUEUE
IW : Data pushed into queue, can be a constant
or a register
QU : Starting register of queue
L : Size of queue
Pr : Pointer register
OW : Register accepting data popped out
from queue
QU may combine with V, Z, P0~P9 to serve
indirect address application
WX WY WM WS TMR CTR HR IR OR SR ROR DR K XR
Range
Ope-
rand
WX0
WX240
WY0
WY240
WM0
WM1896
WS0
WS984
T0
T255
C0
C255
R0
R3839
R3840
R3903
R3904
R3967
R3968
R4167
R5000
R8071
D0
D4095
16/32-bit
+/- number
VZ
P0~P9
IW
QU *
L * 2~256
Pr * *
OW * *
z Queue is also a kind of table. It is different from ordinary table in that its queue register numbers go from 1 to L
and not from 0 to L-1. In other words QU
1
~QU
L
respectively correspond to pointers Pr = 1 to L, and Pr = 0 is
used to show that the queue is empty.
z Queue is a first in first out (FIFO) device, i.e. - the data that first pushed into the queue will be the first to pop
out from the queue. A queue is comprised of L consecutive 16 or 32 bit registers ( D instruction) starting from
the QU register, as in the diagram below:
Pr
4
IW QU
g5555 QU1
f4444
QU2
e3333
QU3
d2222
QU4
c1111
OW
QU5
××××
c gis the sequence number o
f
operation
QUL
z When execution control "EN" = 1 or "EN" ( P instruction) has a transition from 0 to 1, the status of in/out
control "I/O" determines whether the IW data will be pushed into the queue (when "I/O" = 1) or be popped out
and transferred to OW (when "I/O" = 0). As shown in the diagram above, the IW data will always be pushed
into the first (QU1) register of the queue. After it has been pushed in, Pr will immediately be increased by 1, so
that the pointer can always point to the first data that was pushed into the queue. When it is popped out, the
data pointed by Pr will be transferred directly to OW. Pr will be reduced by 1, so that it still point to the first data
remained in the queue.
push(I/O=1)
1.IW always push into
QU1
2.Pr1Pr
Push
down
Pop out(I/O=0)
2. QUpr OW
3. Pr1Pr
… …

Other manuals for FATEK FBs-CB2

Related product manuals