535
LOGD, LOGDP
1
2
3
4
4
6
7
8
7.12 Special function instructions
7.12.24 LOGD, LOGDP
Program Example
(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)
Function
(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, LOG DP Natural logar ithm operation on float ing-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 ( )
Converts the operation data
into a 32-bit floating-point real number ( )
Executes natural logarithm operation ( )
1
2
3
Step Instruction Device
D50
10
MOV
b15 b0
BIN value
10
Conversion to
floating-point
FLT
LOG operation
D41
D40
LOG
D31
D30
32-bit floating-point
real number
32-bit floating-point
real number
1
02
.
302585
1
2
3
Universal
LCPU
Basic
High
performance
Process
Redundant
Command
Command
LOGDP
LOGD
LOGDP
LOGD
S
D
S D
S
D
S
D
S
D
log
(
)(
64-bit floating-point
real number
64-bit floating-point
real number
+3
S
+2
S
S
+1
S
+3
D
+2
D
D
+1
D
S