A FIFO (Queue) Data Table works according to the principle of First In, First Out.
This means that the oldest entry, or 'Back' of the queue, is processed first.
A FIFO Struct contains the following elements; all are Read Only.
Number of Rows |
This is defined in the Data Table Properties |
|
Number of Occupied Rows |
This is the number of rows containing data. |
|
Status |
Check this after running a function to check status 0=No errors -1= Data Table is full -2= Data Table is empty |
|
Is Full |
Use this before running a function. 0= Not Full 1= Full Note that when the table is full, you cannot write data to the table |
|
Is Empty |
Use this before running a function. 0= Table contains Data 1= Table is Empty |
These functions include:
Push FIFO
‘PUSHes’ (writes) Struct data into the Back row of a Data Table.
When the table is full, more data cannot be added until you remove the Front row.
Pop FIFO
‘POPs’ (deletes) the values from the Front row of a Data Table, leaving the row empty.
Front
Copies the data in the top (front) row of a Data Table and writes it to a Struct.
Back
Copies the data in the bottom (back) row of a Data Table and writes it to a Struct.
Clear FIFO
Removes all of the data from the table.