stackint
Function Block - Manages a stack of DINT integers.
Inputs
|
Input |
Data Type |
Range |
Unit |
Default |
Description |
|---|---|---|---|---|---|
|
PUSH |
BOOL |
|
|
|
|
|
POP |
BOOL |
|
|
|
|
|
R1 |
BOOL |
|
|
|
|
|
IN |
DINT |
|
|
|
Value to be pushed on a rising pulse of PUSH. |
|
N |
DINT |
|
|
|
|
Outputs
|
Output |
Data Type |
Range |
Unit |
Description |
|---|---|---|---|---|
|
EMPTY |
BOOL |
|
|
TRUE if the stack is empty. |
|
OFLO |
BOOL |
|
|
TRUE if the stack is full. |
|
OUT |
DINT |
|
|
Value at the top of the stack. |
Remarks
- Push and pop operations are performed on rising pulse of PUSH and POP inputs.
- The specified size (N) is taken into account only when the R1 (reset) input is TRUE.
FBD Language Example
FFLD Language Example
- In the FFLD language, the input rung is the PUSH command.
- The output rung is the EMPTY output.
IL Language Example
Not available.
ST Language Example
(* MyStack is a declared instance of STACKINT function block *)
MyStack (PUSH, POP, R1, IN, N);
EMPTY := MyStack.EMPTY;
OFLO := MyStack.OFLO;
OUT := MyStack.OUT;
See Also




