Indice

BC21Elements

B = Buffer

C = Calculation functions

The BC21Elements function makes it possible to know the number of items inserted in the FIFO.

IMPLEMENTATION

BC21Elements (Buffer, Element, ErrorCode, head, tail)

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
IN ARRGBL/ ARRSYS Buffer B/W/L/S Array containing the Buffer
OUT GLOBAL Element L Variable containing the number of elements included in the FIFO.
OUT GLOBAL ErrorCode F Variable containing the error possibly occurred during insertion of the value
IN GLOBAL / SYSTEM head L Internal index
IN GLOBAL / SYSTEM tail L Internal index

Error

Once invoked the function if there are any errors the error variable (ErrorCode) takes the following values:
0 - No error
1 - No data in FIFO.
2 - FIFO memory that contains data not correctly formatted.