9: S
HIFT
/ R
OTATE
I
NSTRUCTIONS
9-10
FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726
ROTR (Rotate Right)
Valid Devices
For valid device address ranges, see "Device Addresses" on page 2-1.
Special internal relays cannot be designated as S1.
The number of bits that can be rotated is 1 through 15 for word data, or 1 through 31 for double-word data.
Since the ROTR 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 right 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 special internal
relay M8003 (carry or borrow).
S1
*****
bits
**
ROTR(*)
Before rotation:
1
0
1
0
1
0
1
0 1
1
1
1
0
1
0
0
CY
M8003
MSB
LSB
S1
0
After rotation:
1
1
1
0
0
0
0 1
1
0
0
1
0
1
1
CY
M8003
MSB
LSB
S1
1
Rotate to the right
•
Data Type: Word (bits to rotate = 1)
Before rotation:
1
0
1
0
1
0
1
0 1
1
1
1
0
1
0
0
CY
M8003
MSB
LSB
S1
0
After rotation:
CY
M8003
MSB
LSB
S1
Rotate to the right
1
0
1
0
1
0
1
0 1
1
1
1
0
1
0
0
•
Data Type: Double Word (bits to rotate = 1)
1
1
1
0
0
0
0 1
1
0
0
1
0
1
1 1
1
1
1
0
0
0
0 1
1
0
0
1
0
1
1 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)
—
Summary of Contents for MICROSmart FC6A Series
Page 1: ...B 1726 7 FC6A SERIES Ladder Programming Manual ...
Page 8: ...Preface 7 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 32: ...1 OPERATION BASICS 1 20 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 96: ...3 INSTRUCTIONS REFERENCE 3 18 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 130: ...4 BASIC INSTRUCTIONS 4 34 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 192: ...9 SHIFT ROTATE INSTRUCTIONS 9 12 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 272: ...12 DISPLAY INSTRUCTIONS 12 24 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 284: ...14 REFRESH INSTRUCTIONS 14 6 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 502: ...25 DATA LOG INSTRUCTIONS 25 22 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 546: ...26 SCRIPT 26 44 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 598: ...APPENDIX A 14 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...