en:software:qview:qview_6:qcl_library:bc10arrfifo

Differences

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

Link to this comparison view

en:software:qview:qview_6:qcl_library:bc10arrfifo [2017/02/24 15:51] – created qem103en:software:qview:qview_6:qcl_library:bc10arrfifo [2019/08/29 17:01] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== BC10ArrFifo ======
 +
 +**B = **//Buffer//
 +
 +**C = **//Calculation Functions//
 +
 +The BC10ArrFifo function __manages a buffer of first input - first output type__. The function requires an input value in the '**ElementIn**' variable that is buffered to the required position (through the '**PuntatIn**' variable) and slides all values of the buffer until the element indicated by the '**PuntatOut**' variable. This value comes from the buffer and ends in the '**ElementOut**' variable.
 +
 +===== IMPLEMENTATATION =====
 +
 +**BC10ArrFifo (Buffer, elementIn, elementOut, PuntatIn, PuntatOut)**
 +
 +Parameters:
 +
 +^IN/OUT^VARIABLE TYPE^EXAMPLE NAME^DIM^^
 +|  IN  |  ARRSYS  |  Buffer  |  B/W/L/ |Array containing the Buffer|
 +|  IN  |  SYSTEM  |  ElementIn  |  B/W/L/ |Var that contains the value to be placed in the buffer|
 +|  IN  |  SYSTEM  |  ElementOut  |  B/W/L/ |Var that contains the value that comes from the buffer|
 +|  IN  |  SYSTEM  |  PuntatIn  |  L  |Var that contains the item number of the buffer at which to insert the new value|
 +|  OUT  |  SYSTEM  |  PuntatOut  |  L  |Var that contains the buffer element number from which we extract the value|
 +
 +=== Ezample ===
 +
 +Inserts each according to the count value to a device in the buffer (eliminating the first introduced)
 +
 +<code QCL>
 +MAIN:                 
 +      IF tmTimer
 +            tmTimer = 1000
 +            elementIn = count:posit
 +            BC10ArrFifo (BufferS, elementIn, elementOut, PuntatIn,PuntatOut)**
 +      ENDIF
 +</code>
 +
 +=== Note ===
 +
 +  *If the **PuntatIn** parameter or **PuntatOut** parameter is 0, the function take as value, the first element of the buffer and the last element of the buffer.
 +  *The function executes a WAIT every 150ms.