Advanced Math Instructions
The advanced math instructions include these instructions:
Ladder Diagram and Function Block
Structured Text
If you want to: | Use this instruction: |
Take the natural log of a value | LN |
Take the log base 10 of a value | LOG |
Raise a value to the power of another value | EXPT |
Mixing data types can cause accuracy and rounding errors and cause the instruction to take longer to execute. Check the S:V bit to see whether the result was truncated.
The
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.An advanced math instruction executes once each time the instruction is scanned as long as the rung-condition-in is true. If you want the instruction evaluated only once, use an ONS instruction to trigger the math instruction.
Provide Feedback