9: S
/ R
I
HIFT
OTATE
NSTRUCTIONS
ROTL (Rotate Left)
ROTL(*)
*****
•
Data Type: Word (bits to rotate = 1)
Before rotation:
After rotation:
•
Data Type: Double Word (bits to rotate = 1)
Before rotation:
CY
MSB
1
M8003
After rotation:
CY
MSB
1
0
M8003
Valid Devices
Device
S1 (Source 1)
bits
For valid device address ranges, see "Device Addresses" on page 2-1.
Special internal relays cannot be designated as S1.
The quantity of bits to rotate can be 1 through 15 for word data, or 1 through 31 for double-word data.
Since the ROTL instruction is executed in each scan while input is on, a pulse input from a SOTU or SOTD instruction should be used.
Valid Data Types
W (word)
X
I (integer)
—
D (double word)
X
L (long)
—
F (float)
—
9-8
When input is on, 16- or 32-bit data of the assigned source device S1 is rotated to the left by the
S1
bits
quantity of bits assigned by device bits.
**
The result is set to the source device S1, and the last bit status rotated out is set to a carry (special
internal relay M8003).
CY
MSB
1
M8003
CY
MSB
1
0
M8003
0
0
1
1
0
1
0
1
0
1
1
0
1
0 1
1
Function
Data for bit rotation
Quantity of bits to rotate
When a bit device such as Q (output), M (internal relay), or R (shift register) is assigned as the source, 16 points
(word data) or 32 points (double-word data) are used.
When a word device such as D (data register) is assigned as the source, 1 point (word data) or 2 points (double-
word data) are used.
FC6A S
MICROS
ERIES
MART
S1
0
0
1
1
0
1
0
1
Rotate to the left
S1
0
1
1
0
1
0 1
1
S1
1
1
0
0
1
1
0
1
0
Rotate to the left
S1
1
0
0
1
1
0
1
0
I
Q
—
X
—
—
L
P
M
ADDER
ROGRAMMING
LSB
1
1
0
0
1
1
0
LSB
1
0
0
1
1
0
1
0
1
1
0
1
0
1
1
0
1
1
0
1
0 1
1
1
M
R
T
C
D
P
X
—
—
X
—
—
—
—
—
—
—
FC9Y-B1726
ANUAL
LSB
1
0
0
1
1
0
LSB
0
0
1
1
0
1
Constant
Repeat
—
—
1-15, 1-31
—