31.10.6.3 Confirming Execution Results - INC/INCP

Program Example

INC

Every time the INC instruction turns on, 1 is added.

  1. The INC instruction is executed when the positive transition instruction turns ON. When the INC instruction is executed, 1 is added to the result data (integer variable) in D1.
    When using a normally open instruction, as long as the instruction is passing power, the INC instruction continually executes adding 1 at each scan.

INCP

  1. When the normally open instruction turns ON, the INCP instruction will be executed. When the INCP instruction is executed, 1 is added to the result data (integer variable) in D1.
    Even when using a normally open instruction, the INCP instruction executes only when it detects an upward transition.
    Therefore, even when the operation is continuously ON, the INCP instruction executes for only one scan and 1 is added to the result data (integer variable).