Kaiyi — 6.12.2 Explanation of Shift Instructions

Chapter 6 Applied Instructions API 1114 Symbol: D : Initial device involve in the shift Word n : Data length Word Explanation: 1. The data in the n registers starting from D is shifted to the right, and the data in D + n -1 is cleared to 0. 2. Generally, the pulse instruction NSFRP is used. 3. The operand n should be within the range between 1 and 512. Example: When X0.0 is ON, the data in D1~D6 is shifted to the right, and the data in D6 is cleared to 0. D6 D0 D1 D2 D3 D4 D5 Being cleared to 0 Additional remark: 1. If D + n -1 exceeds the device range, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003. 2.

If n is less than 1, or if n is larger than 512, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#200B. 6-244 Instruction code Operand Function NSFR P D, n Shifting n registers to the right Device X Y M S T C HC D L SM SR E PR K 16# “$” DF D          n            Pulse instruction 16-bit instruction (5 steps) 32-bit instruction AH AH - 30 2235 9578 754 28 423 11 After the shift D6 D5 D4 D3 D2 D1 D0 0 30 2235 9578 754 28 423