Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 353

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

Advertisement

Processing details
• These instructions shift the 16-bit binary data in the device specified by (d) to the right by (n) bit(s). The (n) bit(s) from the
most significant bit is/are filled with 0(s).
Ex.
When (n)=6
b15
b14 b13 b12 b11 b10 b9
(d)
1
1
1
0
1
1
1
b15
b14 b13 b12 b11 b10 b9
0
0
0
0
0
0
1
(d)
0
• When (d) is a bit device, bits are shifted to the right within the device range specified by digit specification.
Ex.
When (n)=4
Y1B
∙∙∙
Y18
Y17
∙∙∙
Y14 Y13
1
0
1
0
1
0
1
0
Y1B
∙∙∙
Y18
Y17
∙∙∙
Y14 Y13
0
0
0
0
1
0
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 bigger is specified, bits are shifted by the remainder value of
n16. For example, when (n) is 18, 2 bits are shifted to the right 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
0
1
1
1
0
1
1
1
b8
b7
b6 b5 b4 b3 b2 b1
1
1
0
1
1
1
0
1
∙∙∙
Y10
1
0
1
0
(SM700)
∙∙∙
Y10
1
0
1
0
1
b0
0
(SM700)
b0
1
1
6 BASIC INSTRUCTIONS
351
6.5 Shift Instructions
6

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents