Specifications

7. Application Instructions
© DELTA ELECTRONICS, INC. ALL RIGHTS RESERVED
7-20
command, otherwise, it will keep going on and on.
Program Example
X0
NEG D0
Ϩʳ When X goes from OFFШON, every bit of the D0 contents will be
countered (01, 10) and be added with 1, and will then be saved in
the original register, D0.
Ϩʳ This command could convert the negative BIN value to the positive
number, and that is, to get its absolute value.
D
30 ROR
D n Rotate to the right
Bit device Word device
Device
Operand
X Y M S K H KnXKnYKnMKnS T C D E F
D
Ϩ Ϩ Ϩ ϨϨϨϨϨ
n
ϨϨ
Essential condition: nЉ16 (16-bit command), nЉ32 (32-bit command).
The (D) ROR command is used to assign the (32) 16-bit data to
conduct the rotate-to-the-right command. The LSB that is rotating to
the right simultaneously will be moved to the carrying flag (CY) M1022.
It is generally advised to use the pulse wave contact to drive this
command, otherwise, it will keep going on and on.
When M, Y, S are assigned to serve as the bit operand, only K4 (16-bit)
and K8 (32-bit) are effective, e.g. K4M0, K8Y0.
Command Motion Explanation
Ϩʳ When X0 goes from OFFШON, the 16 bit data of D10 will rotate 4 bits
to the right, as shown in the diagram, and b3 that located at D10
originally will then be moved to the carrying flag (CY) M1022.
00000000 00011 111
0 0000 00 00011101 1 0
b15 b0
b15 b0
*
*
*
X0
ROR D10 K4
Rotate to the right
4 bits
Carrying
flag
Carrying
flag
After one rotation
to the right
D
31 ROL
D n Rotate to the left
Bit device Word device
Device
Operand
X Y M S K H KnXKnYKnMKnS T C D E F
D
Ϩ Ϩ Ϩ ϨϨϨϨϨ
n
ϨϨ
Essential condition: nЉ16 (16-bit command), nЉ32 (32-bit command).
The (D) ROL command is used to assign the (32) 16-bit data to
conduct the rotate-to-the-left command. The MSB that is rotating to
the left simultaneously will be moved to the carrying flag (CY) M1022.
It is generally advised to use the pulse wave contact to drive this
command, otherwise, it will keep going on and on.
When M, Y, S are assigned to serve as the bit operand, only K4 (16-bit)
and K8 (32-bit) are effective, e.g. K4M0, K8Y0.
Command Motion Explanation
Ϩʳ When X0 goes from OFFШON, the 16 bit data of D10 will rotate 4 bits
to the left, as shown in the diagram, and b12 that located at D10