3 . I n s t r u c t i o n S e t
M N 0 5 0 0 3 0 0 3 E F o r m o r e i n f o r m a t i o n v i s i t :
w w w. e a t o n . c o m
3 - 3 0 1
API Mnemonic
Operands
Function
120
D EADD P
S
1
, S
2
, D
Floating Point Addition
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX KnY KnM KnS T
C
D
E
F
S
1
*
*
*
S
2
*
*
*
D
*
DEADD, DEADDP: 13
steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32
16
P
32
16
P
32
16
P
32 16
P
32
16
P
Operands:
S
1
: Augend
S
2
: Addend
D
: Addition result
Description:
1.
S
1
+
S
2
=
D
. The floating point value in the registers specified by
S
1
and
S
2
are added together
and the result is stored in the registers specified by
D
.
2.
If the source operand
S
1
or
S
2
is a constant K or H, the integer value will automatically be
converted to binary floating point to perform the addition operation.
3.
S
1
and
S
2
can specify the same register number (the same address can be used for
S
1
and
S
2
).
4.
This instruction works best when used as a pulse instruction (EADDP).
5.
Flags: M1020 (Zero flag), M1021 (Borrow flag) and M1022 (Carry flag)
If the absolute value of the result is larger than the maximum floating point value, the carry flag
M1022= ON.
If absolute value of the results is less than the minimum floating point value, the 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 in D1/D0 and the binary floating point value in D3
/D2 and store the result in D11/D10.
D0
DEADD
X0
D2
D10
Program Example 2:
When X2= ON, add the binary floating point value of D11/D10 and K1234 (automatically converted
to binary floating point) and store the result in D21/D20.
D10
DEADD
X2
K1234
D20
Summary of Contents for ELC-PB
Page 1: ......
Page 5: ...For more information visit www eaton com MN05003003E iv...
Page 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Page 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Page 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Page 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...