Problem programming a conveyor to stop near a proximity sensor

MilkMan406:
We are trying to automate a cookie making process and would like to get part of it to work.

Is this a real application, or a college\school proramming exersise ?