If you want to
Take the natural log of a value
Take the log base 10 of a value
Raise a value to the power of another value
(1) There is no equivalent structured text instruction. Use the operator in an expression.
Advanced Math Instructions
(LN, LOG, XPY)
Topic
Natural Log (LN)
Log Base 10 (LOG)
X to the Power of Y (XPY)
The advanced math instructions include these instructions.
Use this instruction
LN
LOG
XPY
You can mix data types, but loss of accuracy and rounding error might occur and
the instruction takes more time to execute. Check the S:V bit to see whether the
result was truncated.
For relay ladder instructions, bold data types indicate optimal data types. An
instruction executes faster and requires less memory if all the operands of the
instruction use the same optimal data type, typically DINT or REAL.
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Page
546
549
552
Available in these languages
Relay ladder
Structured text
Function block
Relay ladder
Structured text
Function block
Relay ladder
(1)
Structured text
Function block
15
Chapter
Page
546
549
552
545