Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 355

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Processing details
• This instruction shifts the 16-bit binary data in the device specified by (d) to the left by (n) bit(s). The (n) bit(s) from the least
significant bit is/are filled with 0(s).
Ex.
When (n)=8
b15
b14 b13 b12 b11 b10 b9
1
1
1
(SM700)
b15
b14 b13 b12 b11 b10 b9
0
0
0
1
• When (d) is a bit device, bits are shifted to the left within the device range specified by digit specification.
Ex.
When (n)=5
X17
∙∙∙
X14
0
0
1
(SM700)
X17
∙∙∙
X14 X13
1
1
0
0
• The number of bits actually to be shifted is the remainder of (n)(specified number of bits). For example, when (n) is 15 and
the specified number of bits is 8, 7 bits are shifted because 15 divided by 8 equals 1 with a remainder of 7.
• Specify any value between 0 and 15 for (n). If a value 16 or larger is specified, the value is shifted by the remainder value of
n16 to the left. For example, when (n) is 18, 2 bits are shifted to the left because 18 divided by 16 equals 1 with a
remainder of 2.
Operation error
There is no operation error.
b8
b7
b6 b5 b4 b3 b2 b1
1
0
0
1
1
0
0
0
b8
b7
b6 b5 b4 b3 b2 b1
0
1
1
1
1
0
0
0
X13
∙∙∙
X10
1
0
0
1
1
X12
∙∙∙
X10
1
1
0
0
0
0
b0
0
1
1
1
1
(d)
b0
(d)
0
0
0
0
0
0
6 BASIC INSTRUCTIONS
353
6.5 Shift Instructions
6

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents