System designHow-to

Vision system reject delay timer: fixed delay or bottle tracking

Set the reject delay from camera-to-solenoid distance and line speed, and track each bottle with a confirm sensor when the line speed will not hold still.

LumaSpec Vision10 min read Share on LinkedIn

On this page 8 sections
  1. 01How much delay does a vision reject signal need?
  2. 02When is a timed delay relay good enough?
  3. 03How do you measure line speed, distance and latency for the timer?
  4. 04What parts turn a fail signal into a tracked reject?
  5. 05How does the tracked reject logic work, step by step?
  6. 06How do you prove the right bottle is rejected?
  7. 07What goes wrong with timed rejects, and how do you prevent it?
  8. 08Questions

A bottling line camera flags a no-good bottle and the reject solenoid fires at once — into whatever bottle is under the nozzle at that instant. The missing piece is a delay between the verdict and the blast, and that delay is a number you can calculate: the bottle's travel time from the camera to the reject station. This guide is for the engineer wiring that reject. You will compute the delay from distance and speed, decide whether a timed delay relay can hold on your line or the bottles need position tracking, wire the confirm sensor and the logic, and prove the right bottle drops.

How much delay does a vision reject signal need?

Set the timer to the bottle's travel time from the camera's inspection point to the nozzle, minus the camera's and the valve's own response: 1.2 m at 0.6 m/s is 2.0 s of transit, and after subtracting 0.06 s of camera latency and 0.04 s of valve response the delay is 1.9 s.

Where each term comes from:

  • L — tape the run from the plane where the image forms (about the lens front) to the nozzle axis, with the line stopped.
  • t_cam — trigger-in to fail-out on the camera, from its result timestamps or two PLC timestamp reads. A smart camera deciding five bottles per second typically lands between 30 and 100 ms.
  • t_valve — coil voltage to air reaching the bottle: typically 20–50 ms for a small direct-acting valve with short tubing.
  • Blast time — keep it shorter than the pitch time, or the air reaches the next bottle too.
t_delay = L / v − t_cam − t_valve allowed speed swing for a fixed delay = pitch / (2 × L)

When is a timed delay relay good enough?

A fixed relay holds only while line speed stays within the pitch divided by twice the camera-to-nozzle distance: with a 120 mm pitch and a 1.2 m run that is 0.12 / (2 × 1.2) = 5%, so the line must hold 0.57–0.63 m/s and no wider.

The relay repeats one time and assumes one speed. Position error at the nozzle grows as L × Δv/v: run the same line at 0.55 m/s and the flagged bottle arrives 1.2 m × (0.05 / 0.6) = 100 mm late — more than the 60 mm half pitch — so the good bottle ahead of it takes the blast and the bad bottle rides on downstream. Start-ups, accumulation pushing back, a warm-up ramp and belt wear all open that gap during a shift.

If your measured spread fits the band, buy the right timer function: a delay-on-make, one-shot timer that starts on the rising edge of the fail signal and ignores further edges until the blast is done. Off-delay (delay-on-break) and repeat-cycle timers trigger or retrigger on the wrong edge and smear pulses when rejects cluster. Any interposing relay stage adds its own few milliseconds of operate time; the timer setting absorbs it.

Decision: compute pitch / (2 × L) for your line and compare it with the speed spread you measured. Fits with margin — a relay is fine. Does not fit — build the tracked reject below.

How do you measure line speed, distance and latency for the timer?

Measure the three inputs directly: time 10 bottles past a reference mark, tape the lens-to-nozzle distance with the line stopped, and timestamp the camera's trigger-in and fail-out edges — 2.0 s for 10 bottles at a 120 mm pitch reads v = 0.12 / 0.20 = 0.6 m/s.

A stopwatch and a tape are the whole job for speed and distance. For latency, most vision tools stamp trigger and result times; otherwise toggle a known input and read both edges in the PLC. The same offset arithmetic applies upstream of the camera too — camera trigger delay timing for offset inspection sensors works that side, and trigger call versus exposure time explains what happens between the trigger edge and the finished verdict.

Re-measure after any belt change, nozzle move or recipe speed change; the number lives in the machine, not in a drawer.

What parts turn a fail signal into a tracked reject?

You need three parts beyond the camera: a photoelectric confirm sensor at the reject station, a small PLC or smart relay that keeps a per-bottle fail list, and a valve stage that can drive the solenoid coil cleanly.

Camera side. The verdict output should hold as a level until the next bottle rather than blink for a millisecond. If you are specifying the camera as well, look for a global shutter and a discrete result output; the smart cameras range is filtered by both, and the camera finder narrows by mount and interface:

Smart cameras & vision sensorsHikrobot MV-SC3050XC-16M-ATN-H 5 MP color vision sensorMV-SC3050XC-16M-ATN-H
Interface
Fast Ethernet
Resolution
5 MP
Sensor format
1/1.45"
Shutter
Global
$1,809.00View part

The MV-SC3050XC-16M-ATN-H is a 5 MP color vision sensor with a global shutter on Fast Ethernet.

Confirm sensor. Mount a diffuse photoelectric sensor just upstream of the nozzle, looking across the bottle path, and set its sensing distance so the guard rail and the belt behind stay out of range. The shop's photoelectric sensors are sorted as part-present triggers for exactly this job. The MV-PE5502 covers 10–350 mm with a settable distance, a red LED spot and an NPN output:

Photoelectric sensorsHikrobot MV-PE5502 Diffuse-reflective sensor(10-350mm, Red LED, settable distance, NPN)MV-PE5502
Output
NPN
Light source
Red LED
Sensing range
100 mm - 1 m
Type
Diffuse-reflective
$49.00 · quotedView and quoteBuild a system with it

Logic and valve stage. A small PLC or a smart relay holds the per-bottle list. Depth is the bottle count in the run: 1.2 m / 0.12 m = 10 bottles, so keep 16 flags of headroom. Drive the coil from an interposing relay or a transistor channel rated for it, fit a flyback diode across a DC coil, and match PNP/NPN to the input card on both the camera and the sensor.

How does the tracked reject logic work, step by step?

Track bottles, not seconds: push a 1 for each fail and a 0 for each pass into a shift register, then pop one entry at every confirm pulse and fire the solenoid when the bit is 1.

  1. Trigger per bottle. Fire the camera from an upstream photoelectric sensor so every bottle produces exactly one verdict; the sensor- versus free-run choice is the same one fixed barcode readers make for their trigger modes.
  2. Latch the verdict. Configure the fail output as a level that lasts until the next trigger. If the camera only offers a pulse, keep it wider than two PLC scan times; why trigger pulse width sets your camera exposure time shows how pulse settings and camera timing interact.
  3. Push the bit. On each verdict, load 1 (fail) or 0 (pass) into the register. Most small PLCs ship this as a shift-register or FIFO pair; the FIFO reject tracking pattern for bottle conveyor inspection shows the logic block by block.
  4. Pop at the station. Each confirm pulse shifts one bit out. A 1 starts a short on-delay of d_sensor / v — with the sensor 100 mm upstream of the nozzle, 0.10 m / 0.6 m/s ≈ 0.17 s — then energizes the valve for 50–100 ms; lengthen until the bottle leaves the belt, keeping it under the 0.20 s pitch time.
  5. Watch the count. Verdicts in must equal confirm pulses out, every shift. A bottle that jams, stops or is lifted out between camera and station shifts every later bit by one, so alarm on a count mismatch and resync at the upstream trigger.

The payoff is scale: the only timed leg left is the 100 mm from sensor to nozzle. At the same ±8% speed swing that put the fixed relay 100 mm off, the tracked design misses by 0.10 m × 0.083 ≈ 8 mm — twelve times smaller and deep inside the 60 mm window. A conveyor encoder can replace the confirm sensor by counting one pitch of ticks from the camera; that trades wiring for resync logic, and why encoder-triggered image capture drops images at high RPM covers the counting pitfalls at speed. For the register-versus-encoder choice on a variable-speed line, this comparison of shift register, FIFO and encoder tracking for bottle rejects lays out the trade-offs.

