9 natural logarithm instruction (ln) – Yaskawa Ladder Works Programming Manual User Manual

Page 96

Advertising
background image

5.9 NATURAL LOGARITHM Instruction (LN)

5-14

5.9 NATURAL LOGARITHM Instruction (LN)

[Outline]

The LN instruction uses the Source as the input (x) and stores the natural logarithm (Log

e

x

) of the

input in the Dest as the operation result. This instruction can be used only in a real number operation.

[Format]

Symbol : LN
Full Name : Natural Logarithm
Category : FUNCTION

Icon :

[Parameter]

Parameter Name

Setting

Source
(Input)

· Any real number type register
· Any real number type register with subscript
· Constant

Dest
(Output)

· Any real number type register (except for # and C register)
· Any real number type register with subscript (except for # and C register)

[Program Example]

The natural logarithm of the input value (x = 10.0) [Log

e

(x) = 2.3026] is calculated.

Notes: LN instruction is input(x) value is checked, execute the following handling.

· When the input is minus LN (-1), calculate a absolute value

· When the input is zero LN (0), take -∞ for solution.


Advertising