512
FX3G/FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
18 Floating Point – FNC110 to FNC139
18.14 FNC126 – LOG10 / Floating Point Common Logarithm
Program example
In the program example shown below, common logarithm of "15" set in D50 is calculated, and stored to D30 and D31
when X000 turns ON.
X000
FNC 49
FLT
D50
Data used in the common logarithm operation is set
([1]).
The data to be used is converted into binary floating
point (real number) ([2]).
The common logarithm operation is executed ([3]).
D40
FNC 12
MOV
K15 D50
FNC126
DLOG10
D40 D30
END
Binary floating point
(real number) value
15
10
[1]
MOV
15
b15 b0
[2] Conversion into
binary floating point
(real number)
[3] Logarithm
operation
DLOG10
D41 D40
Binary floating point
(real number) value
1.176091
D31 D30
FLT
D50
Binary value