535
LOGD, LOGDP
1
2
3
4
4
6
7
8
7.12
Special function
instructions
7.12.2
4
LOGD,
LOGDP
Program
E
xamp
l
e
(1) The following program seeks the natural logarithm of the value "10" set by D50, and stores the result at D30 and D31.
[Ladder Mode]
[List Mode]
[Operation]
: Data of which the natural logarithm is obtained or head number of the devices where the data is stored (real number)
: Head number of the devices where the operation result will be stored (real number)
F
unct
i
on
(1) Returns the natural logarithm of the value designated by taking (e) as base, and stores operation results at device
designated by .
(2) Only positive values can be designated by . (Operation cannot be performed on negative numbers.)
(3) When the operation results in -0 or an underflow, the result is processed as 0.
7.12.24 LOGD, LOGDP
Natural logarithm operation on floating-point data
(Double precision)
7.12.24
LOGD, LOGDP
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
E
Other
Bit
Word
Bit
Word
––
––
––
––
––
––
––
Sets data used for natural
logarithm operation ( )
Con
v
erts the operation data
into a 32-bit floating-point real number ( )
Executes natural logarithm operation ( )
1
2
3
Step
I
nstruct
i
on
De
vi
ce
D50
10
MOV
b15
b0
B
IN v
a
l
ue
10
Con
v
ers
i
on
to
f
l
oat
i
ng
-
po
i
nt
FLT
L
OG
operat
i
on
D
4
1
D
4
0
L
OG
D31
D30
32
-
b
i
t
f
l
oat
i
ng
-
po
i
nt
rea
l
number
32
-
b
i
t
f
l
oat
i
ng
-
po
i
nt
rea
l
number
1 0
2
.
3 0 2 5 8 5
1
2
3
Universal
LCPU
Bas
i
c
Hi
gh
performance
Process
Redundant
Command
Command
L
OGDP
LOGD
LOGDP
L
OGD
S
D
S
D
S
D
S
D
S
D
l
og
(
)
(
)
6
4-
b
i
t
f
l
oat
i
ng
-
po
i
nt
rea
l
number
6
4-
b
i
t
f
l
oat
i
ng
-
po
i
nt
rea
l
number
+
3
S
+
2
S
S
+
1
S
+
3
D
+
2
D
D
+
1
D
S