When the execution result is 0, the system variable #L_CalcZero turns ON.
When checking the result using system variables, make sure the check takes place after the instruction has been executed. When checking the state after multiple instructions have been executed, system variables will store the result only of the last processed instruction.
Program Example
AND
The AND instruction is executed when the positive transition instruction turns ON. When the AND instruction is executed, the result value obtained after Data_A is ANDed with F0FF is stored in D1.
When using a normally open instruction, the AND instruction is always executed as long as the normally open instruction bit is ON.
ANDP
When the normally open instruction turns ON, the AND instruction will be executed. When the ANDP instruction is executed, the result value obtained after Data_A is ANDed with F0FF is stored in D1. Even when using a normally open instruction, the ANDP instruction executes only when it detects the upward transition.
As a result, even if the instruction is always on, ANDP executes only at the first scan.