Rotation Instruction - Mitsubishi MELSEC Q Series Programming Manual

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

7.2

Rotation instruction

7.2.1
Right rotation of 16-bit data (ROR(P),RCR(P))
ROR(P),RCR(P)
ROR, RCR
RORP, RCRP
Setting
Data
D
n
Function
ROR
(1) Rotates 16-bit data of the device designated by
The carry flag is ON or OFF depending on the status prior to the execution of the ROR
instruction.
Command
Command
: Head number of the devices to rotate (BIN 16 bits)
D
n
: Number of rotations (0 to 15) (BIN 16 bits)
Internal Devices
R, ZR
Bit
Word
b15 b14 b13 b12 b11 b10 b9
b8
D
0
0
0
0
0
0
0
b15 b14 b13 b12 b11 b10 b9
b8
D
1
0
0
0
0
0
0
Value of b0
b15 b14 b13 b12 b11 b10 b9
b8
D
0
1
0
0
0
0
0
Value of b0
b15 b14 b13 b12 b11 b10 b9
b8
D
Value of b(n-1)
High
Basic
performance
indicates an instruction symbol of ROR/RCR.
J
\
U
\G
Bit
Word
, not including the carry flag, n-bits to the right.
D
b7 b6 b5 b4 b3 b2 b1 b0
0
0
0
0
0
0
1
0
1
Right rotation (1 bit)
b7 b6 b5 b4 b3 b2 b1 b0
0
0
0
0
0
0
0
1
0
Right rotation (1 bit)
b7 b6 b5 b4 b3 b2 b1 b0
1
0
0
0
0
0
0
0
0
Right rotation (n bits)
b7 b6 b5 b4 b3 b2 b1 b0
ROR(P),RCR(P)
Process
Redundant Universal
D
n
P
D
n
Constants
Zn
Other
K, H
––
Carry flag
(SM700)
0
Carry flag
(SM700)
1
Value of b0
Carry flag
(SM700)
0
Value of b0
Carry flag
(SM700)
Value of b(n-1)
1
2
LCPU
3
4
6
6
7
8
––
––
7-35

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents