Natural Logarithm: Ln - Mitsubishi Electric R16MTCPU Programming Manual

Hide thumbs Also See for R16MTCPU:
Table of Contents

Advertisement

Natural logarithm: LN

Format
LN(S)
Setting data
■Usable data
: Usable
Setting
Usable Data
data
Bit
device
(S)
■Description, data type of result
Setting data
(S)
Processing details
• The base e natural logarithm of the data specified with (S) is found.
• Only a positive number may be specified with (S). (Operation cannot be performed with a negative number.)
• If (S) is an integer type, it is converted into a floating-point type before operation is performed.
Operation error
An operation error will occur if:
• (S) is 0 or a negative number.
• (S) is an indirectly specified device and its device No. is outside the range.
Program example
■Program which finds the natural logarithm of D0F and substitutes the result to #0F
#0F = LN(D0F)
#3
#2
#0F
2.3025850929940
4 OPERATION CONTROL PROGRAMS
152
4.7 Standard Functions
Number of basic steps
4
Word device
16-bit
32-bit
64-bit
integer
integer
floating
type
type (L)
point
type (F)
Description
Data on which natural logarithm operation will be performed
#1
#0
Usable steps
F/FS
Constant
16-bit
32-bit
64-bit
integer
integer
floating
type
type
point
(K/H)
(K/H, L)
type (K)
D3
D2
D0F
10.0
G
Calculation
Bit
expression
conditional
expression
Data type of result
Floating-point type
D1
D0
Comparison
conditional
expression

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

R64mtcpuMelsec iq-r seriesR32mtcpu

Table of Contents