476
18 Applied Instructions (Floating Point)
18.14 DLOG10 / Floating Point Common Logarithm
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Error
In the following cases, it is an operation error, error flag (M8067) is turned ON, and error code is stored in
D8067.
• When the value specified by is negative. (Error code: K6706)
• When the value specified by is 0. (Error code: K6706)
Program example
This is a program for determining the common logarithm of "15" set in D50 when the X000 is ON, and storing
in D30, D31.
[Structured ladder/FBD]
X000
D40
MOV
EN
s
ENO
K15 D50
DLOG10
EN
s
ENO
d
d
D30
[ST]
MOV(X000,K15,D50);
FLT(X000,D50,D40);
DLOG10(X000,D40,D30);
FLT
EN
s
ENO
d
D40
D50
Setting of data for common logarithm operation. (1))
Conversion of operation data into binary
floating decimal point (real number). (2))
Operation of common logarithm (3))
Value of binary floating
decimal point (real number)
15
10
1)
MOV
15
b15 b0
2) Conversion of binary
floating decimal point
(real number)
3) LOG
operation
DLOG10
D41 D40
Value of binary floating
decimal point (real number)
1.176091
D31 D30
FLT
D50
BIN value