A 42EF retroreflective eye bolted 150 mm back from the discharge roller of a 1.5 m zone stops a 600 mm carton with 750 mm of zone still behind it, and stops a 1219 mm carton with 131 mm. Move the same eye to 50 mm from the discharge and the first carton overshoots into the next zone on one stop in twenty; leave it at 150 mm and run a 1500 mm pallet base and the tail of that pallet is standing in the zone upstream while the logic believes that zone is empty. Both faults are photo-eye placement, and neither of the two numbers that fix it is on the conveyor drawing.
The eye goes at the discharge end of the zone, set back from the last roller by the distance a carton travels between breaking the beam and actually stopping, measured, with margin. Any product longer than the zone pitch minus that setback holds two zones when it stops, and the zone logic has to be told so.
Everything below is worked on the twelve-zone line from the zone logic article: a 5069-L320ER CompactLogix, one polarised retroreflective 42EF per zone into a 5069-IB16, a PowerFlex 525 per zone motor, zone logic in a 50 ms periodic task, 1.5 m zone pitch, belt speed 0.280 m/s measured with a chalk mark and a stopwatch.
Photo-eye placement worked from the stop, not from the drawing
The drawing says the eye is at the discharge end. It never says how far back, because the person who drew it did not know how the drive was going to be set.
Start with what happens between the beam breaking and the carton standing still, because the setback is that distance and nothing else. The 42EF retroreflective models are rated at a 1 ms response time in 42EF-TD001, the 5069-IB16 ships with a 1 ms input filter that 5069-UM004 lets you take anywhere from 0 to 50 ms, and one pass of a 50 ms task is the rest of the detection chain – call it 52 ms, which at 0.280 m/s is 15 mm of travel before the run bit has even been cleared. Then the stop command has to reach the drive over the EtherNet/IP connection, another RPI’s worth, and then the drive ramps down. That ramp is the term that matters: P042 Decel Time 1 on a PowerFlex 525 is defined in 520-UM001 as the time from P044 Maximum Freq down to 0 Hz, so a zone running at the full 60 Hz with P042 at 0.50 s takes the whole half second to stop, and a belt decelerating linearly from 0.280 m/s covers half of what it would have covered at speed – 70 mm.
Fifteen plus seventy is 85 mm on paper.
Then measure it, because the paper number is a floor.
Chalk a mark on the roller frame level with the beam, run a 600 mm carton into the zone with the downstream zone held full so the logic stops it, and tape from the mark to the carton nose. Do it twenty times, with the line loaded the way it runs on a normal shift, and do a few of them first thing in the morning before the gearboxes are warm. On this zone the twenty stops came out between 56 and 97 mm – 12 mm over the calculation at the worst, on a stop where the belt was carrying six cartons and the gearbox was cold – and the 97 is the number the setback has to cover, and 100 mm does not cover it. 150 mm does, with room for a longer ramp, and it also happens to be two roller pitches on 75 mm rollers, so that is where the eye went.

Stops 1 to 20, chalk mark to carton nose. The calculated 85 mm is a floor; the loaded, cold stop at 97 mm is what the setback has to beat, and 150 mm beats it with room for a longer P042.
The eye cannot go exactly where the arithmetic says anyway.
A retroreflective beam has to pass between two rollers, so on a 75 mm roller pitch the mounting position snaps to the nearest gap and the setback is really 150 mm plus or minus half a pitch. Measure the beam position after the bracket is tightened, not the bracket position on the drawing, and write the real number on the zone sheet, because the long-product threshold in the next section is calculated from it.
Why not further back, to be safe
Because every millimetre of setback comes out of the zone. A carton stops with its nose on the beam, so the usable length of the zone – the length a stopped product can occupy without crossing into the zone upstream – is the pitch minus the setback. At 150 mm that is 1350 mm on a 1.5 m zone. At 300 mm, which is where people put the eye when they have been burned once by an overshoot, it is 1200 mm, and the 1219 mm carton that fitted before now hangs 19 mm into the zone behind it on every stop. The setback should be the measured stop distance plus margin for a longer ramp, and no more.
Measured stop, plus margin. Not a round number that felt safe.
What a long carton does, and the rung that handles it
Nothing about the eye changes. What changes is which zone the carton is in when it stops.
The 1219 mm carton stopped on PE6 has its tail 131 mm inside zone 6, so zone 5 is genuinely clear and can accept a release from zone 4 without anything touching. Put a 1500 mm pallet base on the same eye and its tail is 150 mm into zone 5; PE5 sits 1350 mm upstream of PE6 and does not see it, so zone 5 reads clear, zone 4 releases into it, and the incoming carton runs into the back of a stationary pallet at 0.280 m/s. That is not a jam and the jam timer will not call it one, because zone 4’s eye clears on time and zone 5’s eye makes on time – the carton arrived, it just arrived by hitting something. The only sign is the crushed corner and, if you are lucky, a pallet base pushed 150 mm downstream so that its nose is past the beam and zone 6 now reads empty with a pallet on it.

