Chapter 16 PLC Function ApplicationsMH300
ROR
Right rotation
ROR
Continuous
execution type
RORP
DROR
Continuous
execution type
DRORP
Flag signal: M1022 Carry flag
*
*
*
*
*
*
*
K4 (16-bit) is only valid if the operand D is designated as KnY or
KnM.
n operand n=K1-K16 (16-bit)
D: Device to be rotated. n: Number of bits for one rotation.
Rotates the device designated by D to the right n bits.
Generally use this command as a pulse execution type command (RORP).
When X0 switches OFF to ON, 4 of the 16 bits in D10 specify a right rotation; the
content of the bit indicated with * (see figure below) is sent to the carry flag signal
M1022.
0 1 1 1 0 1 0 1 0 0 11 1 0 0 1
0 1 0 1 1 1 0 0 111 1 00 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