ApplicationsApplication note

Verifying a cap is fully seated on translucent syringes with vision

How to verify a cap is seated on syringes with a smart camera: backlight and wavelength choice, edge gap limits, dwell-time math and a worked lens example.

LumaSpec Vision11 min read Share on LinkedIn

On this page 10 sections
  1. 01The measurement: one gap, read in silhouette
  2. 02The time budget at 3 parts per second
  3. 03Lighting: backlight, and usually 850 nm
  4. 04Optics: a 0.4x telecentric fixes the scale
  5. 05Camera: three workable set-ups
  6. 06Software: anchor, measure, watchdog
  7. 07Pitfalls that create false rejects
  8. 08When the backlit gap is the wrong measurement
  9. 09Checks before you order
  10. 10Questions

A pre-fill syringe line that snaps caps onto barrels needs a check between assembly and filling: the cap can be missing or half-clicked, and either one spills product at the fill station. This guide builds that check on an 8-station indexer running 3 parts per second, with milky-white translucent plastic and six product variants. You finish with the measurement that decides the case, the timing budget, the backlight and wavelength, the lens and camera, and the limits to teach. The same set-up pattern fits other snap-fit and press-fit parts on dial indexers.

The measurement: one gap, read in silhouette

Backlight the syringe and measure the axial distance between the cap skirt's lower edge and the barrel flange's upper edge. That one number separates every failure mode:

  • Fully seated: 0 to 0.5 mm of visible gap. Pass.
  • Half-clicked: 1.0 mm or more. Reject.
  • Missing cap: no second edge anywhere in the search band. Reject.
  • Tilted cap: left and right gap differ by more than 0.3 mm in the same image. Reject.

A side view shows both silhouette edges of the cap and the flange at once, so the tilt check is free. A top-down view of the cap top does not work here: six variants with different tip lengths put the cap top at different heights, while the skirt-to-flange gap means the same thing on every one. The same camera platform can later take on print checks such as verifying syringe scales with industrial vision. The geometry behind silhouette versus surface lighting is covered in lighting angles: surface or silhouette, and the general method in dimensional measurement for small parts.

Treat the 0.5 and 1.0 mm figures as your starting limits and confirm them on real caps before lock-down, as the checklist below does.

The time budget at 3 parts per second

t_cycle = 1 / rate = 1 / 3 = 333 ms t_dwell = (90 / 360) × t_cycle = 0.25 × 333 ms = 83 ms

The 90-degree cam dwell gives 83 ms of near-standstill per station and 250 ms of motion between stations. Spend it like this: 15 ms settle after the index, a 2 ms exposure, then 10-30 ms of tool time for one pattern match plus two edge pairs. Worst case 47 ms, inside the 83 ms window with room to spare. Residual vibration of 5 mm/s during a 2 ms exposure smears the image by 0.01 mm — about one pixel, invisible at these tolerances. Trigger from the indexer cam or the PLC at dwell start, never on a free-running timer.

Latch each failure against its station number and fire the reject at unload: at 333 ms per index, a cap that fails at station 3 reaches the diverter five indexes later, about 1.7 s. A comparable fast check on a dial machine is worked through in measuring points on a 5 mm part in under a second.

Lighting: backlight, and usually 850 nm

Milky-white plastic is translucent. A white backlight shines through the wall, scatters inside it, and comes back out, so the part reads grey and its outline softens exactly where you need a crisp edge. Near-infrared scatters far less in polypropylene and polyethylene, so at 850 nm the same part silhouettes almost black on a bright field — the same effect that lets NIR fill-level inspection see liquid through a bottle wall.

Because your dwell is long, you do not need strobing at all:

The LS-BKL-0416 is a standard backlight with a 136.4 x 136.4 mm lit area at 850 nm, 24 V, constant-on only.

Constant-on is normally a restriction; with 83 ms of standstill it is exactly right — no strobe wiring, no light controller, and a rolling-shutter camera stays in play. Two panels cover both paths:

BacklightsBacklight, 136.4 x 136.4 mm lit area, 850 nm Infrared, no driver needed, constant on only (LS-BKL-0416)LS-BKL-0416
Size
100-200 mm
Type
Standard
$2,109.00 · quotedView and quote
Backlights120 x 120 mm Collimated back light (LS-BKL-0830)LS-BKL-0830
Size
100-200 mm
Type
Collimated
$309.00View part

The LS-BKL-0830 is a collimated backlight with a 120 x 120 mm face. Collimated rays leave nearly parallel, so the tangent edge of a round part lands on fewer pixels. Step up to it if the worst variant still reads fuzzy behind the standard panel; the trade-offs are laid out in collimated backlight or diffuse backlight for edge gauging.

