9: S
HIFT
/ R
OTATE
I
NSTRUCTIONS
9-8 FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726
ROTL (Rotate Left)
Valid Devices
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
When input is on, 16- or 32-bit data of the assigned source device S1 is rotated to the left by the
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).
Before rotation: 1 0 1010 1 0 1 1 1101 0 0
CY
M8003
MSB LSB
S1
1After rotation: 0 1010 1 0 1 1 1101 0 0
CY
M8003
MSB LSB
S1
1
Rotate to the left
Before rotation:
1 0 1010 1 0 1 1 1101 0 0
CY
M8003
MSB LSB
S1
1
After rotation:
10 1010 1 0 1 1 1101 0 0
CY
M8003
MSB LSB
S1
Rotate to the left
10 1010 1 0 1 1 1101 0 0
1 0 1010 1 0 1 1 1101 0 0
• Data Type: Double Word (bits to rotate = 1)
• Data Type: Word (bits to rotate = 1)
Device Function I Q M R T C D P Constant Repeat
S1 (Source 1) Data for bit rotation — X X — — X — — —
bits Quantity of bits to rotate — — — — — — — — 1-15, 1-31 —
W (word) X 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.
I (integer) —
D (double word) X
L (long) —
F (float) —