Delta Electronics — 6.10.2 Explanation of Rotation Instructions

AS Series Programming Manual Symbol D : Device to rotate n : Number of bits in a group _6 Explanation 1. This instruction divides the bits in the device specified by D into groups ( n bits in a group), and then rotates these groups to the right with the carry flag SM602. 2. Only the DRCR instruction can use the 32-bit counter, but not the device E. 3. For 16-bit instructions, the value of n used must be between 1–16. For 32-bit instructions, the value of n must be between 1–32. When n is less than 0, the instruction is not executed. When n exceeds the range, the instruction is executed with n at the maximum value (32) of the range. 4.

In general, the RCRP and DRCRP pulse instructions are used. Example When X0.0 switches from OFF to ON, the instruction divides the values of the bits in D10 into groups (four bits as a group), and then rotates these groups to the right with the carry flag SM602. The value of the bit marked ※ is transmitted to the carry flag SM602.

6-258 API Instruction code Operand Function 0901 D RCR P D, n Rotating bits in a group to the right with the carry flag Device X Y M S T C HC D FR SM SR E K 16# “$” F D        n            BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type D      n      Pulse instruction 16-bit instruction 32-bit instruction AS AS AS