191
4
4 Instructions 4.5.3 Table Operation
POP: Last-in data read
◆
Overview
The POP instruction reads the data that is last written by the SFWR instruction which is used for shifted
write operation with rst in last out (FILO) control.
POP S D n
Last-in data read Applicable model:
H3U
S
Data to be
read
Start number of elements that store rst-in data
(including pointer data)
S: Pointer data (number of stored data entries)
S+1: Data area
7-bit instruction (7
steps)
POP: Continuous
execution
POPP: Pulse
execution
D
Stored
result
Number of the element that stores the last-out data
n Data count
Number of stored data points
(Because pointer data is also included, set n to a
value plus 1. The value range is 2 ≤ n ≤ 512.)
◆
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
S X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
n X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.
◆
Function
For the word elements in the range [S–S+n-1], the POP instruction reads the values in elements from head
address S as well as the offset pointer (pointer data) in [S]. The result is stored in [D]. The pointer in [S] is
decremented by 1. The value of n ranges from 2 to 512.
Description
S Pointer data (number of stored data entries)
[S]+1
Data area
(First-in data written by the SFWR instruction)
[S]+2
[S]+3
–
[S]+n-3
[S]+n-2
[S]+n-1