2 Instruction Descriptions
The LOG instruction finds the base-10 logarithm of a real number.
The base-10 logarithm of 1,000.0 is 3.0 so the value of abc will be REAL#3.0.
In
REAL#1000.0
Additional Information
Use the CheckReal instruction (page 2-237) to see if Out is positive infinity, negative infinity, or nonnu-
meric data.
Precautions for Correct Use
• If the value of In is not a positive number, the value of Out is as shown below.
Value of In
Negative number
0
+∞
−∞
Nonnumeric data
• If you pass an integer parameter to In, the data type is converted as follows:
Data type of parameter that is
passed to In
USINT, UINT, SINT, or INT
UDINT or DINT
ULINT or LINT
2-208
Common logarithm is taken.
Out=abc
Value of Out
Nonnumeric data
−∞
+∞
Nonnumeric data
Nonnumeric data
Data type of In
REAL
LREAL
A building error will occur.
REAL#3.0
NY-series Instructions Reference Manual (W560)