Same eye, two products. The usable length behind the beam is pitch minus setback, 1350 mm here, and a product longer than that is standing in two zones whenever it stops.
So the logic needs a bit that says “the product on this eye is long”, and the honest way to get it is to measure every product once, at the infeed. An eye at the infeed of zone 1 is blocked for the product’s length divided by the belt speed, 4.35 s for the 1219 mm carton at 0.280 m/s, and a TON started on the eye’s rising edge and read on its falling edge gives you that time to within one task period – 50 ms, or 14 mm, which is more than good enough to decide whether something is over 1350 mm. If the infeed section is on an encoder, count pulses while the eye is blocked instead and the answer stops depending on speed; that arithmetic is in wiring an encoder to a high-speed counter input. Either way the length rides along with the product in the tracking record, so when it lands on PE7 the zone can look up what it is holding, and from there the zone logic gets two new terms: Zone[i].Long is true while the product on Zone[i].PE has a measured length greater than the pitch minus the setback, and Zone[i-1].Occupied becomes true when its own eye is blocked or when the zone downstream is holding a long product. That second term is the whole fix – it keeps zone 5 from reporting itself ready while a pallet tail is in it, without a second sensor in the zone – and the release rule in the singulation handshake then needs no change at all, because it already asks whether the downstream zone is ready and ready already tests NOT Occupied. What does need a look is the jam timer’s non-arrival preset on the zone behind a long product, because a 1829 mm bundle on PE6 blocks PE5 too, and a zone whose eye is blocked by somebody else’s tail is not jammed. Gate that timer on the zone’s own Owns bit and the problem goes away.
(* infeed: measure every product once *)
InfeedTmr.PRE := 60000;
InfeedTmr.TimerEnable := PE_Infeed;
TONR(InfeedTmr);
IF NOT PE_Infeed AND PE_Infeed_Last THEN (* falling edge: product has cleared *)
NewLen_mm := DINT_TO_REAL(InfeedTmr.ACC) * 0.280; (* ms x m/s = mm *)
InfeedTmr.Reset := 1;
Track[1].Len_mm := NewLen_mm;
END_IF;
PE_Infeed_Last := PE_Infeed;
![Two ladder rungs: Zone[6].Occupied driven by Zone[6].PE in parallel with Zone[7].PE and Zone[7].Long, and Zone[7].Long driven by Zone[7].PE and a GRT of the tracked length against 1350](https://plctr.com/wp-content/uploads/photo-eye-placement-accumulation-zone-long-box-2.png)
Rung 12 is the zone-occupied rung from the zone logic article with one parallel branch added. Rung 13 sets Long from the tracked length; the 1350 comes from the measured eye position, not from the drawing.

Pitch minus setback is 1350 mm. Anything at or beyond it is a two-zone product and Long has to be true for it; the 1829 mm bundle also reaches the upstream eye, which is a jam-timer problem as well as an occupancy one.
One more decision before a mixed line runs: a carton placed on zone 6 by hand after a jam clear has no tracking record, so default a missing Len_mm to the longest product you run, not to zero.
A short product treated as long costs one release. A long product treated as short costs a pallet.
Height, angle and the reflector
The beam sits 60 mm above the roller tops on this line, and that number was arrived at by cutting a strap. Too low and a loose flap, a strap end or a piece of stretch film hanging off the side trips the eye between products; too high and a flattened tote or a low tray passes underneath. Sixty millimetres clears everything this line runs with the shortest product at 110 mm, and it is written on the zone sheet with the setback. Keep the beam square across the conveyor: an eye angled to make the bracket easier adds to the effective product length, because the nose breaks the beam early on one side and the tail clears it late on the other, and a 10 degree skew across a 600 mm wide zone is 105 mm of extra apparent length that the infeed measurement will faithfully report. The polarised retroreflective 42EF is rated to 3 m against its reflector in 42EF-TD001, so width is never the constraint; the reflector being on the far side, clean, and mounted so a carton corner cannot clip it is.
The thing everyone checks first
The sensor.
When a carton overshoots into the next zone the first call is that the eye is reading late, and the sensor gets cleaned, realigned and eventually swapped for the spare. It is not the sensor – a 1 ms device cannot be late by 40 mm – and the proof is that the overshoot is the same with the spare fitted. Go and read P042 on that zone’s drive against the commissioning printout, because a decel time that was stretched from 0.50 s to 1.00 s to stop tall product rocking doubled the ramp distance from 70 mm to 140 mm, and a 100 mm setback that was fine in March is 40 mm short in June. Then check the light-operate against dark-operate suffix on the replacement, because on the 42EF family that is a catalogue-number decision and a spare ordered one letter wrong inverts the zone, which is a different symptom altogether.
Next step
Walk the line with a tape and write two numbers on every zone sheet: the beam position measured from the discharge roller, and the pitch minus that number. The second one is the long-product threshold for that zone and it is different on the 4 m zone than on the 1.5 m ones. Then find the longest thing the line has ever run and compare it against the smallest threshold, because if it is over, the line has been running a two-zone product with one-zone logic and the crushed corners were never the sensor’s fault. The other half of what the eye has to survive – the input card’s own filter, and whether a sinking sensor was landed on a sourcing point – is in the input module article.