Here is some logic for bit & word tracking shift (FIFO) Both use a timer to generate the pulses however, for accuracy it would be better to use a prox on a drive to give pulses, depending on the part size & speed you may not need a fast pulse like an encoder as the shift register would be very large of you could count the pulses (say 20) then use the count to create a pulse & reset the counter so effectively divide by 10. In the word shift data is entered into D0, the shift pulse shifts the data in to the FIFO & then resets the data on the same scan, this stops the data being entered into more than one register. On this application a range of registers at the end of the shift are used to detect the part as using a timer instead of an absolute count from the conveyor may introduce differences in conveyor speed so not strictly synchronised with the conveyor. This window will have to be less than the distance between the parts plus the part width. This was done in GX Developer so depending on your PLC will need to use the equivalent functions.