Drbitboy: The problem is if there is no boxes for a while there is no shift or if the boxes are random spaces so a shift of a box on PE1 then a gap of say 1 mtr. fine if all boxes are consistent. There is only one real way to track them is with a type of encoder, however, it depends how long the conveyor is and if quite long would require a massive shift register for a normal encoder. I have done what I described above on a sortation system. normally each leg would have a barcode reader, however, on this occasion there was not the pennies for that so a proximity and a flag was enough, normally again if the resolution was good then you would not need a PE on the diverter, which was the case on some of the lines even then the shift register was massive. I cannot remember now but the time for each shift was shorter than the box so although the divert window had to be larger the PE before each reject ensured that the box was there and the PE front edge plus a time delay ensured the box was diverted. And the fifo word (words) for the window would be reset, this was required as there were 15 divert stations hence the word shift as it contained the bar code (although in simple form 1-99).