E L C P r o g r a m m i n g M a n u a l
F o r m o r e i nf o r m a t i o n v i sit :
w w w. e a t o n . c o m
MN05003003E
3-84
API Mnemonic
Operands
Function
32
D RCR P
D, n
Rotate Right with Carry
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX
KnY
KnM KnS T
C D E
F
D
*
*
*
*
*
*
*
*
n
*
*
RCR, RCRP: 5 steps
DRCR, DRCRP: 9 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32 16
P
32 16
P
32 16
P
32 16 P 32 16 P
Operands:
D
: Address to be rotated
n
: Number of bits to be rotated in 1 rotation
Description:
1.
All the bits of
D
are rotated
n
bit places to the right including the carry flag on every operation
of the instruction, which could be every scan.
2.
The status of the last bit rotated is moved into the carry flag M1022. On the following
operation of the instruction M1022 is the first bit to be moved back into the destination
device.
3.
This instruction works best with the pulse instruction (RCRP, DRCRP).
4. If
operand
D
uses index F, then only 16-bit instruction is available.
5. If
operand
D
is specified as KnY, KnM, KnS, only K4 (16-bit) and K8 (32-bit) are valid.
6.
Valid range of operand
n
: 1
≤
n
≤
16 (16-bit), 1
≤
n
≤
32 (32-bit)
Program Example:
When X0 goes from OFF
→
ON, the 16 bit value in D10, including the carry flag (M1022) will rotate
4 bits to the right, as shown in the diagram. b3 (prior to rotation) will be moved to the carry flag
M1022, and the original contents of the carry flag M1022 will be moved to bit b12.
0 0 0
1 1
1 0 0
0
1 0
0
1
0 0
1
1
0 0 0
1 1
0 0
1
1
1
0
0
0
0
0
1
X0
D10
K4
Rotate to the right
16 bits
Carry
flag
Carry
flag
After one rotation
to the right
Lower bit
Lower bit
Upper bit
Upper bit
1
D10
D10
RCRP
M1022
M1022
Summary of Contents for ELC-PB
Page 1: ......
Page 5: ...For more information visit www eaton com MN05003003E iv...
Page 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Page 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Page 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Page 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...