Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
10 Applied Instructions (Rotation and Shift Operation)
10.7 WSFR / Word Shift Right
214
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Function and operation explanation
1. 16-bit operation (WSFR, WSFRP)
For "n1" word devices starting from the device specified by , "n2" words are shifted rightward (1) and 2)
shown below)
After shift, "n2" words starting from the device specified by are transferred to "n2" words starting from
the device specified by [ +n1-n2] (3) shown below).
Cautions
1) Note that "n2" words are shifted when the drive input turns ON in WSFRP instruction, but that "n2" words
are shifted in each operation cycle in WSFR instruction.
2) Some restrictions to applicable devices
S1:The FX
3S, FX3G, FX3GC, FX3U and FX3UC PLCs only are applicable.
S2:The FX
3G, FX3GC, FX3U and FX3UC PLCs only are applicable.
S3:The FX
3U and FX3UC PLCs only are applicable.
Error
If the transfer source device specified by is equivalent to the shifted device specified by , an
operation error occurs (error code: K6710).
WSFR
EN
s
n1
ENO
d
n2
Word data length
Number of words
Command input
Stored data
Shift data
+2 +8
Before
execution
After
execution
+2
n2 (in the case of "n2 = 3")
n1 (in the case of "n1 = 9")
1)
Overflow
(data to be deleted)
+1
+7 +6 +5 +4 +3 +1
+8 +7 +6 +5 +4 +3 +2 +1
3) Copy
2)
"n2" words are shifted
rightward (n2 = 3).
d d d d d d d d d
s s s
d d d d d dd d d
+2 to before shift (n2 = 3).
s s
+8 to +3 before shift (n2 = 3).
d d