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

Parameter | Parameter Type | Data Type | Description |
---|---|---|---|
Execute | Input | BOOL | Instruction block enable.
|
Dest | Input | ANY_ELEMENTARY | Holds the value that exists in the LIFO stack. Elementary data types supported for Dest:
|
DestOffset | Input | UINT | Destination element offset. Element offset if destination is array data type, otherwise offset should be set to 0. For array data type, to unload to the first element, the offset should be set as 0. |
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.
|
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 LFU 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. |
LFU examples
LFU function block diagram example

LFU ladder diagram example

LFU structured text example

Provide Feedback