FB_Stack (Function Block)
A collection whose access/mutation of items is last-in, first-out.
Implements: I_Stack
Properties
_Count
Type: T_Capacity
Number of items in the collection.
_Empty
Type: BOOL
Checks if collection is empty.
_Error_Status
Type: T_Error
Error status of the collection.
_Values
Type: I_Immutable_List
Gets an immutable list of the items in the stack.
Methods
Clear
Empties/Clears/Deletes every item in the stack.
Get
Gets item at the top of the stack.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
Variable to store returned item value. |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Get_Generic
Gets item at the top of the stack as a generic.
Outputs
Name |
Type |
Description |
|---|---|---|
|
Variable to store returned item value |
|
|
|
Pop
Removes item at the top of the stack without returning anything.
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Push
Add item to the top of the stack.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
Item to store. |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Push_Generic
Add generic item to the top of the stack.
Inputs
Name |
Type |
Description |
|---|---|---|
|
Item to store. |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Reverse
Reverses order of items on stack.
Outputs
Name |
Type |
Description |
|---|---|---|
|
|