Instruction Parameters
Supported PLC Series
| PLC-AES | PLC-FB | PLC-ES |
|---|---|---|
| ✓ | ✓ | ✓ |
Supported Data Registers
| M | X | Y | K | L | F | T | C | S | Z | R | Q | D | @D | Constant | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DEV | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | – | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| TBL | – | – | – | – | – | – | – | – | – | ✓ | ✓ | ✓ | ✓ | ✓ | – |
Supported Flags
| Flag | Bit | Support |
|---|---|---|
| Error | F11.0 | ✓ |
| Zero | F11.1 | – |
| Carry | F11.2 | – |
Number of Steps
| Steps |
|---|
| 3 |
Operands
| Operand | Description |
|---|---|
| DEV | The first operand. Entries are WORD data registers or constants. This is the storage location for the first value read. |
| TBL | The second operand. Entries are only WORD data registers. This is the starting address for the table. |
Notice
Error Flag (F11.0) Notice
The error flag, F11.0, will be ON for one scan when the address of the data register assigned by @D exceeds the range of the data register, D. The range of the data register, D, is dependent on the CPU type. F11.0 turns ON when the data table exceeds the range of the corresponding data register.
Instruction Behavior
The FPOP and FPOPP instructions behave as follows:
- The newest value, or last value, in TBL + n is read.
- n is an integer number representing the amount of data saved in the table, TBL.
- The table will remove this value and decrease the overall amount by 1.
- The first value of TBL is an integer number representing the amount of data saved in the table, TBL.
Ladder Diagram Examples
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.

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.

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.

