Mitsubishi Electronics FX3G User Manual

Page of 964
302
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.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 from OFF to ON in the 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 
 in FX
3U
/FX
3UC
 PLCs, an operation error occurs
(error code: K6710).
An operation error does not occur in FX
3S
/FX
3G
/FX
3GC
 PLCs.
   
D
   
S
   
D
Command
input
FNC 34
SFTRP
n1
n2
         +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" bits are
shifted rightward
(n2=3).
         +2 to           before shift (n2=3)
         +8 to          +3 before shift (n2=3)
   
S
   
D