Справочник Пользователя для Mitsubishi Electronics FX3G

Скачать
Страница из 964
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
9
R
ota
tion and 
Shi
ft
12
FN
C40-FN
C49
D
ata O
perati
on
13
FNC
50-FNC
59
High-Speed
 
Proc
essing
14
FM
C60-FN
C69
H
andy 
In
struction
15
FN
C70-FN
C79
E
xternal
 F
X
 I/O
 
De
vice
16
FNC
80-FNC
89
External
 FX 
Dev
ice
17
FNC1
00-
FNC10
9
Dat
Transfer 2
18
FNC1
10-
FNC139
Fl
oati
ng Poi
nt
19
FNC14
0-F
N
C
149
Da
ta
 
Operation 2
20
FNC1
50-
FNC159
Pos
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.)
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
Before
execution
After
execution
D+n
...
D+2
D+10 D+9 D+8 D+7 D+6 D+5 D+4 D+3
D+1
n
D+n
...
D+2
D+10 D+9 D+8 D+7 D+6 D+5 D+4 D+3
D+n
...
D+10 D+9 D+8 D+7 D+6 D+5 D+4 D+3
+1 
+1 
Executed at the 2nd time
(K1)
(K0)
(K2)
(K1)
Executed at the 1st time
(         = 0)
Pointer
Pointer
Pointer
   
S
   
D
   
D
   
S
   
S
   
S
   
D
   
D
   
S
   
D
  D