3 Explanation of the blocks
3.5 Data handling
3.5 Data handling
354 LGF_FIFO
Short description
This block stores incoming orders/data and outputs the oldest order that is not yet
procesced
Block
Figure 9-94 FBLGF_FIFO
FELGEFFO
aoo. _|ewane enor] 8001
B00 —| mode stotsio [unt
VARIANT —]inialvatue stati [WORD
BOOL | resetButer
variant __| tem (nou
VARIANT —] butler nou
Input parameters
fers ans ae
eae BOoL | Request fapans
‘TRUE: Writing of the value from “item” into "butfer*
FALSE: Reading of the value from "buffer" and output to
intialValue VARIANT __| Value for initializing the butfer (usually: 0)
resetButter BOOL Emptying and intaizing the buffer.
Inputioutput parameters (InOut)
Table 3-69: Inputfoutput parameters (InOut)
Parameters Data type Description
item VARIANT | Value that will be returned from the buffer or written into the
ring buffer.
buffer VARIANT | Buffer (Array of ..)
Library of General Functions (LF)
Enuy ID: 103479728, v4.0.3, 02/2019 603 Explanation of the blocks
3.5 Data handling
Output parameters
Table 3-70: Output parameters
Parameters: Data type Description
‘error BOOL FALSE: No error
‘TRUE: Error in the block, "stalusID” outputs the error source,
talus" outputs the error code,
| SstatusiD* outputs the ID of the block that reports the status.
statusiD UINT
See table below.
status WORD "status" outputs the status/error code (see following table),
Status and error displays
Table 3-71: Statuslerror codes
statusiD | status Remedy / notes
1 16 #7000 | Initial value :
1 1160000 | No error :
1 11688001 | The buffer is empty -
1 11688002 | The buffer is full
1 11688200 | There is no array on the "buffer input. | -
1 1688201 | The data type of the InOut parameter | -
“item* does not equal the data type of
the array elements of the input
"butter
1 16#8202 | The data type of the input
“initialValue" does not equal the data
type of the InOut parameter "item"
1 16#8601 | The variable “nextEmptyltemindex" | -
does not le within the array
boundaries.
1 ‘16#8602 | The variable “frstitemindex’ is not
within the array boundaries.
2 ~ | Erroristatus of subordinate block
"MOVE_BLK_VARIANT".
Note _[f"statusID" > 1, all values of the output “status” originate directly from called
instructions (see table output parameters). In this case, get the information from
the TIA Portal Online Help for the respective instructions.
Note In computer
nce, the queue is also based on the FIFO principle
Library of General Functions (LF)
Enuy ID: 103479728, v4.0.3, 02/2019 613 Explanation of the blocks
3.5 Data handling
Principle of operation
For the block to be started, a positive edge must be detected on the “execute”
input.
To request the next read job to be processed, the value "FALSE" must be applied
‘on the "mode" input. If this is the case, the next job/data to be processed will be
‘output on the InOut parameter "item" and this field in the butfer will be replaced by
the value on the parameter “initialValue"
To store a new write job in the buffer, the value "TRUE" must be applied on the
"mode" input. If this Is the case, the value or job present on the InOut parameter
item* will be stored in the buffer at the next free location.
If the value "TRUE" is present at the input “resetBuffer" during a pass, all fields in
the buffer are reset to the value specified at the input "InitialValue". The buffer can
then again be filled with jobs/data,
Library of General Functions (LF)
Enuy ID: 103479728, v4.0.3, 02/2019 62