As far as gap measurement goes, it it really time based or are you trying to indirectly measure the distance between pans? If distance, use an encoder into a high speed input and have a maximum number of counts for the pan to be present. If normal is 100 encoder counts and you get to 140, you know there is more than one pan.
Also, how soon after the gap is supposed to have started do you need to know about the jam? If it's not too soon, you can use a large multiplier, like 1.4 as I described. If not, you could use a small multiplier like 1.1 and declare a jam at 105 counts, but you might get more false positives.