en:software:qview:qview_6:qcl_library:bc10arrfifo

This translation is older than the original page and might be outdated. See what has changed.

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.

BC10ArrFifo (Buffer, elementIn, elementOut, PuntatIn, PuntatOut)

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
IN ARRSYS Buffer B/W/L/S Array containing the Buffer
IN SYSTEM ElementIn B/W/L/S Var that contains the value to be placed in the buffer
IN SYSTEM ElementOut B/W/L/S 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)

MAIN:                 
      IF tmTimer
            tmTimer = 1000
            elementIn = count:posit
            BC10ArrFifo (BufferS, elementIn, elementOut, PuntatIn,PuntatOut)**
      ENDIF

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.
  • Last modified: 2019/08/29 17:01