Specifications

SIMATIC Instructions
9-108
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
First-In-First-Out
The First-In-First-Out instruction removes the first entry
in the table (TBL), and outputs the value to a specified
location (DATA). All other entries of the table are shifted
up one location. The entry count in the table is
decremented for each instruction execution.
Error conditions that set ENO = 0: SM1.5 (empty table),
SM4.3 (run-time), 0006 (indirect address), 0091 (operand
out of range)
This instruction affects the following Special Memory bits:
SM1.5 is set to 1 if you try to remove an entry from an
empty table.
Inputs/Outputs Operands Data Types
TABLE VW, IW, QW, MW, SW, SMW, LW, T, C,*VD, *AC, *LD WORD
DATA VW, IW, QW, MW, SW, SMW, LW, AC, AQW, T, C, *VD, *AC, *LD WORD
First-In-First-Out Example
LAD STL
Application
LD I4.1
FIFO VW200, VW400
I4.1
FIFO
EN
DATA VW400VW200 TBL
5431
VW400
After execution of FIFO
Before execution of FIFO
0006
0003
5431
8942
1234
xxxx
xxxx
xxxx
VW200
VW202
VW204
VW206
VW208
VW210
VW212
VW214
TL (max. no. of entries)
EC (entry count)
d0 (data 0)
d1 (data 1)
TL (max. no. of entries)
EC (entry count)
d0 (data 0)
d2 (data 2)
0006
0002
8942
1234
xxxx
xxxx
xxxx
xxxx
VW200
VW202
VW204
VW206
VW208
VW210
VW212
VW214
d1 (data 1)
FBD
FIFO
EN
DATA VW400
VW200 TBL
I4.1
ENO
ENO
Figure 9-35 Example of First-In-First-Out Instruction
L
A
D
S
T
L
OUT
FIFO
EN
TBL DATA
FIFO TABLE, DATA
F
B
D
ENO
222 224
333
221