N-Bit Shift To Right Or Left Of 16-Bit Data: Sfr, Sfl - Mitsubishi Electric MELSEC Q Series Programming Manual

Motion controller
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

5 SEQUENCE INSTRUCTIONS FOR MOTION CPU

5.4.29 n-bit shift to right or left of 16-bit data: SFR, SFL

Setting
data
X
Y
M
(D)
n
[Setting data]
[Function]
Bit device
SM
F
T
C
D
[Instruction]
Command
SFR
Command
SFL
Setting data
(D)
n
(1) n-bit shift to right of 16-bit data (SFR)
• Causes a shift to the right by n bits of the 16-bit data from the device designated
at (D).
The n bits from the upper bit are filled with 0s.
(D) before execution
(D) after execution
• Specify any of 0 to 15 as n. If the value specified as n is out of range, the
remainder of n / 16 is used for rotation. (As n is BIN 16 bits unsigned value.) For
example, when n=18, the contents are rotated two bits to the right since the
remainder of 18 / 16 = 1 is "2".
Usable device
Word device
W
T
C
SD
Z
SFR
SFL
Number of the devices where shift data is stored (BIN 16 bits)
Number of shifts (0 to 15)
b15
n
0
0
0 is entered
5 - 67
Constant
Pointer
Level
K
H
P
N
(D)
n
(D)
n
Description
n
b0
Carry flag
Digit
desig-
Index
nation
: Usable
(SM12)

Advertisement

Table of Contents
loading

Table of Contents