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

Превью страниц Страница 517 / 638
Delta Electronics VFD450CH23A-00/-21 [517/638] D10 k4
Chapter 16 PLC Function CH2000 Series
16-64
API
31
ROL
P
D n
Rotate to the Left
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)
ROL
ROLP
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 left for
n bits.
3. This instruction adopts pulse execution instructions (ROLP).
Example
When X0 goes from Off to On, the 16-bit (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 M1022.
X0
D10 K4
11111100 00011 000
11000001100110111
16 bits
Rotate to the left
A
fter one rotation
to the left
Carry
flag
Carry
flag
D10
D10
upper bit
upper bit
lower bit
lower bit

Содержание

1610

Изучите функцию ROL для вращения битов в программируемых логических контроллерах. Узнайте, как использовать команду для управления устройствами и флагами.