Specifications

7. Application Instructions
© DELTA ELECTRONICS, INC. ALL RIGHTS RESERVED
7-60
S
1
and
S
2
can designate the same number register. In this
situation, when using “ continuous” command the register will be added
one time in the every scan during the condition contact is On. In general,
it uses pulse execution command. (DEADDP).
Program Example
D0DEADD
X0
D2 D10
Ϩʳ When X0=On, add the decimal of binary system (D1, D0) and the
decimal of binary system (D3, D2) and save the sum in (D11, D10).
Program Example
D10DEADD
X2
K1234 D20
When X2=On, add the decimal of binary system (D11, D10) and K1234
(auto convert to decimal of binary system) and save the sum in (D21,
D20).
Please refer to page 7-4 Handling of Decimal for detail.
D
121
ESUB S
1
S
2
D
Subtraction of decimal
of binary system
Bit device Word device
Device
Operand
XYMS K H
KnX KnY KnM KnS
TCDEF
S1
ϨϨ Ϩ
S
2
ϨϨ Ϩ
D
Ϩ
S1
: minuend.
S2
: subtrahend.
D
: difference.
Using the content of register that
S
1
designates minus the content of
register that
S
2
designates and save the result in the register that
D
designates. All process of subtraction uses the type of decimal of
binary system.
If the source operand
S1
or
S2
designates the constant K or H,
the command will be convert to decimal of binary system to subtract.
S
1
and
S
2
can designate the same number register. In this
situation, when using “ continuous” command the register will be added
one time in the every scan during the condition contact is On. in general,
it uses pulse execution command (DESUBP).
Program Example
D0DESUB
X0
D2 D10
Ϩʳ When X0=On, decimal of binary system (D1, D0) minus decimal of
binary system (D3, D2) and save the result to (D11, D10).
Program Example
K1234
DESUB
X2
D0 D10
Ϩʳ When X2=On, K1,234 (auto convert to decimal of binary system)
minus the decimal of binary system (D1, D0) and save the result to
(D11, D10).
Please refer to page 7-4 Handling of Decimal for detail.