Справочник Пользователя для Mitsubishi Electronics FX3G
311
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
Series
Programming Manual - Basic & Applied Instruction Edition
11 Rotation and Shift Operation – FNC 30 to FNC 39
11.9 FNC 38 – SFWR / Shift Write [FIFO/FILO Control]
11
FN
C30
-FN
C3
C30
-FN
C3
9
R
ota
tion and
Shi
ft
ft
12
FN
C40-FN
C40-FN
C49
D
ata O
perati
perati
on
13
FNC
50-FNC
59
High-Speed
Proc
essing
14
FM
C60-FN
C60-FN
C69
H
andy
In
struction
15
FN
C70-FN
C70-FN
C79
E
xternal
F
X
I/O
De
vice
16
FNC
80-FNC
89
External
FX
Dev
ice
ice
17
FNC1
00-
FNC10
00-
FNC10
9
Dat
a
a
Transfer 2
18
FNC1
10-
FNC139
FNC139
Fl
oati
ng Poi
nt
19
FNC14
0-F
N
C
149
Da
ta
Operation 2
20
FNC1
50-
FNC159
FNC159
Pos
itioning
itioning
Control
Explanation of function and operation
1. 16-bit operation (SFWR and SFWRP)
The contents of
are written to "n-1" devices from
+1, and "1" is added to the number of data stored in
.
For example, when
= 0, the contents of
are written to
+1. When
= 1, the contents of
are written to
+2.
1) When X000 turns from OFF to ON, the contents of
are stored to
+1. So the contents of
+1
become equivalent to
.
2) When the contents of
are changed and then the command input is set from OFF to ON again, the new
contents of
are stored to
+2. So the contents of
+2 become equivalent to
. (When the
continuous operation type SFWR instruction is used, the contents are stored in each operation cycle. Use the
pulse operation type SFWRP instruction in programming.)
pulse operation type SFWRP instruction in programming.)
3) Data is stored from the right end in the same way, and the number of stored data is specified by the contents of
the pointer
.
Related device
→ For the carry flag use method, refer to Subsection 6.5.2.
Related instructions
Caution
1. In the case of continuous operation type (SFWR) instruction
Note that data is stored (overwritten) in each scan time (operation cycle).
Device
Name
Description
M8022
Carry
When the contents of the pointer
exceeds "n-1", no operation is executed (so data is not written)
and the carry flag M8022 turns ON.
Instruction
Description
SFRD (FNC 39)
Shift read (for FIFO control)
POP (FNC212)
Shift last data read (for FILO control)
S
D
D
D
S
D
D
S
D
n
Command
input
FNC 38
SFWRP
SFWRP
D
S
Before
execution
After
execution
D
D+n
...
D+2
D+10 D+9 D+8 D+7 D+6 D+5 D+4 D+3
D+1
n
S
D
D+n
...
D+2
D+10 D+9 D+8 D+7 D+6 D+5 D+4 D+3
S
D
D+n
...
S
D+10 D+9 D+8 D+7 D+6 D+5 D+4 D+3
S
+1
→
D
+1
→
Executed at the 2nd time
(K1)
(K0)
(K2)
(K1)
Executed at the 1st time
( = 0)
( = 0)
D
Pointer
Pointer
Pointer
S
D
D
D
S
S
D
D
S
S
S
D
D
S
D
D