IDEC MICROSmart FC6A Series Ladder Programming Manual page 191

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

Advertisement

Example: ROTR
• Data Type: Word
MOV(W)
S1 –
M8120
ROTR(W)
SOTU
I1
Bits to rotate = 2
Before rotation: D20 = 13
After first rotation: D20 = 16387
After second rotation: D20 = 53248
• Data Type: Double Word
ROTR(D)
SOTU
I1
Bits to rotate = 1
Before rotation: D20·D21 = 851,981
MSB
0
0
0
0
After rotation: D20·D21 = 2,147,909,638
MSB
1
0
0
0
D1 –
REP
13
D20
S1
bits
D20
2
S1
bits
D20
1
0
0
0
0
0
0
0
0
1
Rotate to the right
0
0
0 0
0
0
0
0
0
FC6A S
MICROS
ERIES
M8120 is the initialize pulse special internal relay.
When the CPU starts operation, the MOV (move) instruction sets 13 to data register
D20.
Each time input I1 is turned on, 16-bit data of data register D20 is rotated to the right by
2 bits as assigned by device bits.
The last bit status rotated out is set to special internal relay M8003 (carry or borrow).
MSB
0
0
0
0
0
0
0
MSB
0
1
0
0
0
0
0
MSB
1
1
0
1
0
0
0
Each time input I1 is turned on, 32-bit data of data registers D20 and D21 is rotated to
the right by 1 bit as assigned by device bits.
The last bit status rotated out is set to special internal relay M8003 (carry or borrow).
D20·D21
1
0
1
0
0
0
0
0
D20·D21
1
1 0
1
0
0
0
0
L
P
MART
ADDER
ROGRAMMING
9: S
/ R
HIFT
D20
LSB
0
0
0
0
0
1
1
0
D20
LSB
0
0
0
0
0
0
0
1
D20
LSB
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0 0
0
0
0
0
0
M
FC9Y-B1726
ANUAL
I
OTATE
NSTRUCTIONS
CY
1
M8003
CY
1
0
M8003
CY
0
1
M8003
LSB
CY
1
0
1
M8003
LSB
CY
1
1 0
1
M8003
9-11

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents