120
D320 PLC User's Manual
Instruction
Mnemonic
Rotate to the Right
Range
Bit
■
Word
ROR
DROR
Rotate the specified address to
the right with the carry flag
■
Double words
Ladder
D = Register address
N = Number of bits to rotate
Description
1. Order:
Shift N bits to the right (from high-order bit to low-order bit) including the carry bit.
Input the carry bit (F1.8) to the MSB (most significant bit).
The LSB (least significant bit) moves to the carry bit (F1.8).
2. This instruction is different from the RRC instruction because it sends the LSB to the carry
bit, and the carry bit shifts to the MSB. The input to the MSB can be changed by setting or
clearing the carry bit.
3. The D register is either a word or a double word. For ROR (word), N = 0 to 15. For DROR
(double word), N = 0 to 31.
4. This operation will occur on every scan for which the input condition is true (On). To perform
the operation only on a change of input condition, use the rising/falling edge contact.
Example
Program Expression
Operation Results
ROR
D =
N =
R
MSB
LSB
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
C carry
(F1.8)
p o n m l k j i h g f e d c b a
C
R0.0
R0.1
R
ROR
D = M0
N = 2
F1.8
(OUT)
$4000
$1400
$0000 $5000
MO
C 0 0 0 0 1 0 1…
C 1 0 1 0 1 …
C 1 0 1 0 0 … 0 0 C
0 0 0 0 …
MSB LSB
R0.0
R0.1
Summary of Contents for D320 PLC
Page 1: ...D320 PLC User s Manual...
Page 18: ...6 D320 PLC User s Manual...
Page 28: ...16 D320 PLC User s Manual...
Page 34: ...22 D320 PLC User s Manual...
Page 78: ...66 D320 PLC User s Manual...
Page 176: ...164 D320 PLC User s Manual...
Page 210: ...198 D320 PLC User s Manual...
Page 258: ...246 D320 PLC User s Manual...