![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/3/8d/38d56254-54fe-46e3-85ae-d3f5260e1091/38d56254-54fe-46e3-85ae-d3f5260e1091-bgf7.png)
FX Series Programmable Controlers Applied Instructions 5
5-121
5.11.5 EADD (FNC 120)
Operation:
The floatin
point values stored in the source
devices S
1
and S
2
are al
ebraicall
added and the
result stored in the destination device D.
Points to note:
a) The instruction must use the double word format; i.e.,
D
EADD or
D
EADDP. All source data
and destination data will be double word; i.e. uses two consecutive data re
isters to store
the data (32 bits).
Except for K or H, all source data will be re
arded as bein
in floatin
point format and the
result stored in the destination will also be in floatin
point format.
b) If a constant K or H is used as source data, the value is converted to floatin
point before
the addition operation.
c) The addition is mathematicall
correct: i.e., 2.3456
×
10
2
+ (-5.6
×
10
-1
) = 2.34
×
10
2
d) The same device ma
be used as a source and as the destination. If this is the case then,
on continuous operation of the DEADD instruction, the result of the previous operation will
be used as a new source value and a new result calculated.
This will happen ever
pro
ram scan unless the pulse modifier or an interlock pro
ram is
used.
e) If the result of the calculation is zero “0” then the zero fla
, M8020 is set ON.
If the result of the calculation is lar
er than the lar
est floatin
point number then the carr
fla
, M8021 is set ON and the result is set to the lar
est value.
If the result of the calculation is smaller than the smallest floatin
point number then the
borrow fla
, M8022 is set ON and the result is set to the smallest value.
Mnemonic Function
Operands
Program steps
S
1
S
2
D
EADD
FNC 120
(Floatin
Point
Addition)
Adds two floatin
point numbers
to
ether
K, H - inte
er value automaticall
converted to floatin
point
D - must be in floatin
point
format (32 bits).
D - a floatin
point value
(32 bits).
DEADD,
DEADDP:
13 steps
DEADD
X07
K52000
D106 D108
For more information about the format of floatin
point number refer to pa
e 4-46.