Mounting on a 10-inch dial: the parts sweep a circle, so the panel lives just outside it with the camera opposite, and a 30-60 mm part-to-panel gap clears the passing fixtures while keeping the field bright — illumination falls with the square of distance. The panel must cover the vertical travel of the cap zone across all six variants; 120 mm of lit width does that when variant cap heights differ by tens of millimetres. A 24 V DC supply is all the driving this needs. Further sizes and wavelengths are in backlights and the light finder.

Optics: a 0.4x telecentric fixes the scale

Syringes sit in pockets; height varies a millimetre or two between hits, and variant lengths differ more. With a standard lens the scale moves with height: at a 250 mm working distance and a 71 mm lens at 0.4x, one millimetre of height change shifts magnification by 1 / (250 − 71) ≈ 0.56 %, and 0.56 % of a 32 mm view is 0.18 mm — most of a 0.25 mm guard band. A telecentric lens images at one magnification regardless of height, which also fixes your mm-per-pixel scale for all six variants with a single calibration.

The LS-TCL-0574 is a 0.4x fixed-magnification lens with a 227 mm working distance, a C-mount and a 1.2-inch image circle.

Machine vision lensesFixed-magnification lens, 0.4x, 227 mm WD, 1.2" (LS-TCL-0574)LS-TCL-0574
Sensor format
1.2"
Mount
C-mount
Image circle
16-22 mm
$2,269.00View partBuild a system with it

At 0.4x, a 1-inch sensor 12.8 mm wide and 9.6 mm tall covers a 32 x 24 mm field — flange, cap skirt and anchor pattern on every variant, with long tips cropped harmlessly outside the frame.

Perspective with a standard lens compared with a telecentric lens Left: the same part at two distances appears at two sizes through a standard lens. Right: a telecentric lens accepts only rays parallel to its axis, so the part appears the same size at both distances.Standard lensfarnearsensorThe same part looks bigger when nearer:its measured size depends on distanceTelecentric lensOnly rays parallel to the axis enter:the same size at any distance
Perspective with a standard lens compared with a telecentric lens. Left: the same part at two distances appears at two sizes through a standard lens. Right: a telecentric lens accepts only rays parallel to its axis, so the part appears the same size at both distances.

If you accept the height sensitivity, a standard lens also works and the arithmetic is short:

m = sensor width / field of view f = WD × m / (1 + m)

For the same 32 mm field at 250 mm: m = 12.8 / 32 = 0.4, then f = 250 × 0.4 / 1.4 = 71 mm, so fit a 75 mm C-mount lens from the lens finder and hold the parts better. How many pixels the measurement needs is a separate question, handled in camera resolution for dimensional inspection.

Lens focal length, field of view and working distance
Units
Solve for
Focal length
– mm
Field of view
– mm
Working distance
– mm
Magnification
– x
Angle of view
– °
Pixel on the part
– mm

Thin-lens model: m = sensor width / field of view, f = WD × m / (1 + m). Accurate to a few percent above about 150 mm; check the lens's minimum object distance.

Find lenses with this focal length Open the full calculator

Camera: three workable set-ups

All three architectures below do this job; they differ in how many variants they carry without touching hardware.

Set-up Strength Limit Use it when
Vision sensor: HK-TD032-12-WBN, 1.6 MP mono, Fast Ethernet, M12 Presence and a coarse gap at one fixed geometry Re-teach by hand at every changeover One variant, tight budget
Fixed-lens smart camera: MV-SC5060XM-08M-WBN, 6 MP mono, 8 mm M12, GigE Calibrated gaps, recipes over Ethernet One fixed field must fit every variant Variants share a similar cap zone
C-mount smart camera: LS-SMC-0017, 8.8 MP, 1-inch sensor, global shutter Any lens, full metrology You choose the lens (done above) Six varied shapes — the pick here

Figure a typical M12 field for the sensor row: at 160 mm working distance and about 0.08x, a 5 mm-wide sensor covers roughly 62 mm, and across 1440 pixels that is 0.043 mm per pixel. The 1.0 mm reject line spans 23 pixels — a clean pass or fail, not metrology. The rolling shutter of the fixed-lens camera is safe in this line because the part stands still under a constant-on panel; strobing would band the frame, so keep the light steady or move to a global-shutter sensor.

The camera for the six-variant line:

Smart cameras & vision sensorsSC / SC smart camera (X86 platform), 8.8 MP, USB3, Color/Mono, global shutter (LS-SMC-0017)LS-SMC-0017
Interface
USB 2.0
Resolution
6-10 MP
Sensor format
1"
Shutter
Global
$1,359.00View part

Sensors in that class run about 3.1 µm pixels, so at 0.4x each pixel spans 7.8 µm of the part. The 0.5 mm pass limit is 64 pixels wide, and tenth-pixel edge interpolation resolves 0.8 µm in theory; on translucent silhouettes the real repeatability lands near ±0.02 to ±0.05 mm, set by the light, not the pixels. Browse smart cameras and vision sensors for the full range. If your variants blur the rules, the trade in AI versus rule-based smart camera inspection applies to the tools, not the camera.

