BC21Inspect
B = Buffer
C = Calculation functions
The BC21Inspect function allows you to acquire a data in FIFO memory without affecting the memory. The data is not extracted but only acquired. Through the input variable index you can capture a different data other than the first inserted, index represents the number of operations would be required to extract the data with the BC21Pop function.
IMPLEMENTATION
BC21Inspect (Buffer, Index, Element, ErrorCode, head, tail)
Parameters:
IN/OUT | VARIABLE TYPE | EXAMPLE NAME | DIM | |
---|---|---|---|---|
IN | ARRGBL/ ARRSYS | Buffer | B/W/L/S | Array containing the Buffer |
IN | GLOBAL | Index | L | Variable containing the index of the value to be captured. It is the number of operations required to extract data from the FIFO. |
IN | GLOBAL | Element | L/S/W/B | Variable containing the value to be placed in the buffer |
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
After calling the function if there are any errors the error (ErrorCode) variable takes the following values:
0 - No error
1 - No data in the FIFO.
2 - Invalid index.