Math And Numerical Functions Logarithmic / Exponential Functions - GE VersaMax PLC User Manual

Table of Contents

Advertisement

Input/ Output
enable
IN or
I1, I2
ok
Q
Instruction Set Reference
For public disclosure
COS_
REAL
%R0001
IN Q
+3.141500
10.5.6 Math and Numerical Functions Logarithmic /
Exponential Functions
When a Logarithmic or Exponential function receives power flow, it performs the
appropriate logarithmic/exponential operation on the Real value in input IN and places
the result in output Q.
For the Base 10 Logarithm (LOG) function, the base 10 logarithm of IN is placed in
Q.
For the Natural Logarithm (LN) function, the natural logarithm of IN is placed in Q.
For the Power of E (EXP) function, e is raised to the power specified by IN and the
result is placed in Q.
For the Power of X (EXPT) function, the value of input I1 is raised to the power
specified by the value I2 and the result is placed in output Q. (The EXPT function
has three input parameters and two output parameters.)
The OK output receives power flow unless the input is NaN (Not a Number) or is
negative.
LOG_
Enable
OK
REAL
Input
Output
IN Q
10.5.6.1 Parameters of the Logarithmic/Exponential Functions
Choices
flow
When the function is enabled, the operation is
performed.
R, AI, AQ, constant
For EXP, LOG, and LN, IN contains the real
value to be operated on.
The EXPT function has two inputs, I1 and I2. For
EXPT, I1 is the base value and I2 is the
exponent.
flow, none
OK is energized when the function is performed
without overflow, unless an invalid operation
occurs and/or IN is NaN or is negative.
R, AI, AQ
Output Q contains the logarithmic/exponential
value of IN.
10.5.6.2 Example of the EXPT Function
In the example, the value of %AI001 is raised to the power of 2.5 and the result is placed
in %R0001.
%R0033
-1.000000
EXPT_
Enable
OK
REAL
Input 1
Output
I1 Q
Input 2
I2
Description
GFK-1503E User Manual 169

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents