Mitsubishi — 5.6 Application Instructions

5 Categories and Use of Basic Application Instructions API 33 Operands: D : Device to be rotated n : Number of bits to be rotated in 1 rotation Explanations: 1. This instruction rotates bit status of the device D together with M1970 to the left for n bits.. 2. The status of the last bit rotated (marked with ※ ) is moved to the carry flag M1970. 3. This instruction is generally used in pulse execution mode (RCLP, DRCLP). 4. When RCL is used as 16-bit instruction, Z device cannot be adopted; when RCL is used as 32-bit instruction, V device cannot be adopted. 5. When specifying the bit device of KnX(Y/M/S), the starting No. should be a multiple of 16 in octal or decimal format.

For example, K1X0, K4Y20 (octal); K1M0, K4S16 (decimal). 6. Valid range of operand n : 1≤ n ≤16 (16-bit), 1≤ n ≤32 (32-bit) Program Example: When X0 goes from OFF to ON, the 16 bits (4 bits as a group) in D10 together with carry flag M1970 (total 17 bits) will rotate to the left, as shown in the figure below. The bit marked with ※ will be sent to carry flag M1970.

X0 Rotate to the left M1022 Upper bit Lower bit D10 Carry flag After one rotation to the left 16 bits Upper bit Lower bit M1022 D10 Carry flag DVP-PM Application Manual 5-51 Mnemonic Operands Function Controllers 20PM 10PM D RCL P Rotation Left with Carry Type OP Bit Devices Word devices Program Steps X Y M S K H KnX KnY KnM KnS T C D E F RCL, RCLP: 5 steps DRCL, DRCLP: 9 steps D * * * * * * * * n * * RCLP D10 K4 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1