Rotr (Rotate Right) - IDEC MICROSmart FC6A Series Ladder Programming Manual

Automation organizer windldr
Hide thumbs Also See for MICROSmart FC6A Series:
Table of Contents

Advertisement

9: S
/ R
I
HIFT
OTATE
NSTRUCTIONS

ROTR (Rotate Right)

ROTR(*)
*****
Data Type: Word (bits to rotate = 1)
Before rotation:
After rotation:
Data Type: Double Word (bits to rotate = 1)
Before rotation:
MSB
1
0
0
1
After rotation:
MSB
0
1
0
0
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 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
W (word)
X
I (integer)
D (double word)
X
L (long)
F (float)
9-10
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.
S1
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).
MSB
1
MSB
0
1
0
1
0
1
1
1
0
0
Rotate to the right
1
1
0 1
0
1
1
1
0
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
1
Rotate to the right
S1
1
0
0
1
1
0 1
0
1
S1
1
1
0
1
0
0
1
1
S1
0
1 1
0
1
0
0
1
I
Q
X
L
P
M
ADDER
ROGRAMMING
ANUAL
LSB
1
0
0
1
1
0
M8003
LSB
1
1
0
0
1
1
M8003
0
1
0
1
1
1
0
0
1
1
0 1
0
1
1
1
0
0
M
R
T
C
D
P
X
X
FC9Y-B1726
CY
CY
0
LSB
CY
1
0
M8003
LSB
CY
1 1
0
M8003
Constant
Repeat
1-15,
1-31

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents