Calculating The Common Logarithm - Mitsubishi Electric MELSEC iQ-R Series Programming Manual

Motion module instructions, standard functions/ function blocks
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

13.4

Calculating the Common Logarithm

LOG
These functions output the common logarithm (logarithm with base 10) of an input value.
Structured text
d:=LOG(s);
Setting data
■Description, type, data type
Argument
Description
s (IN)
Input
d
Output
Processing details
■Operation processing
• These functions calculate the common logarithm of the REAL or LREAL data type value input to (s), and output the
operation result from (d).
• When the input value is defined as A and the output value is defined as B, the relationship of A and B will be as follows:
B=log
A
10
• Input a REAL or LREAL data type value to (s).
• Input a positive value only. (Calculation cannot be performed with a negative value.)
• If the operation result is -0 or an underflow occurs, 0 will be output as the operation result.
■Operation result
The operation processing is performed. The operation result is output from (d).
Operation error
• When (s) is of REAL data type
Error code
Description
3402H
The value input to (s) is -0, a subnormal number, NaN (not a number), or ±∞.
3405H
Out-of-range data is set to (s).
• The specified value is a negative number.
• The specified value is 0.
• When (s) is of LREAL data type
Error code
Description
3402H
The value input to (s) is -0, a subnormal number, NaN (not a number), or ±∞.
3405H
Out-of-range data is set to (s).
• The specified value is a negative number.
• The specified value is 0.
Type
Data type
Input variable
ANY_REAL
Output variable
ANY_REAL
13 SINGLE VARIABLE FUNCTIONS
13.4 Calculating the Common Logarithm
13
169

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents