Specifications

7. Application Instructions
© DELTA ELECTRONICS, INC. ALL RIGHTS RESERVED
7-18
32 bit operation
b15. .b00
/
=
+1
b15. .b00 b15. .b00 b15. .b00 b15. .b00 b15. .b00 b15. .b00 b15. .b00
+1 +1
+3 +2
Quotient
Remainder
Quotient : Stored to the lower 32 bits.
Remainder : Stored to the upper 32 bits. (Stored only in the case
of a word device.
Program Example (16 bit)
X0
DIV D0 D20D10
Ϩʳ Program which outputs the quotient and remainder, obtained by
dividing the data D0 by D10, to D20 and D21 when X0 turns on.
Program Example (32-bit)
X0
DDIV D0 D20D10
When X0 = ON, performs the division of BIN data (D1, D0) and BIN
data (D11, D10), the quotient stored (D21, D20) and the remainder
stored in (D23, D22).
D
24 INC
D Performs the addition of 1
Bit device Word device
Device
Operand
X Y M S K H KnX KnY KnM KnS T C D E F
D
Ϩ Ϩ Ϩ ϨϨϨϨϨ
Performs the addition of 1 to the device
D
.
Generally, it is advised to use the pulse wave contact to drive this
command, otherwise, this command will keep going on and on.
Program Example
X0
INC D0
Ϩʳ When X0 = ON, the content of D0 will perform the addition of 1.
D
25 DEC
D Performs the subtraction of 1
Bit device Word device
Device
Operand
X Y M S K H KnX KnY KnM KnS T C D E F
D
Ϩ Ϩ Ϩ ϨϨϨϨϨ
Performs the subtraction of 1 from the device
D
.
Generally, it is advised to use the pulse wave contact to drive this
command, otherwise, this command will keep going on and on.
Program Example
X0
DEC D0
Ϩʳ When X0 = ON, Performs the subtraction of 1 from the device
D
.
D
26 WAND
S1 S2 D Performs the logical product
Bit device Word device
Device
Operand
X Y M S K H KnX KnY KnM KnS T C D E F
S1
ϨϨϨϨϨϨϨϨϨϨϨ
S2
ϨϨϨϨϨϨϨϨϨϨϨ
D
Ϩ Ϩ Ϩ ϨϨϨϨϨ
Performs the logical product of the 16-bit data of device
S1
and the
16-bit data of device
S2
per bit, and stores the result into the device
D
.