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 right. The vacancies (b15~b15-n+1) resulting from the shift is filled by 0, and the value of bn-1 is transmitted to SM602. 2. The operand n should be within the range between 1 and 16. 3. Generally, the pulse instruction SFRP is used. Example: 1. When X0.0 is ON, the values of b0~b15 in D0 are shifted by 6 bits to the right, and the value of b5 is transmitted to SM602. The values of b10~b15 are cleared to 0 after the shift. 2. The shift of the values of the bits to the right during a scan is illustrated as follows.
b5~b0 → Being carried (The value of b5 is transmitted to SM602.) b15~b6 → b9~b0 0 → b15~b10 3-303 FB/FC Instruction Operand Description FC SFR P D, n Shifting the values of the bits in the 16-bit registers by n bits to the right 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 -