Software: anchor, measure, watchdog

Build the check in four tools so changeover is electrical, never mechanical:

  1. Pattern match on the barrel flange. This anchors everything; the fixture is never the reference.
  2. Two edge pairs, left and right: the flange's top edge and the cap skirt's bottom edge. Gap in millimetres comes straight from the fixed 0.4x scale. Left minus right gives tilt.
  3. Trend the edges: average 10-20 edge points along each scan line so a local flaw cannot move the reading.
  4. A blob watchdog on the cap area, scored by size and contrast. It rides over parting-line flash and catches a missing or shattered cap even if an edge tool mis-locates.

Store six recipes in the camera and select them with three PLC bits from the machine's recipe system. Each recipe holds its own pattern, scan windows and limits, taught once from a golden part. Output is a fail latch tagged with the station number, consumed by the diverter at unload.

Pitfalls that create false rejects

  • Parting-line flash on the cap skirt (handled above) is the number-one cause of nuisance stops on snap caps.
  • Focus shifts slightly between visible and 850 nm light. Focus with the panel lit, through the actual lens, or your sharpest image sits behind the part.
  • Strobed light plus a rolling shutter gives banded frames. Stay constant-on with this dwell, or change to a global-shutter camera.
  • A panel mounted far back to dodge the fixtures loses brightness fast; 30-60 mm of standoff is the working range.
  • A jam-clear that rotates the dial under power loses the station count. Re-home before restarting, or the reject fires into the wrong pocket.

When the backlit gap is the wrong measurement

  • Glass barrels: near-infrared helps less and reflections bite. Use a collimated white panel, lengthen the working distance, and budget a day of lighting trials for the wall outline.
  • No room behind the dial: view from below through the indexer gap with a 45-degree mirror, backlight beyond the part. If that is blocked too, a top camera measuring cap-top height above the flange works as a coarser secondary signal on variants where the tip length is fixed.
  • Rate pushed past about 10 parts per second, where dwell drops under 25 ms: switch to a strobed panel and a global-shutter camera; constant-on gets marginal.
  • Cap and barrel both water-clear: silhouette contrast vanishes entirely. Move to reflected light and check a cap feature instead of the gap.

Checks before you order

  • Longest and shortest variant both fit the 32 x 24 mm field at one camera height — otherwise every changeover moves the mount.
  • Limits taught on 20 seated and 10 deliberately half-clicked caps, with at least 0.4 mm of guard band between the two groups.
  • Backlight panel covers the vertical travel of the cap zone on all six variants.
  • Cam or PLC trigger at dwell start wired in, with the 15 ms settle delay configured.
  • Three recipe-select wires from the PLC to the camera, one per recipe bit.
  • Focus verified with the 850 nm panel lit, not with a visible bench lamp.
  • Worst-case flash parts run 100 cycles with zero false rejects.
  • Reject output mapped to the unload-station offset and proven with a half-clicked test cap.

The fastest path from here is the system configurator started at the lens step, or talk to us with the drawings of your six variants and we will size the field and the panel for the lot.

Questions

How much dwell time does a cap check need?

Budget 2 ms of exposure and 10-30 ms of tool time for one pattern match plus two edge pairs, so about 50 ms end to end. The 83 ms dwell on this indexer leaves close to double that. Even a 30 ms dwell works if you trigger at its start, hold exposure under 1 ms, and let the camera finish evaluating while the dial moves.

Why does the milky-white syringe glow under a white backlight?

Visible light enters the wall, scatters, and comes back out, so the part reads grey and its outline softens. Near-infrared at 850 nm scatters far less in polypropylene and polyethylene, the usual syringe materials, so the silhouette goes almost black. 940 nm goes deeper still if 850 nm leaves too much glow. A collimated panel tightens the tangent edge on top of that.

Should I use edge tools or a blob tool on the cap?

Edge pairs give the calibrated millimetre gap and the left-right tilt number, which is what fully seated means. A blob tool scores the cap area by size and contrast and shrugs off parting-line flash, but it will not separate 0.5 mm from 1.0 mm reliably. Run the edge pair as the measurer and the blob as a presence watchdog that catches a missing or shattered cap.

How do six variants run without realigning anything?

Store one recipe per variant in the camera and select it with three PLC bits at changeover. Every recipe anchors its own pattern on the barrel flange, so the scan windows follow the part rather than the fixture, and the 0.4x scale is common to all. Teach each recipe once from a golden part; the only per-variant content is the pattern, the windows and the limits.

What gap limits should I set for pass and reject?

Start with pass at 0.5 mm or less and reject at 1.0 mm or more, then confirm on real parts: measure 20 capped-by-hand seats and 10 deliberately half-clicked caps. If the seated group tops out near 0.6 mm, move the reject line to 1.2 mm and keep at least 0.4 mm of guard band between the groups. Lock the limits in the recipe, not in the PLC.