API
LN
125
D
P
Bit Devices
X
M
Y
K
S
*
D
*
Operands:
Please refer to the specifications of each model for the
range of operands.
Explanation
Example
Word Devices
H
KnX KnY KnM
T
*
*
S: Source device D: Operation result
The base is e = 2.71828 and exponent is S
[
[ D +1,D ]=EXP
S +1,S
Only a positive number is valid for S. Register D has to be 32-bit format.
Operation is conducted in floating point value, so the value in S needs to be
converted into floating value before exponent operation.
S
The content in D =e
eD = S. The content of D = LN S, where the value in S is specified by users.
When M0 = ON, convert (D1, D0) to binary floating value and save the
result in (D11, D10).
When M1= ON, perform natural logarithm operation with (D11, D10) as the
antilogarithm. The value is saved in register (D21, D20) in binary floating
format.
Chapter 16 PLC Function C2000 Series
Float Natural Logarithm Operation
16-bit command (5 STEPS)
-
C
D
*
32-bit command
*
DLN
Flag signal: none
]
; e=2.71828 and S is the specified data source
16-80
-
-
-
DLNP