5
Categories and Use of Basic Application Instructions
DVP-PM Application Manual
5-49
API Mnemonic Operands
Function
31
D ROL P
Rotate Left
Controllers
20PM
10PM
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
*
*
ROL, ROLP: 5 steps
DROL, DROLP: 9 steps
Operands:
D
: Device to be rotated
n
: Number of bits to be rotated in 1 rotation
Explanation:
1.
This instruction rotates bit status of the device
D
to the left for
n
bits
2.
The status of the last bit rotated (marked with
※
) is copied to the carry flag M1970.
3.
This instruction is generally used in pulse execution mode (ROLP, DROLP).
4.
When BMOV is used as 16-bit instruction, Z device cannot be adopted; when BMOV is used as 32-bit
instruction, V device cannot be adopted.
5.
When specifying the bit device of KnX(Y/M/S), the starting No. should be a multiple of 16 in octal or decimal
format. For example, K1X0, K4Y20 (octal); K1M0, K4S16 (decimal).
6. If
operand
D
is specified as KnY, KnM or KnS, only K4 (16-bit) or K8 (32-bit) is valid.
7.
Valid range of operand
n
: 1
≤
n
≤
16 (16-bit), 1
≤
n
≤
32 (32-bit)
Program Example:
When X0 goes from OFF to ON, all the 16 bits (4 bits as a group) in D10 will rotate to the left, as shown in the figure
below. The bit marked with
※
will be sent to carry flag M1970.
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 1
0
0
1
1
0
1
1 1
16 bits
Rotate to the left
After one rotation
to the left
Carry
flag
Carry
flag
D10
D10
Upper bit
Upper bit
Lower bit
Lower bit
ROLP
M1022
M1022
Summary of Contents for DVP-10PM
Page 1: ......
Page 45: ...2 Hardware Specifications and Wiring DVP PM Application Manual 2 30 MEMO...
Page 125: ...3 Functions of Devices in DVP PM DVP PM Application Manual 3 80 MEMO...
Page 341: ...8 Application Examples DVP PM Application Manual 8 2 Trajectory 3 Trajectory 4...
Page 427: ...9 Electrical CAM DVP PM Application Manual 9 74...
Page 437: ...10 Encrypting User Program DVP PM Application Manual 10 10 MEMO...
Page 458: ...11 G code Application DVP PM Application Manual 11 21 B O100 main program...
Page 561: ...14 Appendix DVP PM Application Manual 14 4 MEMO...