Shift Instruction; N-Bit Shift To Right Or Left Of 16-Bit Data (Sfr(P),Sfl(P)) - Mitsubishi MELSEC Q Series Programming Manual

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

SFR(P),SFL(P)
7.3

Shift instruction

7.3.1

n-bit shift to right or left of 16-bit data (SFR(P),SFL(P))

SFR(P),SFL(P)
SFR, SFL
SFRP, SFLP
Setting
Data
D
n
Function
SFR
(1) Causes a shift to the right by n bits of the 16-bit data from the device designated at
The n bits from the upper bit are filled with 0s.
(2) When a bit device is designated for
specified by digit specification.
7-46
Command
Command
: Head number of the devices where shift data is stored (BIN 16 bits)
D
n
: Number of shifts (0 to 15) (BIN 16 bits)
Internal Devices
R, ZR
Bit
Word
b15
b14 b13 b12 b11b10 b9
D
1
1
1
0
1
1
1
When n=6:
b15
b14 b13 b12 b11b10 b9
0
0
0
0
0
0
1
D
Filled with 0s.
Y1B
Y18
Y17
1
0
1
0
1
When n = 4:
Y1B
Y18
Y17
0
0
0
0
1
Filled with 0s.
High
Basic
performance
indicates an instruction symbol of SFR/SFL.
J
\
U
\G
Bit
Word
b8
b7
b6 b5 b4 b3 b2 b1
0
1
1
1
0
1
1
1
b8
b7
b6 b5 b4 b3 b2 b1
1
1
0
1
1
1
0
1
, a right shift is executed within the device range
D
Y14 Y13
Y10
0
1
0
1
0
1
0
Y14 Y13
Y10
0
1
0
1
0
1
0
Process
Redundant Universal
n
D
P
D
n
Constants
Zn
K, H
––
b0
0
Carry flag
(SM700)
b0
1
1
Carry flag
(SM700)
1
LCPU
Other
––
––
.
D

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents