Right Rotation Of 16-Bit Data: Ror, Rcr - Mitsubishi Electric MELSEC Q Series Programming Manual

Motion controller
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

5 SEQUENCE INSTRUCTIONS FOR MOTION CPU

5.4.25 Right rotation of 16-bit data: ROR, RCR

Setting
data
X
Y
M
(D)
n
[Setting data]
[Function]
Bit device
SM
F
T
C
D
[Instruction]
Command
ROR
Command
RCR
Setting data
(D)
n
(1) Right rotation of 16-bit data (Not include the carry flag) (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.
b15
b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
• Specify any of 0 to 15 as n. If the value specified as n is out of range, the
remainder of n / 16 is used for rotation. (As n is BIN 16 bits unsigned value.) For
example, when n=18, the contents are rotated two bits to the right since the
remainder of 18 / 16 = 1 is "2".
Usable device
Word device
W
T
C
SD
Z
ROR
RCR
Number of device where right rotation data is stored. (BIN 16 bits)
(D)
n-bit rotation
5 - 59
Constant
Pointer
Level
K
H
P
N
(D)
n
(D)
n
Description
Times (0 to 15)
Carry flag
(SM12)
Digit
desig-
Index
nation
: Usable

Advertisement

Table of Contents
loading

Table of Contents