en:software:qview:qview_6:qcl_library:bc10popbuf

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:software:qview:qview_6:qcl_library:bc10popbuf [2017/02/07 17:25] – created qem103en:software:qview:qview_6:qcl_library:bc10popbuf [2019/08/29 17:01] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== BC10PopBuf ======
 +
 +**B = **//Buffer//
 +
 +**C = **//Calculation functions//
 +
 +The BC10PopBuf function extracts__ a value from a ring buffer__. Each time the latter function makes sure to extract from the circular buffer queue the first data entered and than place it in a variable.
 +
 +===== IMPLEMENTATION =====
 +
 +**BC10PopBuf (Buffer, Element, ErrorCode)**
 +
 +Parameters:
 +
 +^IN/OUT^VARIABLE TYPE^EXAMPLE NAME^DIM^^
 +|  IN  |  ARRSYS  |  Buffer  |  B/W/L/ |Array containing the Buffer|
 +|  OUT  |  GLOBAL  |  Element  |  L/S  |Variable on which you place the value retrieved from the buffer|
 +|  OUT  |  GLOBAL  |  ErrorCode  |  F  |Variable containing the error possibly occurred during insertion of the value|
 +
 +==== Error ====
 +
 +After calling the function if there are any errors the error variable (ErrorCode) take the following values:\\
 +0 - No error\\
 +1 - Empty Buffer
 +
 +=== Example ===
 +
 +Extracts an data by the buffer queue and puts it in the "glDato" variable each front of the "gfExtract" variable
 +
 +<code QCL>
 +MAIN:                 
 +     IF gfExtract
 +           gfExtract = 0
 +           BC10PopBuf (Buffer, Element, ErrorCode)
 +           IF NOT ErrorCode
 +              glDato = Element
 +           ENDIF
 +     ENDIF
 +</code>
 +
 +=== Note ===
 +
 +  *Using this feature is linked to the **BC10InitBuf** function that initializes the buffer and that must be called at least once before the BC10PushBuf function. 
 +  *Complementary to this function is the **BC10PushBuf** function who places a data in a ring buffer queue.