N-Bit Shift To Right Or Left Of N-Bit Data (Sftbr(P),Sftbl(P)) - Mitsubishi MELSEC Q Series Programming Manual

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

Advertisement

7.3.3

n-bit shift to right or left of n-bit data (SFTBR(P),SFTBL(P))

SFTBR(P),SFTBL(P)
SFTBR,SFTBL
SFTBRP,SFTBLP
Setting
Data
D
n1
n2
Function
SFTBR(P)
(1) This instruction shifts the n1 bits data in the devices starting from the device specified by
to the right by n2 bits.
n1=10, n2=4
D
+9
D
+9
0
(2) n1 and n2 are specified under the condition that n1 is larger than n2. If the value of n2 is
equal to or larger than the value of n1, the remainder of n2 / n1 (n2 devided by n1) is used
for a shift.
(3) This instruction specifies n1 ranged from 1 to 64.
(4) Bits starting from the highest bit to n2th bit are filled with 0s. If the value of n2 is larger than
the value of n1, the remainder of n2 / n1 will be 0.
(5) If the value specified by n1 or n2 is 0, the instruction will be not processed.
Command
Command
D
: Head number of the devices to be shifted (bits)
n1 : Number of bits to be shifted (BIN 16 bits)
n2 : Number of shifts (BIN 16 bits)
Internal Devices
R, ZR
Bit
Word
*1
––
––
––
n1
D
+8
D
+7
D
+6
D
+5
0
1
D
D
D
D
+8
+7
+6
+5
0
0
0
1
Filled with 0s
High
Basic
performance
QnU(D)(H)CPU: The serial number (first five digits) is "10102" or later.
QnUDE(H)CPU: The serial number (first five digits) is "10102" or later.
indicates an instruction symbol of SFTBR/SFTBL.
P
J
\
U
\G
Bit
Word
––
n2
D
+4
D
+3
D
+2
D
+1
1
1
1
0
D
D
D
D
+4
+3
+2
+1
1
1
0
1
SFTBR(P),SFTBL(P)
Ver.
Process
Redundant
Universal
D
n1
n2
n1
n2
D
Constants
Zn
Other
K, H
*1 : T, C, ST, and S devices are not available.
D
0
Carry flag
D
(SM700)
1
1
2
LCPU
3
4
6
6
7
––
––
8
––
D
7-51

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents