Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
10 Applied Instructions (Rotation and Shift Operation)
10.9 SFWR / Shift Write [FIFO/FILO Control]
220
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Function and operation explanation
1. 16-bit operation (SFWR, SFWRP)
The contents of the device specified by are written to "n-1" devices from the device specified by +1,
and "1" is added to the number of data stored in the device specified by .
For example, when the device specified by is "0", the contents of the device specified by are written
to the device specified by +1. When the device specified by is "1", the contents of the device
specified by are written to the device specified by +2.
1) When X000 turns ON from OFF, the contents of the device specified by are stored to the device
specified by +1. So the contents of the device specified by +1 become equivalent to the
contents of the device specified by .
2) When the contents of the device specified by are changed and then the command input is set to ON
from OFF again, the new contents of the device specified by are stored to the device specified by
+2. So the contents of the device specified by +2 become equivalent to the contents of the
device specified by . (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 indicated by the
contents of the pointer specified by .
Related device
For the carry flag use method, refer to Section 1.3.4.
Related instructions
Cautions
1. In the case of continuous operation type (SFWR) instruction.
Note that data are stored (overwritten) in each scan time (operation cycle).
2. Some restrictions to applicable devices
S1:The FX3G, FX3GC, FX3U and FX3UC PLCs only are applicable.
S2:The FX3U and FX3UC PLCs only are applicable.
Device Name Description
M8022 Carry
When the contents of the pointer specified by exceeds "n-1", no operation is executed (data is not
written) and the carry flag M8022 turns ON.
Instruction Description
SFRD Shift read (for FIFO control)
POP Last-in data read (for FILO control)
Command input
First-in data
Storing device
Number of pieces
of data
SFWR
EN
s
n
ENO
d
dd+n ··· d+2d+10 d+9 d+8 d+7 d+6 d+5 d+4 d+3 d+1
s
n
s
dd+n ··· d+2d+10 d+9 d+8 d+7 d+6 d+5 d+4 d+3 s
s
dd+n ··· sd+10 d+9 d+8 d+7 d+6 d+5 d+4 d+3 s
+1
+1
Executed at the 2nd time
(K1)(K0)
(K2)
(K1)
Executed at the 1st time( = 0)
Pointer
Pointer
Pointer
d
d
d
d
d
Before
execution
After
execution