Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 536

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

Advertisement

Processing details
■DROR(P)
• These instructions rotate the 32-bit binary data in the device specified by (d) to the right by (n) bit(s), excluding the carry
flag (SM700). The carry flag (SM700) is on or off depending on the status prior to the execution of the DROR(P) instruction.
(d)+1
b31
b30 b29 b28 b27
• When (d) is a bit device, bits are rotated to the right within the device range specified by digit specification. The number of
bits actually to be rotated is the remainder of (n)(specified number of bits). For example, when (n) is 31 and the specified
number of bits is 24, 7 bits are rotated because 31 divided by 24 equals 1 with a remainder of 7.
• Specify any value between 0 and 31 for (n). If a value 32 or bigger is specified, bits are rotated by the remainder value of
n32. For example, when (n) is 34, 2 bits are rotated because 34 divided by 32 equals 1 with a remainder of 2.
■DRCR(P)
• These instructions rotate the 32-bit binary data in the device specified by (d) to the right by (n) bit(s), including the carry flag
(SM700). The carry flag (SM700) is on or off depending on the status prior to the execution of the DRCR(P) instruction.
(d)+1
b31
b30 b29 b28 b27
• When (d) is a bit device, bits are rotated to the right within the device range specified by digit specification. The number of
bits actually to be rotated is the remainder of (n)(specified number of bits). For example, when (n) is 31 and the specified
number of bits is 24, 7 bits are rotated because 31 divided by 24 equals 1 with a remainder of 7.
• Specify any value between 0 and 31 for (n). If a value 32 or bigger is specified, bits are rotated by the remainder value of
n32. For example, when (n) is 34, 2 bits are rotated because 34 divided by 32 equals 1 with a remainder of 2.
Operation error
There is no operation error.
7 APPLICATION INSTRUCTIONS
534
7.1 Rotation Instructions
b18 b17
b16
b14
b5 b4 b3 b2 b1
b15
Right rotation by (n) bits
b18 b17
b16
b15
b14
b5 b4 b3 b2 b1
Right rotation by (n) bits
(d)
(SM700)
b0
(d)
(SM700)
b0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents