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-82
API Mnemonic
Operands
Function
30
D ROR P
D, n
Rotate Right
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
*
*
ROR, RORP: 5 steps
DROR, DRORP: 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 on every operation of the instruction,
which could be every scan.
2.
The state of the last bit rotated is copied to the carry flag M1022 (Carry flag)
3.
This instruction works best using pulse instruction (RORP, DRORP).
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 data of D10 will rotate 4 bits to the right, as shown in
the diagram, bit b3 (prior to rotation) will be moved to the carry flag (CY) M1022.
0 1 1
1 0
1 0 1
0
0 1
1
1
0 0
1
0
1 0 1 1
1 0
0 1
1
1
1
0
0
1
0
0
Upper bit
Lower bit
Upper bit
lower bit
*
X0
RORP
D10
K4
Rotate to the right
16 bits
Carry
flag
Carry
flag
After one rotation
to the right
D10
D10
M1022
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...