3. Instruction

Set

API

 

Mnemonic

 

 

Operands

Function

 

Controllers

 

172

D

 

ADDR

P

 

 

Floating point addition

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 DADDR, DADDRP: 13

S1

 

 

 

 

 

 

 

 

 

*

 

steps

 

S2

 

 

 

 

 

 

 

 

 

*

 

 

 

D

 

 

 

 

 

 

 

 

 

*

 

 

 

 

 

 

 

 

 

 

 

PULSE

 

 

16-bit

32-bit

 

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

SA2

SX2

SE

SE

SE

Operands:

S1: Floating point summand S2: Floating point addend D: Sum

Explanations:

1.ADDR instruction adds the floating point summand S1 with floating point addend S2 and stores the operation result in D.

2.In ADDR instruction, floating point values can be directly entered into S1 and S2.

3.In DADDR instruction, floating point values (e.g. F1.2) can be either entered directly into S1 and S2 or stored in data registers for operation.

4.When S1 and S2 is specified as data registers, the function of DADDR instruction is the same as API 120 EADD instruction.

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

6.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 floating point number F1.200E+0 (Input F1.2, and scientific notation F1.200E+0 will be displayed on ladder diagram. Users can set monitoring data format as float on the function View) with F2.200E+0 and store the obtained result F3.400E+0 in register D10 and D11.

X0

DADDR F1.200E+0 F2.200E+0 D10

Program example 2:

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

3 - 3 9 1

Page 507
Image 507
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Addr, DADDR, Daddrp