EasyManuals Logo
Home>Mitsubishi>Controller>MELSEC-Q/L

Mitsubishi MELSEC-Q/L User Manual

Mitsubishi MELSEC-Q/L
850 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #332 background imageLoading...
Page #332 background image
330
ROR, RORP, RCR, RCRP
7.2 Rotation instruction
: Head number of the devices to rotate (BIN 16 bits)
n : Number of rotations (0 to 15) (BIN 16 bits)
Function
ROR
(1)
Rotates 16-bit data of the device designated by , 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.
(2) When a bit device is designated for , a rotation is performed within the device range specified by digit specification.
The number of bits by which a rotation is carried out 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.
(3) 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".
7.2.1 ROR, RORP, RCR, RCRPRight rotation of 16-bit data
7.2.1
ROR, RORP, RCR, RCRP
Setting
Data
Internal Devices
R, ZR
J\
U\G
Zn
Constants
K, H
Other
Bit Word Bit Word
–– ––
n ––
Basic
Process
High
performance
Redundant
Universal
LCPU
Command
Command
P
D n
D
n
ROR, RCR
RORP, RCRP
indicates an instruction symbol of ROR/RCR.
D
D
D
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
00000000 0 00001 1
0
Carry flag
(SM700)
D
D
D
0010000000 00000
1
D
Value of b0
Value of b0
0
Carry flag
(SM700)
Right rotation (1 bit)
Right rotation (1 bit)
1
Value of b0
0
0010000 0 0
0
0000
1
Value of b0
Carry flag
(SM700)
0
Value of b(n-1)
Carry flag
(SM700)
Right rotation (n bits)
Value of b(n-1)
D

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC-Q/L and is the answer not in the manual?

Mitsubishi MELSEC-Q/L Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC-Q/L
CategoryController
LanguageEnglish

Related product manuals