How do you prove the right bottle is rejected?

Run marked bottles and count: paint 20 no-good bottles, run 10 at the slowest and 10 at the fastest speed, and accept only 20 of 20 in the bin with 0 of 20 good bottles kicked behind them.

  • Force fails without stopping the line: a painted test bottle, a covered lens, or a software-forced verdict — whichever your station supports.
  • Sweep the speed band you actually run, including start-up and full rate, not just the nameplate speed.
  • Run a false-reject check: 20 good bottles through the station must put 0 of 20 in the bin.
  • Check count integrity over 100 bottles: verdict count at the camera equals pulse count at the station.
  • Watch the blast time at the fastest rate: it must end before the next confirm pulse, 0.20 s apart here.

Paper the results: date, line speed, timer or register settings, pass counts. When the belt, the nozzle or the recipe speed changes, run the marked-bottle sweep again before calling it done.

What goes wrong with timed rejects, and how do you prevent it?

Three failures dominate: speed drift moving the blast to a neighbour, merged blasts on back-to-back rejects, and counter desync after a jam — at 0.6 m/s a bottle covers 12 mm in 20 ms, so each forgotten 20 ms of lag shifts the blast a tenth of a pitch.

  • Speed drift — the fixed-relay failure from the 5% rule above; the fix is tracking, or a measured speed band you hold.
  • Back-to-back rejects — at a 0.20 s pitch a one-shot relay fires once for two adjacent bad bottles; the register pops twice.
  • Desync — one lifted bottle shifts every later bit; the count alarm catches it at the first mismatch.
  • Slow switching — an electromechanical stage adds a typical 5–15 ms, up to 9 mm at 0.6 m/s; fold it into the timer on a fixed-delay line, and it disappears inside a tracked one.
  • No bin interlock — a full or missing bin leaves bad bottles on the line; a simple bin-present input gates the whole reject output.

Finish the job in an afternoon: pick the confirm sensor from the part-present trigger sensors finder, walk the trigger step of the system configurator to match sensor, camera and wiring, and contact the applications team with your pitch and speed if the numbers above do not close.

Questions

Can I fire the reject solenoid directly from the camera's output?

Usually not. A vision output is rated for small loads, while a solenoid coil draws inrush and kicks back with a flyback spike when it drops out. Interpose a relay or a PLC transistor channel, fit a flyback diode across a DC coil, and keep the PLC in the path so the delay, the blast timer and an inhibit switch all live in one place.

How wide should the camera's no-good pulse be for the relay or PLC to catch it?

Wider than the slowest reader. A level that holds until the next bottle's trigger is the robust setting; if the camera only pulses, keep the pulse longer than two scan times of the PLC and longer than the operate time of any interposing relay, which runs about 5-15 ms for an electromechanical type. Then re-time the blast, because the pulse width becomes part of the delay.

How deep does the reject register need to be between camera and solenoid?

One entry per bottle in the run, plus headroom: camera-to-nozzle distance divided by bottle pitch. At 1.2 m and a 120 mm pitch that is 10 bottles, so a 16-deep register covers the line and rides through a short accumulation backup. If bottles can queue back past the camera, trigger and count from the upstream sensor instead so the depth stays defined.

Does a tracked reject still need the confirm sensor if there is a conveyor encoder?

No, an encoder can do the counting: one pitch of ticks after the verdict, the output fires. What an encoder cannot do is repair itself after a slipped bottle or a belt clean, so add a resync: re-qualify each bottle at the upstream trigger sensor, or keep the confirm pulse and use it to re-zero the count every bottle.

What happens on my line when two bad bottles arrive one after the other?

A tracked register queues both flags and fires the valve twice, or stretches one blast to cover both. A plain one-shot delay relay usually fires once for the pair, so the second bad bottle rides through to packing. This is the classic failure that moves lines from a standalone timer to a small PLC with per-bottle tracking.