Program instructions
7.16 Table
S7-200 SMART
328 System Manual, 09/2015, A5E03822230-AC
First-in-first-out and last-in-first-out
Table 7- 13 FIFO and LIFO instructions
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.
Non-fatal errors with ENO = 0
• 0006H Indirect address
• 0091H Operand out of range
• SM1.5: Attempt to remove entry
from empty table
• SM1.5: Attempt to remove entry from empty table
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
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.