Left Rotation Of 16-Bit Data: Rol, Rcl - 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.27 Left rotation of 16-bit data: ROL, RCL

Setting
data
X
Y
M
(D)
n
[Setting data]
[Function]
Bit device
SM
F
T
C
D
[Instruction]
Command
ROL
Command
RCL
Setting data
(D)
n
(1) Left rotation of 16-bit data (Not include the carry flag) (ROL)
• Rotates 16-bit data of the device designated by (D), not including the carry flag,
n-bits to the left. The carry flag is ON or OFF depending on the status prior to
the execution of the ROL instruction.
Carry flag
(SM12)
• 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 left since the
remainder of 18 / 16 = 1 is "2".
Usable device
Word device
W
T
C
SD
Z
ROL
RCL
Number of device where left rotation data is stored. (BIN 16 bits)
b15
b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
n-bit rotation
5 - 63
Constant
Pointer
Level
K
H
P
N
(D)
n
(D)
n
Description
Times (0 to 15)
(D)
Digit
desig-
Index
nation
: Usable

Advertisement

Table of Contents
loading

Table of Contents