Chapter 6: Instructions
117
Instruction
Mnemonic
Rotate to the Right Without Carry
Range
Bit
■
Word
RRC
DRRC
Rotate the specified address to the
right (high to low)
■
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).
Fill the carry bit (F1.8) with the LSB (least significant bit).
Shift the LSB to the MSB (most significant bit).
2. Shift the register specified as D to the right by N bits. Each bit will move one bit position
lower in the register.
3. The D register is either a word or a double word. For RLC (word), N = 0 to 15. For DRLC
(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
Initial condition:
M0000 = $0F0F
M0001 = $0F0F
M0002 = $0F0F
Operation results:
M0 = $8787
M1 = $C3C3
M2 = $C3C3
RRC
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
a
RRC
D = M0000
N = 1
DRRC
D = M0001
N = 2
R0.0
R
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1
1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1
Содержание D320 PLC
Страница 1: ...D320 PLC User s Manual...
Страница 18: ...6 D320 PLC User s Manual...
Страница 28: ...16 D320 PLC User s Manual...
Страница 34: ...22 D320 PLC User s Manual...
Страница 78: ...66 D320 PLC User s Manual...
Страница 176: ...164 D320 PLC User s Manual...
Страница 210: ...198 D320 PLC User s Manual...
Страница 258: ...246 D320 PLC User s Manual...