LFL (LIFO load)
The LFL instruction is used to load the data (8 bit, 16 bit, 32 bit and 64 bit) into a user-created one-dimensional array called LIFO stack. LFL and LFU instructions are used in pairs.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the L20E, L50E, and L70E controllers.
LFL

Parameter | Parameter Type | Data Type | Description |
---|---|---|---|
Execute | Input | BOOL | Instruction block enable.
|
Src | Input | ANY_ELEMENTARY | The Src operand is the address of the value to fill the current available position sin the LIFO stack. Element data types supported:
|
LIFO | Input | ANY_ELEMENTARY | The starting address of the stack. LIFO must be configured the same for the LFL and LFU instructions. Element data types supported:
|
LIFOCon | Input | FF_LF_CON | LIFO configuration and control. The same configuration must be configured for LFL and LFU instructions. Use the FF_LF_CON data type to configure Position and Length. |
Full | Output | BOOL | Indicates when the LIFO stack is full.
|
Empty | Output | BOOL | Indicates when the LIFO stack is empty.
|
Error | Output | BOOL | Indicate the existence of an error condition.
|
ErrorID | Output | USINT | A unique numeric that identifies the error. The errors are defined in the LFL error codes. |
Done | Output | BOOL | Indicate when operation is completed.
|
Error code | Error description |
---|---|
0 | No error. |
1 | LFL Src data type is not supported. |
2 | LFU Dest data type is not supported. |
3 | LIFO data type is not supported. |
4 | Src and Dest data type mismatch with the LIFO data type. Corrective action: LFL Src parameter and LFU Dest parameter data type should match with the LIFO array data type. |
5 | LIFO: Array dimension is not supported. Corrective action: LIFO only supports one-dimensional arrays. |
6 | LIFOCon control Length exceeds LIFO array size. Corrective action: LIFOCon control Length cannot exceed the LIFO array size. |
7 | LIFOCon Length exceeds the max length. |
8 | LIFOCon Length is zero. |
9 | LIFOCon Position exceeds the LIFOCon Length. |
10 | LFL control Length and Position are equal. |
11 | LFU control Position is zero. |
12 | LFL or LFU array dimension is not supported. Corrective action: LFL and LFU only support one-dimensional arrays. |
13 | LFL or LFU DestOffset exceeds Dest array size. |
LFL examples
LFL function block diagram example

LFL ladder diagram example

LFL structured text example

Provide Feedback