Delta Electronics VFD037CH23A-21 — понимание функции ROR в программируемых логических контроллерах [516/638]

Превью страниц Страница 516 / 638
Delta Electronics VFD037CH23A-21 [516/638] Carry flag
Chapter 16 PLC Function CH2000 Series
16-63
API
30
ROR
P
D n
Rotate to the Right
Bit Devices Word Devices
X Y M K H KnX KnY KnM T C D
D
n
Operands:
D: if in KnY and KnM, only K4 (16-bit) is valid
n: n=K1~K16 (16-bit)
16 bit command (5 STEPS)
ROR
RORP
32-bit command
Flag signal: M1022 Carry flag
Explanation
1. D: Device to be rotated n: Number of bits to be rotated in 1 rotation
2. This instruction rotates the device content designated by D to the right for
n bits.
3. This instruction adopts pulse execution instructions (RORP).
Example
When X0 goes from Off to On, the 16-bit (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.
01110101 00111 001
010111001111001 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

Содержание

1610

Изучите, как использовать команду ROR для вращения битов в программируемых логических контроллерах. Пошаговое руководство и примеры применения.