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

Скачать
Страница из 1086
7  APPLICATION INSTRUCTIONS
7.2  Rotation Instructions
381
7
7.2
Rotation Instructions
Right rotation of 16-bit data
ROR(P), RCR(P)
Processing details
ROR
 • Rotates 16-bit data of the device designated by (D), not including the carry flag, n-bits to the right. The carry flag is ON or 
OFF depending on the status prior to the execution of the ROR 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 = 15 
and (specified number of bits) = 12 bits, the remainder of 15 / 12 = 1 is "3", and the data is rotated 3 bits.
 • Specify any of 0 to 15 as n. If the value specified as n is 16 or greater, the remainder of n / 16 is used for rotation. For 
example, when n = 18, the contents are rotated two bits to the right since the remainder of 18 / 16 = 1 is "2".
(D):   Head number of the devices to rotate (BIN 16 bits)
n:  
Number of rotations (0 to 15) (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
ROR, RCR
RORP, RCRP
indicates an inst
ruction symbol of ROR/RCR.
b8
b15 b14 b13 b12 b11 b10 b9
b7 b6 b5 b4 b3 b2 b1 b0
b8
b15 b14 b13 b12 b11 b10 b9
b7 b6 b5 b4 b3 b2 b1 b0
b8
b15 b14 b13 b12 b11 b10 b9
b7 b6 b5 b4 b3 b2 b1 b0
b8
b15 b14 b13 b12 b11 b10 b9
b7 b6 b5 b4 b3 b2 b1 b0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
Carry flag
(
SM700)
D
D
D
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
D
V
alue of b0
V
alue of b0
0
Carry flag
(
SM700)
Right rotation (1 bit)
Right rotation (1 bit)
1
V
alue of b0
0
0
0
1 0 0 0 0
0
0
0
0
0
0
0
1
V
alue of b0
Carry flag
(
SM700)
0
V
alue of b(n-1)
Carry flag
(
SM700)
Right rotation (n bits)
V
alue of b(n-1)