31.15.4.6 System Variables Indicating Execution Results - RCR/RCRP

Program Example

RCR

  1. When the variable of the positive transition instruction turns ON, the RCR instruction is run. When the RCR instruction is executed, the result from rotating 1 bit with carry over is stored in D1.

  2. When 1 bit is shifted to the right with carry over, you can use #L_CalcCarry to check the value of the least significant bit before rotation.

    • When using a normally open instruction, the RCR instruction is always executed as long as the normally open bit is ON.

RCRP

The RCRP and RCR instructions have different ways of detecting when to execute. In the RCRP instruction, Even when using a normally open instruction, the RCRP instruction executes only when it detects the upward transition. Even if the bit of the normally open instruction remains ON, the RCRP instruction is executed only for one scan.