681
FX
3G
/FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
27 Data Operation 3 – FNC210 to FNC219
27.3 FNC212 – POP / Shift Last Data Read [FILO Control]
21
FN
C
160-
FN
C
169
R
eal T
im
e C
lo
ck
C
ont
ro
l
22
FN
C
170-
FN
C
179
Exter
nal D
ev
ice
23
FN
C
180
Al
ter
nate
In
str
uc
tions
24
FN
C
181-
FN
C
189
O
ther
s
25
FN
C
190-
FN
C
199
B
lock D
ata
O
per
at
ion
26
FN
C
200
-F
N
C
20
9
C
har
acter
S
tring
C
ont
ro
l
27
FN
C
210-
FN
C
219
Da
ta
O
per
ation 3
28
FN
C
220-
FN
C
249
Da
ta
C
om
par
ison
29
FN
C
250
-F
N
C
26
9
D
ata T
abl
e
O
per
ati
on
30
FN
C
270-
FN
C
274
Ex
-D
ev
ice
Inv
ert
er
Com
m
s
• Subtract “1” from the value of the pointer data
.
Related device
→
For the zero flag use method, refer to Subsection 6.5.2.
Related instructions
Cautions
• When this instruction is programmed in the continuous operation type, the instruction is executed in every
operation cycle. As a result, an expected operation may not be achieved.
Usually, program this instruction in the “pulse operation type”, or let this instruction be executed by a
“pulsed command contact”.
• When the current value of the pointer
is “0”, the zero flag M8020 turns ON and the instruction is not
executed.
Check in advance using a comparison instruction whether the current value of
satisfies “1
≤
≤
n-1”, and then execute this instruction.
• When the current value of the pointer
is “1”, “0” is written to
and the zero flag M8020 turns
ON.
Error
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is
stored in D8067.
• When
is larger than “n-1” (error code: K6706)
• When
is smaller than “0” (error code: K6706)
Device
Name
Description
M8020
Zero flag
Turns ON when the instruction is executed while the pointer
is “0”.
Instruction
Description
SFWR(FNC 38)
Shift write [for FIFO/FILO control]
SFRD(FNC 39)
Shift read [for FIFO control]
S
Data area
Pointer
S
+n-2
S
+n-1
S
+6
S
+5
S
+3
S
+2
S
+1
S
No data area
Pointer
S
+n-2
S
+n-1
S
+6
S
+5
S
+3
S
+2
S
+1
S
D
S
+4
In the case of K4
K4
→
K3
S
+4
S
S
S
S
S
S
S
S