Delta Electronics AH — 3.14 Shift Instructions

Chapter 3 Standard Instructions Graphic expression: 3_ D : Device involved in the shift n : Number of bits Explanation: 1. The values of the bits in D are shifted by n bits to the left. The vacancies (b0~bn-1) resulting from the shift is filled by 0, and the value of b16-n is transmitted to SM602. 2. The operand n should be within the range between 1 and 16. 3. Generally, the pulse instruction SFLP is used. Example: 4. When X0.0 is ON, the values of b0~b15 in D0 are shifted by 6 bits to the right, and the value of b10 is transmitted to SM602. The values of b0~b5 are cleared to 0 after the shift. 5. The shift of the values of the bits to the left during a scan is illustrated as follows.

 b15~b10 → Being carried (The value of b10 is transmitted to SM602.  b9~b0 → b15~b6  0 → b5~b0 3-305 FB/FC Instruction Operand Description FC SFL P D, n Shifting the values of the bits in the 16-bit registers by n bits to the left BOOL WORD DWORD LWORD UINT UDINT INT DINT LINT REAL LREAL TMR CNT STRING Data type D   n   Device X Y M S T C HC/AC D L SM SR E PR K 16# “$” D F D          n            Pulse instruction 16-bit instruction 32-bit instruction AH Motion CPU AH Motion CPU -