322
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.7 FNC 36 – WSFR / Word Shift Right
Caution
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.
Error
If the transfer source
is equivalent to the shifted device
, an operation error occurs (error code:
K6710).
Program example
1. Shifting devices with digit specification
+2
+8
+2
n2 (in the case of "n2=3")
n1 (in the case of "n1=9")
[1]
Overflow (data to
be deleted)
+1
D
+7 +6 +5 +4 +3
D
+1
+8
D
+7 +6 +5
D
+4 +3 +2 +1
+8 to +3 before shift (n2=3)
D
[3] Copy
[2]
"n2" bits are
shifted rightward
(n2=3).
+2 to before shift (n2=3)
S
Before
execution
After
execution
S
S
S
D
D
D
D
D
D
D
D
D
D
D
D
D
D
S
D
S
D
[3]
[2]
[1]
X007 X006 X005 X004 X003 X002 X001 X000
Y017 Y016 Y015 Y014 Y013 Y012 Y011 Y010 Y007 Y006 Y005 Y004 Y003 Y002 Y001 Y000
Make sure that the number of digits is
equivalent (Kn
).
X000
FNC 36
WSFRP
K1X000 K1Y000
K 4
K 2
Specify a same digit for devices with digit specification.
D
S
n1
n2