278
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
11 Rotation and Shift Operation – FNC 30 to FNC 39
11.5 FNC 34 – SFTR / Bit Shift Right
Explanation of function and operation
1. 16-bit operation (SFTR and SFTRP)
For "n1" bits (shift register length) starting from
, "n2" bits are shifted rightward ([1] and [2] shown
below).
After shift, "n2" bits from
are transferred to "n2" bits from
+n1-n2 ([3] shown below).
Caution
Note that "n2" bits are shifted every time the command input turns ON from OFF in SFTRP instruction, but
that "n2" bits are shifted in each scan time (operation cycle) in SFTR instruction.
Error
If the transfer source
is equivalent to the shifted device
, an operation error occurs (error code:
K6710).
D
S
D
Command
input
FNC 34
SFTRP
n1
n2
D
S
+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)
S
+1
+7
D
+6 +5 +4 +3
D
+1
+8
D
+7 +6 +5
D
+4
D
+3
D
+2
D
+1
D
D
[3] Copy
[2]
"n2" bits are
shifted rightward
(n2=3).
+2 to before shift (n2=3)
S
S
D
D
D
D
D
D
D
D
D
+8 to +3 before shift (n2=3)
D
D
S
S
S
D