32.11.1.3 Confirming Execution Results - JADD/JADDP

Program Example

JADD

When the positive transition instruction is turned ON, time addition will be performed.

  1. When the positive transition instruction turns ON, the JADD instruction will be executed. When the JADD instruction is executed, Data_1 (time variable) in operand S1 is added to Data_2 (time variable) in operand S2, and the result of the addition is stored in operand D1. When using a normally open instruction, as long as the instruction is passing power, the JADD instruction continually executes at each scan, performing the time add operation.

  2. Example

For example, when Data_1 in operand S1 is 12:10:45, and Data_2 in operand S2 is 6:55:20, if a JADD instruction is executed, the result is 19:06:05, and 19:06:05 is stored in the result data in operand D1.

JADDP

  1. When the normally open instruction turns ON, the JADDP instruction will be executed. When the JADDP instruction is executed, Data_1 (time variable) in operand S1 is added to Data_2 (time variable) in operand S2, and the result of the addition is stored in operand D1. Even when using a normally open instruction, the JADDP instruction executes only when it detects an upward transition.
    Therefore, even when the variable of the NO instruction is always ON, the JADDP instruction is executed only for one scan.