Download Print this page

Natural Logarithm Operation - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

19.3

Natural Logarithm Operation

LN(_E)
These functions output the natural logarithm operation result of an input value.
Ladder diagram, FBD/LD
[Without EN/ENO]
s
d
Setting data
■Descriptions, types, and data types
Argument
Description
EN
Execution condition (TRUE: Execution, FALSE: Stop)
s(IN)
Input
ENO
Output status (TRUE: Normal, FALSE: Abnormal)
d(LN(_E))
Output
Processing details
■Operation processing
• These functions calculate the logarithm whose base is "e" of the REAL type data input to (s), and output from (d).
• These functions are expressed as follows when the input value is "A" and the output operation result is "B".
B=log
A
e
• In the natural logarithm operation, the base "e" is set to "2.71828".
■Operation result
1.
Function without EN/ENO
The following table lists the operation results.
Operation result
No operation error occurred
An operation error occurred
2.
Function with EN/ENO
The following table lists the execution conditions and operation results.
Execution condition
EN
TRUE (Executes operation)
FALSE (Stops operation)
*1 When FALSE is output from ENO, data output from (d) is undefined. In that case, modify a program so that the data output from (d) is
not used.
Operation error
Error code
Description
(SD0/SD8067)
3405H
A negative value is input.
The data after conversion is other than -3.40282
[With EN/ENO]
EN
ENO
s
d
Operation result
ENO
TRUE (Operation error did not occur)
*1
FALSE
+38
to -1.17549
Structured text
[Without EN/ENO]
d:=LN(s);
[With EN/ENO]
d:=LN_E(EN,ENO,s);
Type
Input variable
Input variable
Output variable
Output variable
(d)
Operation output value
Indefinite value
(d)
Operation output value
Indefinite value
-38
-38
+38
, 0, or 1.17549
to 3.40282
19 SINGLE NUMBER VARIABLE FUNCTIONS
19.3 Natural Logarithm Operation
Data type
BOOL
REAL
BOOL
REAL
.
19
977

Hide quick links:

Advertisement

loading