Specifications

7. Application Instructions
© DELTA ELECTRONICS, INC. ALL RIGHTS RESERVED
7-16
X0
BIN K1X0 D10
Ϩʳ Program which converts the BCD data of X0 to X03 into BIN and
stores the result into D10 when X10 turns on.
D
20 ADD
S1 S2 D
Performs the addition of BIN
data
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 addition on BIN data
S1
and the BIN data
S2
, and
stores the addition result into the device
D
.
Program Example
X0
ADD D0 D20D10
Ϩʳ Program which adds the contents of D0 to the content of D10 and
outputs the result to D20 when X0 turns on.
D
21 SUB
S1 S2 D
Performs the subtraction of
BIN data
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 subtraction of BIN data
S1
and the BIN data
S2
,
and stores the subtraction result into the devi ce
D
.
Program Example
X0
SUB D0 D20D10
Ϩʳ Program which outputs the difference between the content of D0 and
the content of D10 to D20 when X0 turns on.
D
22 MUL
S1 S2 D
Performs the multiplication of
BIN data
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 Multiplication of BIN data
S1
and the BIN data
S2
,
and stores the multiplication result into the device
D
.
The judgment of whether the data of
S1
and
S2
are positive or
negative is made at the highest bit (b15) and for
D
at (b31).
16-bit operation
b15................ b00
X
=
b15................b00 b31............ b16 b15.............b00
+1
b15 is a symbol bit
b15 is a symbol bit
b31 is a symbol bit D+1)ERI
b15=0,S is a positive value
1
b15=1,S is a negative value
1
b15=0,S is a positive value
2
b15=1,S is a negative value
2
b31=0,S is a positive value
2
b31=1,S is a negative value
2