Chapter 6 Applied Instructions Symbol S : Matrix source D : Operation result n : Length of the array Explanation 6_ 1. This instruction rotates the values of n rows of bits in S to the right or to the left. When SM616 is OFF, the instruction rotates the values of the bits to the left. When SM616 is ON, the instruction rotates the values of the bits to the right. The instruction fills the vacancy resulting from the rotation with the value of the bit rotated last, and stores the operation result in D . The value of the bit rotated last not only fills the vacancy, but also is transmitted to the carry flag SM614. 2. For 16-bit instructions, the value of n must be between 1–16.
For 32-bit instructions, the value of n must be between with n at the maximum value (32) of the range. 1–32. When n is less than 0, the instruction is not executed. When n exceeds the range, the instruction is executed 3. In general, the MBRP pulse instruction is used. 6-263 API Instruction code Operand Function 0904 MBR P S, D, n Rotating bits in a group to the right or the left in a matrix Device X Y M S T C HC D FR SM SR E K 16# “$” F S D n BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S D n Pulse instruction 16-bit instruction 32-bit instruction ES3 ES3 -