![background image](http://html1.mh-extra.com/html/eaton/elc-pb/elc-pb_programming-manual_4017452254.webp)
3 . I n s t r u c t i o n S e t
M N050 03003E F or mo re infor ma tio n vi sit:
w w w. e a t o n . c o m
3-85
API Mnemonic
Operands
Function
33
D RCL P
D, n
Rotate Left 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
*
*
RCL, RCLP: 5 steps
DRCL, DRCLP: 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 left 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 (RCLP, DRCLP).
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) is 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 left, as shown in the diagram. b12 (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 b3.
X0
D10
K4
1 1 1
1 1
1 0 0
0
0 0
1
1
0 0
0
1
1 0 0 0
0 0
1
0
0
0
0
1
1 1
1
16 bits
Rotate to the left
After one rotation
to the left
Carry
flag
Carry
flag
Upper bit
Lower bit
Upper bit
Lower bit
D10
D10
RCLP
M1022
M1022
Содержание ELC-PB
Страница 1: ......
Страница 5: ...For more information visit www eaton com MN05003003E iv...
Страница 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Страница 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Страница 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Страница 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...