![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/3/8d/38d56254-54fe-46e3-85ae-d3f5260e1091/38d56254-54fe-46e3-85ae-d3f5260e1091-bga5.png)
FX Series Programmable Controlers Applied Instructions 5
5-39
5.4.9 SFWR (FNC 38)
Operation:
The contents of the source device (S) are written to
the FIFO stack. The position of insertion into the
stack is automaticall
calculated b
the PLC.
The destination device (D) is the head address of
the FIFO stack. The contents of D identif
where the
next record will be stored (as an offset from D
+1
).
If the contents of D exceed the value “n-1” (n is the
len
th of the FIFO stack) then insertion into
the FIFO stack is stopped. The carr
fla
M8022 is
turned ON to identif
this situation.
Points to note:
a) FIFO is an abbreviation for ‘First-In/ First-OUT’.
b) Althou
h n devices are assi
ned for the FIFO stack, onl
n
-1
pieces of information ma
be
written to that stack. This is because the head address device (D) takes the first available
re
ister to store the information re
ardin
the next data insertion point into the FIFO stack.
c) Before startin
to use a FIFO stack ensure that the contents of the head address re
ister
(D) are equal to ‘0’ (zero).
d) This instruction should be used in con
unction with SFRD FNC 39. The n parameter
in both
instructions should be equal.
Mnemonic Function
Operands
Program steps
SDN
SFWR
FNC 38
(
Shift
re
ister
write)
This instruction
creates and builds
a FIFO stack n
devices lon
-must
be used with
SFRD FNC 39
K, H,
KnX, KnY,
KnM,KnS,
T, C, D, V, Z
KnY, KnM,
KnS,
T, C, D,
K, H,
Note:
2
≤
n
≤
512
SFWR,
SFWRP:
7 steps
X0
SFWR
D 1 K 10
[ S ] [ D ]
D 0
[ n ]
D 0 D 10 D 9 D 8 D 7 D 6 D 5 D 4 D 3 D 2 D 1
[ S ]
= 10
(3) (2) (1)
[n]