Example - Ladder Diagram
FPOP
The FPOP instruction reads the newest value, or the last value added, from the table, TBL, and stores the result in an assigned WORD data register, DEV.
Ladder Diagram Example
Currently, the data register, D50, has a value of 8.
Additionally, the data register, D60, has a value of 0.
![]()
When the contact, M2.0, is powered ON (1), the FPOP instruction pops the specified value, TBL (D50), and saves the value in the data register, D60.
The value of the data register, D58, is set to 0.
The previous value of the data register, D58, 7,645, is saved in the data register, D60
![]()
When the FPOP innstruction executes again, the data register, D50, decreases by one to 7.
The value of the data register, D57, is set to 0.
The previous value of the data register, D57, -345, is saved in the data register, D60
The previous value saved in the data register, D60, is discarded.
![]()
FPOPP
The FPOPP one-shot instruction reads the newest value, or the last value added, from the table, TBL, and stores the result in an assigned WORD data register, DEV.
Every time this instruction executes, it energizes the output only once.
Ladder Diagram Example
Currently, the data register, D70, has a value of 3.
Additionally, the data register, D80, has a value of 0.
![]()
When the contact, M2.1, is powered ON (1), the FPOPP instruction pops the specified value, TBL (D70), and saves the value in the data register, D80.
The value of the data register, D74, is set to 0.
The previous value of the data register, D74, 4,653, is saved in the data register, D80
![]()
When the FPOP innstruction executes again, the data register, D50, decreases by one to 7.
The value of the data register, D57, is set to 0.
The previous value of the data register, D57, -345, is saved in the data register, D60
The previous value saved in the data register, D60, is discarded.
![]()