3. Instruction Set

API

120

Mnemonic

 

Operands

Function

 

 

 

 

 

 

D

EADD

 

P

 

Floating point addition

 

 

 

 

 

 

Controllers

ES2/EX2 SS2 SA2 SX2

SE

Type

Bit Devices

 

 

 

 

Word devices

 

 

 

 

 

 

 

Program Steps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OP

X

Y

M

S

K

H

KnX

KnY

KnM

KnS

T

C

D

E

 

F

 

DEADD, DEADDP: 13

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

steps

 

 

S1

 

 

 

 

*

*

 

 

 

 

 

 

 

 

 

 

 

*

 

 

 

 

 

 

S2

 

 

 

 

*

*

 

 

 

 

 

 

 

 

 

 

 

*

 

 

 

 

 

 

 

 

 

 

D

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

*

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

16-bit

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PULSE

 

 

 

 

 

 

 

 

32-bit

 

 

 

 

 

 

 

 

 

 

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

SA2

SX2

 

 

 

 

 

 

 

 

SE

SE

 

SE

Operands:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S1: Augend

S2: Addend

D: Addition result

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Explanations:

1.S1 + S2 = D. The floating point value in S1 and S2 are added and the result is stored in D.

2.If the source operand S1 or S2 is specified as constant K or H, the constant will automatically be converted to binary floating point value for the addition operation.

3.S1 and S2 can designate the same register. In this case, if the instruction is specified as “continuous execution instruction” (generally DEADDP instruction) and the drive contact is ON, the register will be added once in every scan.

4.Flags: M1020 (Zero flag), M1021 (Borrow flag) and M1022 (Carry flag)

If absolute value of the result exceeds max. floating point value, carry flag M1022 = ON.

If absolute value of the result is less than min. floating point value, borrow flag M1021 = ON. If the conversion result is 0, zero flag M1020 = ON.

Program Example 1:

When X0 = ON, add the binary floating point value (D1, D0) with binary floating point value (D3, D2) and store the result in (D11, D10).

X0

DEADD D0 D2 D10

Program Example 2:

When X2 = ON, add the binary floating point value of (D11, D10) with K1234 (automatically converted to binary floating point value) and store the result in (D21, D20).

X2

DEADD D10 K1234 D20

3 - 3 0 3

Page 419
Image 419
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Eadd, DEADD, Deaddp