Log Base 10 (LOG)

The LOG instruction takes the log base 10 of the Source and stores the result in the Destination. The Source must be greater than zero or a minor fault will occur.
Available Languages
Ladder Diagram
Ladder_LOG
Operands
IMPORTANT: Unexpected operation may occur if:
  • Output tag operands are overwritten.
  • Members of a structure operand are overwritten.
  • Except when specified, structure operands are shared by multiple instructions.
There are data conversion rules for mixing numeric data types within an instruction. See Data conversions.
Ladder Diagram
Operand
Data Type
Format
Description
Source
SINT
INT
DINT
LINT
USINT
UINT
UDINT
ULINT
REAL
LREAL
Immediate
tag
Value for which the instruction finds the log.
Destination
SINT
INT
DINT
LINT
USINT
UINT
UDINT
ULINT
REAL
LREAL
tag
Tag to store the result of the instruction.
Affects Math Status Flags
Yes
Major/Minor Faults
None specific to this instruction. See Index through arrays for array-indexing faults.
Execution
Ladder Diagram
Condition/State
Action Taken
Prescan
N/A
Rung-condition-in is false
Set Rung-condition-out to Rung-condition-in.
Rung-condition-in is true
Set Rung-condition-out to Rung-condition-in.
Dest = value of log base 10 of the Source.
Postscan
N/A.
Examples
Ladder Diagram
FTStudio LOG EX V1
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.