Appendix D How to Use PLC Function
|
Revision June 2008, 04EE, SW--PW V1.11/CTL V2.11
D-57
API
Mnemonic
Operands
Function
30
ROR
P
D, n
Rotate to the Right
Bit Devices
Word devices
Program Steps
Type
OP
X Y M K H
KnX KnY KnM T
C
D
D
*
*
*
*
*
n
* *
ROR, RORP: 5 steps
Operands:
D
: Device to be rotated
n
: Number of bits to be rotated in 1 rotation
Explanations:
1.
This instruction rotates the device content designated by
D
to the right for
n
bits.
2.
This instruction adopts pulse execution instructions (RORP).
Program Example:
When X0 goes from Off to On, the 16 bits (4 bits as a group) in D10 will rotate to the right, as shown
in the figure below. The bit marked with
※
will be sent to carry flag 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
API
Mnemonic
Operands
Function
31
ROL
P
D, n
Rotate to the Left
Bit Devices
Word devices
Program Steps
Type
OP
X Y M K H
KnX KnY KnM T
C
D
D
*
*
*
*
*
n
* *
ROL, ROLP: 5 steps
Summary of Contents for AC Motor Drive VFD-E
Page 1: ......
Page 2: ......
Page 3: ......
Page 13: ...This page intentionally left blank...
Page 233: ......
Page 274: ...Appendix B Accessories Revision June 2008 04EE SW PW V1 11 CTL V2 11 B 37...