Dror, Drorp, Drcr, Right Rotation Of 32-Bit Data - Mitsubishi MELSEC-Q/L Programming Manual

Table of Contents

Advertisement

(2) The following program rotates the contents of D0, including the carry flag, 3 bits to the left when XC is turned ON.
[Ladder Mode]
[Operation]
Carry flag
(SM700)
b15
1
*
Carry flag
(SM700)
b15
1
1
Content of b12
Content of b13
before execution
before execution
* ON/OFF status of the carry flag depends on its status before the execution of RCL.
7.2.3

DROR, DRORP, DRCR, Right rotation of 32-bit data

7.2.3
DRCRP
DROR, DRORP, DRCR, DRCRP
DROR, DRCR
DRORP, DRCRP
: Head number of the devices to rotate (BIN 32 bits)
D
n
: Number of rotations (0 to 31) (BIN 16 bits)
Internal Devices
Setting
Data
Bit
D
n
Function
DROR
(1) The 32-bit data of the device designated at
The carry flag turns ON or OFF depending on its status prior to the execution of the DROR instruction.
b31
(2) When a bit device is designated for
The number of bits by which a rotation is executed is the remainder of n/(specified number of bits).
For example, when n
rotated 7 bits.
(3) Specify any of 0 to 31 as n.
If the value specified as n is 32 or greater, the remainder of n / 32 is used for rotation.
For example, when n
[List Mode]
Step
b14 b13 b12 b11b10 b9
b8
b7
1
1
1
0
0
0
0
0
b14 b13 b12 b11b10 b9
b8
b7
0
0
0
0
0
0
0
0
Contents of b11 to b0
before execution
Command
Command
R, ZR
Word
Bit
, not including the carry flag, is rotated n-bits to the right.
D
D
+1
b30 b29 b28 b27
b18
b17
b16
n-bit rotation
, a rotation is performed within the device range specified by digit specification.
D
31 and (specified number of bits)
34, the contents are rotated two bits to the right since the remainder of 34 / 32
DROR, DRORP, DRCR, DRCRP
Instruction
Device
b6 b5 b4 b3 b2 b1
b0
0
0
0
0
0
0
0
D0
b6 b5 b4 b3 b2 b1
b0
0
0
0
0
1
1
D0
*
Contents of b15 and b14
before execution
Content of carry flag SM700
High
Basic
performance
indicates an instruction symbol of DROR/DRCR.
J
\
U
\G
Word
D
b15b14
b5 b4 b3
b2
b1 b0
24 bits, the remainder of 31/24
Process
LCPU
Redundant Universal
D
n
D
n
P
Constants
Zn
K, H
––
Carry flag
(SM700)
1 is "7", and the data is
1 is "2".
1
2
3
4
4
6
7
8
Other
––
––
335

Advertisement

Table of Contents
loading

Table of Contents