AH500 Programming Manual API 1113 Symbol: D : Initial device involve in the shift Bit n : Data length Word 1. The states of the n bit devices starting from D are shifted by one bit to the left. The state of D is cleared to 0, and the state of D + n -1 is transmitted to the carry flag SM602. 2. Generally, the pulse instruction BSFLP is used. 3. The operand n should be within the range between 1 and 1024. Explanation: Example: When X0.0 is ON, the states of M0~M5 are shifted by one bit to the left, the state of M0 is cleared to 0, and the state of M5 is transmitted to the carry flag SM602.
M0 M1 M2 M3 M4 M5 Carry flag After the shift M0 M1 M2 M3 M4 M5 Carry flag 0 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 1024, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#200B. 6-258 Instruction code Operand Function BSFL P D, n Shifting the states of the n bit devices by one bit to the left 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 AH500 AH500 - 0 0 0 1 0 1 0 0 1 0 1 0