First-In-First-Out And Last-In-First-Out - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Program instructions
7.16 Table
7.16.2

First-in-first-out and last-in-first-out

Table 7- 20
FIFO and LIFO instructions
LAD / FBD
STL
FIFO TBL, DATA
LIFO TBL, DATA
Non-fatal errors with ENO = 0
0006H Indirect address
0091H Operand out of range
SM1.5: Attempt to remove entry
from empty table
Input / output
Data type
TBL
WORD
DATA
INT
Note
All table read and table write instructions must be activated by edge trigger instructions.
To create a table, you must first make an entry for the maximum number of table entries
before any entries can be put in the table.
370
Description
The first-in-first-out instruction moves the oldest (or first) entry in a table to an output
memory address, by removing the first entry in the assigned table (TBL) and moving
the value to the location assigned by DATA. All other entries of the table are shifted
up one location. The entry count in the table is decremented for each FIFO execu-
tion.
The last-in-first-out instruction moves the newest (or last) entry in the table to an
output memory address, by removing the last entry in the table (TBL) and moving
the value to the location assigned by DATA. The entry count in the table is decre-
mented for each LIFO execution.
SM bits affected
SM1.5: Attempt to remove entry from empty table
Operand
IW, QW, VW, MW, SMW, SW, T, C, LW, *VD, *LD, *AC
IW, QW, VW, MW, SMW, SW, T, C, LW, AC, AQW, *VD, *LD, *AC
System Manual, V2.3, 07/2017, A5E03822230-AF
S7-200 SMART

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents