Справочник Пользователя для Mitsubishi Electronics MELSEC -Q/L

Скачать
Страница из 1086
7  APPLICATION INSTRUCTIONS
7.2  Rotation Instructions
387
7
Right rotation of 32-bit data
DROR(P), DRCR(P)
Processing details
DROR
 • The 32-bit data of the device designated at (D), not including the carry flag, is rotated n-bits to the right. The carry flag turns 
ON or OFF depending on its status prior to the execution of the DROR instruction.
 • When a bit device is designated for (D), a rotation is performed within the device range specified by digit specification. The 
number of bits by which a rotation is executed is the remainder of n / (specified number of bits). For example, when n = 31 
and (specified number of bits) = 24 bits, the remainder of 31 / 24 = 1 is "7", and the data is rotated 7 bits.
 • 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 = 34, the contents are rotated two bits to the right since the remainder of 34 / 32 = 1 is "2".
DRCR
 • Rotates 32-bit data of the device designated by (D), including the carry flag, n-bits to the right. The carry flag goes ON or 
OFF depending on its status prior to the execution of the DRCR instruction.
 • When a bit device is designated for (D), a rotation is performed within the device range specified by digit specification. The 
number of bits by which a rotation is executed is the remainder of n / (specified number of bits). For example, when n = 31 
and (specified number of bits) = 24 bits, the remainder of 31 / 24 = 1 is "7", and the data is rotated 7 bits.
 • 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 = 34, the contents are rotated two bits to the right since the remainder of 34 / 32 = 1 is "2".
(D):   Head number of the devices to rotate (BIN 32 bits)
n:  
Number of rotations (0 to 31) (BIN 16 bits)
Setting 
data
Internal device
R, ZR
J\
U\G
Zn
Constant
K, H
Others
Bit
Word
Bit
Word
(D)
n
Basic
Process
High
performance
Redundant Universal
LCPU
Command
Command
P
D
n
D
n
DROR, DRCR
DRORP, DRCRP
indicates an inst
ruction symbol of DROR/DRCR.
b2
b16
b31
b17
b30b29b28b27
b18
b15b14
b5 b4 b3
Carry flag
(
SM700)
b1 b0
 +
1
n-bit rotation
D
D
b2
b1
6
b
31
b1
7
b
30b29b28b27
b1
8
b1
5b14
b
5 b4 b3
Ca
rry flag
(SM700)
b1 b
0
D
D
n-bit 
rotation
+1