32.17.9.4 System Variables Indicating Execution Results - LN/LNP

Program Example

LN

  1. The LN instruction is executed when the positive transition instruction turns ON. The LN instruction calculates the natural logarithmic function of Data_A and stores the result in D1.
    When using a normally open instruction, the LN instruction is always executed as long as the normally open instruction bit is ON.

LNP

  1. The LNP and LN instructions differ in when they run. In the LNP instructions, even when using a normally open instruction, the LNP instruction executes only when it detects the upward transition. Therefore, the LNP instruction is executed only for one scan, even when the normally open instruction bit remains ON.