Sign in to follow this  
Followers 0
Guest Alan DAnce

Shift Instruction In Siemens S7

3 posts in this topic

can anybody explain the shift instruction in S7. An example would be very helpful

Share this post


Link to post
Share on other sites
Although I am not familiar with the S7 a shift instruction is fairly generic. Shift (X Number of bits, X number of places, to the left or to the right) It is usually used for tracking events in a process so that further down the line some action can be taken mimicking the afore shifted bits. A typical eg; On a bottling line a sensor checks that all the bottles passing it have a cap on. Each time it sees a cap it puts a 1 in the shift register and shifts it one place to the left. Each time it does not see a cap it puts a 0 in the shift register and shifts it one place to the left. The shift register might look like this 111110111 The 0 signifies a missing cap. The next time the sensor checks the caps the register will look like this 111101111 (if the next bottle had a cap on) These registers are acted upon further down the line by a reject arm, each time it sees a 0 at the end of the shifted bits, it will reject the bottle.

Share this post


Link to post
Share on other sites
SLW (shift left word)/SLR (Shift Right Word) shifts only the contents of ACCU 1-L to the left/right bit by bit. The bit places that are vacated by the shift instruction are filled with zeros. The number of bit positions to be shifted is specified either by the address or by a value in ACCU 2-L-L. EG: SLW 5 Before: 0101 1111 0110 0100 0101 1101 0011 1011 After: 0101 1111 0110 0100 1010 0111 0110 0000 Hope this helps a little. Steve stevem@plcman.co.uk http://www.plcman.co.uk

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0