Mitsubishi Electronics Mitsubishi Digital Electronics Video Gaming Accessories FX3G 用户手册

下载
页码 936
309
FX
3G
/FX
3U
/FX
3UC
 Series Programmable Controllers
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
C
30
-FN
C
39
R
otati
on and 
Shi
ft
12
FNC4
0-F
NC4
9
D
ata O
per
ati
on
13
FN
C
50-FN
C
59
H
igh S
pe
ed 
P
rocessing
14
FM
C
60-FN
C
69
H
andy 
In
st
ru
ct
ion
15
FNC7
0-F
NC7
9
Ex
ter
nal FX
 I/O
 
D
evice
16
FN
C
80-FN
C
89
Ext
ernal
 FX 
De
vic
e
17
FN
C
100-
FN
C
10
9
Da
ta
 
Transf
er 2
18
FN
C
110-
FN
C
139
Floati
ng Poi
nt
19
FN
C
14
0-F
N
C
149
Da
ta
 
O
per
at
ion 2
20
FN
C
150-
FN
C
159
Posit
ioning 
C
ont
ro
l
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 ON from OFF, 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 to ON from OFF 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.)
3) Data are 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 are 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
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)
D ‚
Pointer
Pointer
Pointer
S ‚
D ‚
D ‚
D ‚
S ‚
   
S
   
D
   
D
   
S
   
S
   
S
   
D
   
D
   
S
   
D
  D