◇ Machine vision · Application

Assembly verification.

Is every part there, is it the right one, is it the right way round, and is it all the way home? Assembly verification sounds like the easy end of machine vision, and most of the checks are. The hard part is choosing the right device for each check, seeing a half-seated connector, and proving later which images passed which serial number.

9Assembly errors covered, from missing clips to wrong labels
≈0.016mm per pixel on a 40 mm side view of a connector
3Poka-yoke methods: contact, fixed-value, motion-step
In short

Design the error out first, sense the simple things with simple sensors, and use cameras where one image can confirm many things at once. Every check should end in a PLC interlock and a record tied to the part serial.

Presence, count and position are rule-based camera work and are very reliable when the lighting is fixed. Seating is a measurement, not a presence check, and needs a side view or a height sensor. Flexible parts, twisted O-rings and high variant counts are where deep learning pays. When there are many inspection points, decide early between fixed cameras and one camera on the robot, because that choice sets your cycle time.

Defect catalog

Nine ways an assembly leaves the station wrong.

Assembly errors are mistakes of omission, selection, orientation and completion. Each card shows what the camera sees and which tool usually catches it.

missingpresenttop view Presence

Missing component

What it is: a clip, spring, washer, gasket or label that never went on. How vision catches it: a region of interest at each location, checked with pixel count, a pattern match or a small classifier. One image can check dozens of locations, which is where cameras beat a row of discrete sensors.

Pattern matchPixel countPer-ROI result
wrong variant3 ribs · goldtop viewrecipe: teal band, 2 ribs Variant

Wrong part or variant

What it is: a left-hand bracket on a right-hand build, the 12 V relay in the 24 V unit, a cap in the wrong color. How vision catches it: compare against the variant the MES says this serial should be, using color, a distinguishing feature or a printed part number. The check is only as good as the recipe lookup behind it.

ColorFeature matchRecipe from MES
11correctrotated 180°top view Orientation

Orientation and polarity

What it is: a symmetric-looking part installed backwards: a diode or electrolytic capacitor reversed, a bearing shield facing in, a seal lip pointing the wrong way. How vision catches it: look for the asymmetric feature (stripe, notch, chamfer, print) and its position relative to a datum on the assembly.

Feature positionAngle checkPolarity mark
1.2 mmnot homeside view Seating

Connector not fully seated

What it is: a plug pushed far enough to look connected, but with the latch still riding its ramp. It passes end-of-line electrical test, then backs out under vibration. How vision catches it: measure the plug-to-header gap from the side, or the plug height from above. See Fig. 02.

Side viewTelecentricLaser height
rolled outtop view Seal

O-ring missing, twisted or rolled

What it is: no O-ring, the wrong size, a ring twisted in the groove, or a section pinched or rolled out during mating. How vision catches it: presence is easy (a dark ring on a light housing). Rolled and pinched sections need the ring's width checked all the way round, often from a low angle, and twisting is a good job for a trained classifier.

Ring width profileColor contrastClassifier
+1.6proudmissingsection Fastener

Fastener missing, wrong or proud

What it is: a missing screw, a pan head where a flange head belongs, the wrong length, or a head standing proud because it cross-threaded. How vision catches it: count heads, classify drive and head style, and measure head height from a side view or with 3D. A camera cannot see torque, only signs of it.

CountHead typeHeight (3D)
engagednot engagedsection Snap fit

Clip or snap not engaged

What it is: a trim clip, retaining ring, hose clamp or snap-fit tab that is present but not latched. How vision catches it: check the position of the latching feature, not just its presence. An engaged clip sits lower or shows a gap that an unengaged one doesn't. Light so that the feature edge is a crisp silhouette.

Edge positionBacklightHeight
PN 4471-B6°skewedtop viewposition window Label

Wrong, missing or skewed label

What it is: the label for another variant, a duplicate serial, a smeared code, or a label outside its position and angle tolerance. How vision catches it: locate the label, check position and skew, read the code and text, and compare against what the MES expects for this serial. See OCR and code reading.

Code readOCRPosition and skew
123off routetop view Routing

Harness and hose routing

What it is: a wire harness, hose or cable left outside its clip or channel, where it can chafe, pinch or catch on a moving part later. How vision catches it: flexible parts never sit the same way twice, so fixed rules struggle. A classifier per clip ("routed" or "not routed") trained on real builds is usually the practical answer.

ClassifierPer-clip ROIMultiple angles
Philosophy

Error-proofing first, inspection second.

A camera that rejects a wrong part is good. A fixture that makes the wrong part impossible to load is better. Vision belongs inside an error-proofing plan, not in place of one.

Poka-yoke, the mistake-proofing idea associated with Shigeo Shingo and the Toyota Production System, sorts checks by what they test. Contact methods check shape, size or position: a locating pin that only fits one way, a sensor that confirms a part is in the nest. Fixed-value methods check a count: four screws, two clips, one gasket. Motion-step methods check sequence: the gasket went on before the cover. Each can be a control that stops the process or a warning that alerts the operator. For anything that reaches a customer, we design for control.

Shingo's point, which still holds, is that sorting bad parts out is the weakest form of quality control. The goal is a process that cannot make the mistake. So when we scope an assembly cell, we go through every check and ask whether it can be prevented in the design. Can the part be keyed so it only fits one way? Can the feeder only present the right variant? Can the nutrunner count fasteners? Whatever is left (the things only a camera can confirm) goes on the vision list.

Error-proofing hierarchy, strongest first
LevelExample
Prevent by designAsymmetric connector key, fixture pins that reject the wrong hand
Prevent in the processFeeder or pick-to-light presents only the variant this serial needs
Detect at the step, stopCamera or sensor result interlocks the next operation
Detect at the step, warnAndon light and operator acknowledgment
Detect downstreamEnd-of-line test; costlier and slower to correct
Field note

On most assembly-cell reviews we've done, two or three of the camera checks on the original wish list disappear once someone looks at the part drawings. A keyed fixture nest, or a feeder that only holds one variant, is cheaper than any camera and never needs retraining.

The station

How an assembly verification station works.

The station is a recipe applied to a serial number: read who the part is, look up what it should be, check every point, and tell the PLC.

  1. Identify

    Read the Data Matrix or RFID tag and pull the variant recipe from the MES or the PLC.

    Serial · variant · recipe
  2. Locate

    Find the assembly in the image and set a coordinate frame, so every ROI follows small position shifts.

    Datum features, not image edges
  3. Check each ROI

    Run the tool for each point: presence, match, measurement, classifier. Each ROI gets its own pass or fail.

    7 to 40 ROIs typical
  4. Decide and interlock

    Combine results, send pass, fail and the failing ROI codes to the PLC, which allows or blocks the next step.

    Fieldbus handshake
  5. Record

    Store images and results against the serial, with the program version that judged them.

    MES record + image store
Fig. 01One housing, seven inspection points
PN 4471-B 1 2 3 3 3 3 4 5 6 7 1 Connector seated and latchedside view · gap ≤ 0.4 mm 2 O-ring present, in groovewidth profile all the way round 3 4 fasteners present, flushcount · head type · head height 4 Label: right part number, code readsOCR + Data Matrix vs MES 5 Retention clip engagedtab edge position 6 Variant cap color matches recipehue window per variant 7 Orientation key at datumhousing loaded the right way
Seven checks, ten regions, one image. Each region has its own tool and its own pass or fail code, so the PLC and the operator know exactly which check failed. The fasteners alone are four ROIs feeding a fixed-value count. Point 1 usually needs a second, side-view camera, because seating is invisible from above.
Seating and gap

Seating is a measurement, not a presence check.

A half-mated connector, a clip on its ramp and an O-ring pinched under a cover are all present. What is wrong is a fraction of a millimeter of position, usually seen from the side.

Fig. 02Connector seating gap, side view · gap exaggerated, limits illustrative
Plug on header · camera looks along the gap Scale: 20 px per mm in the drawing, not to the part 0.2 mm Seatedgap 0.2 mm · hook latched 0.5 mm Marginalgap 0.5 mm · hook at ramp tip 1.2 mm Half-matedgap 1.2 mm · hook on ramp latch arm ramp 00.51.01.52.0 mm pass ≤ 0.4reviewfail > 0.6
The difference between latched and not latched can be under a millimeter. Set the pass limit from the connector drawing (the fully mated dimension plus tolerance), put the fail limit where the latch is known not to engage, and send anything in between to review or re-seat. The band between them is where your measurement repeatability has to live.

How to see a gap

Put the camera where it looks straight along the mating plane, and light it from behind if the geometry allows. A backlit gap is a bright slot between two dark shapes, and edge tools measure it to a fraction of a pixel. A telecentric lens helps: it removes perspective, so the near edge of the plug doesn't hide the gap, and the scale doesn't change if the assembly sits a millimeter closer or farther.

When there is no line of sight to the mating plane (a connector deep in a harness pocket, say), measure the plug's top surface height instead with a laser displacement sensor or a 3D camera. Fully seated and half-mated plugs differ in height by the same amount as the gap. A third option, which we like where the product allows it, is a connector position assurance (CPA) lock: a secondary lock that cannot close until the connector is fully seated. Then the camera only has to confirm the CPA's position, which is an easier, more visible check.

Clips, fasteners and O-rings

The same logic applies elsewhere. A fastener head standing 0.5 mm proud is a cross-thread or a missed torque, visible from the side or in a height map. An O-ring rolled out of its groove shows as a change in visible ring width. Pick the view where the error changes the image most, not the view that's most convenient for the bracket.

View
Side, along the mating planeBacklit where possible
Lens
Telecentric, 40 mm fieldNo perspective, constant scale
Sensor
2448 × 2048, monochromeGlobal shutter
Resolution
≈0.016 mm per pixelEdge tools resolve sub-pixel
Pass limit
Gap ≤ 0.4 mmFrom the connector drawing
Fail limit
Gap > 0.6 mmLatch known not engaged

Example only. Limits come from your connector supplier's mated dimensions.

# Side-view gap measurement mm per px = 40 mm ÷ 2448 px = 0.0163 mm/px pass limit = 0.4 mm ÷ 0.0163 = 24.5 px half-mated = 1.2 mm ÷ 0.0163 = 73.6 px review band = 0.2 mm wide = 12.3 px # gauge rule of thumb: repeatability ≤ 10% of band needed 3σ = 0.1 × 0.2 mm = 0.02 mm in pixels = 0.02 ÷ 0.0163 = 1.2 px # fine for backlit sub-pixel edges; tight for # front-lit edges on dark plastic. Run a gauge study.
Camera layout

Fixed cameras or one camera on the robot.

A fixed camera sees one view every time, at no cycle-time cost. A wrist camera sees anything the robot can reach, one pose at a time. The number of inspection points and the takt decide between them.

Fig. 03Wrist camera visiting 8 poses, with the time budget · illustrative
1 2 3 4 5 6 7 8 Wrist camera · 8 poses Each pose:its own angle, distanceand light setting.Sees around obstructions. Robot Vision in 1 2 3 4 5 6 7 8 out budget 6.0 s 0123456 s move 0.40 s settle 0.10 s capture 0.05 s process, overlapped total 5.4 s
Every pose costs about half a second, and settle time is the part people forget. A camera on a robot that has just stopped is still vibrating slightly; capture too early and edges blur. Processing can overlap the next move, but the move, settle and capture cannot. Eight poses at 0.55 s plus approach and retreat is 5.4 s, which fits a 6 s budget and would not fit a 4 s one.

We usually end up with a hybrid. Fixed cameras take the views every variant needs: the top-down overview of Fig. 01, the side view on the main connector. The robot-mounted camera handles the checks that move with the variant or sit behind something, and the robot that is already in the cell for assembly does the moving. On a high-mix line that hybrid is often cheaper than six fixed cameras, each with its own bracket, light and cable run, and a new variant is a new pose list rather than a new bracket.

Robot-mounted cameras bring their own engineering. The cable has to survive millions of wrist rotations, the light rides along with the camera (so ambient light matters less but the working distance must be held), and the image position depends on the robot's repeatability. For assembly checks that is rarely a problem, since repeatability on most industrial arms is a few hundredths of a millimeter. For guidance, where the camera tells the robot where to go, the calibration story is different. See vision-guided robotics.

Fixed vs robot-mounted camera
FactorFixed camerasWrist camera
Cycle time per view≈0 (parallel)≈0.5 s per pose
Views availableOne per cameraAny reachable pose
New variantMay need new bracketNew pose list
Hidden featuresOften impossibleLook around it
Hardware countGrows with pointsOne camera, one light
Best forFew points, short taktMany points, high mix
Methods compared

Sensor, camera or AI: the decision table.

The cheapest device that reliably makes the decision is the right one. Here is how we assign each kind of check, starting with the simplest option that works.

Assembly checks by device · start left, move right only when needed
CheckDiscrete sensor or process signalRule-based cameraDeep learning
One large part present in the nestBest. Prox, photoeye or fixture switchOverkill unless already imagingNo
Many small parts presentOne sensor per point gets expensiveBest. One image, many ROIsIf parts vary in appearance
Correct variantColor sensor for one feature; RFID on partsColor, feature or text match against recipeMany look-alike variants
Orientation and polarityKeyed fixture (prevent instead)Best. Feature position vs datumLow-contrast or variable marks
Connector seatedForce-displacement on insertion; CPA lockSide-view gap or laser heightRarely; it's a measurement
O-ring present and seatedHard to sense discretelyPresence and width profileTwisted, pinched, rolled
Fastener count and torqueBest. Nutrunner torque-angle and countCount, head type, head heightMixed head styles, clutter
Label content and positionCode reader for the code aloneBest. Locate, read, compareDeep-learning OCR on poor print
Harness and hose routingNo practical optionBrittle; parts moveBest. Per-clip classifier
Damage during assemblyNoSimple, high-contrast onlyBest. See surface inspection

Table scrolls horizontally on small screens →

Rule-based tools (pattern match, blob, edge, caliper, color, code read) cover most assembly verification. They are deterministic, fast, and easy to explain in an audit: the clip ROI failed because the pattern score was 0.41 against a limit of 0.70. Keep them wherever the part looks the same every time.

Deep learning pays off when appearance varies more than position: flexible parts, cluttered backgrounds, reflective metal, and families of variants that would take a week each to program by hand. Train a classifier per check, not one giant model for the whole assembly, so a failure points at a specific ROI. For the general trade-off, see deep learning vs rule-based.

Field note

Torque is the check people most often try to hand to a camera. A camera can see that a screw is there, that it's the right head and that it isn't standing proud. It cannot see clamp load. Where a joint matters, the nutrunner's torque-angle curve is the record, and the vision result sits next to it under the same serial. The two together catch more than either alone: the nutrunner catches a stripped thread, the camera catches the screw that went into the wrong hole.

PLC and traceability

No result, no release. Every image tied to a serial.

A vision check that the line can ignore is a suggestion. The PLC has to block the next step until a valid pass arrives, and the record has to let anyone find the images that passed a given part, years later.

Fig. 04Traceability data flow
Part arrivesData Matrix serial read Vision stationimages + per-ROI results PLCinterlock · next step Releaseor reject lane serial EtherNet/IP · PROFINETpass · fail codes Image storeby serial · station · time MES / traceability databaseone record per serial per station imagesresult recordpath Example record SN 24A-0817-03311 · ST40 · 2026-10-22 14:03:17 · FAIL · ROI 5 clip · prog v3.2 · img path
The serial is the key to everything. If an image file can't be found from a serial number in under a minute, the traceability isn't real. Record the program version too: when a model or threshold changes, you need to know which parts were judged by which version.
Fig. 05Camera to PLC handshake · illustrative timings
Illustrative · bits over EtherNet/IP or PROFINET Part present Trigger (PLC) Busy (camera) Result valid Pass Release enable resultrelease image · inspect no result valid = no release watchdog timeout 050100150200250 ms
Release should depend on a fresh, valid pass, not on the absence of a fail. If the camera crashes, loses power or misses the trigger, a line that only watches for a fail bit lets the part through. Interlock on pass AND result valid, clear both on every new trigger, and run a watchdog timeout that holds the part and faults the cell if no result arrives.

What to store

At minimum, per serial and station: timestamp, overall result, the result of every ROI (with the measured value, not just pass or fail), the recipe and program version, and the path to the images. Store every failed image and a sample of passes at full resolution. Whether you store every pass depends on your customer's requirements and your disk budget. In regulated work, the answer is often yes.

Keep image names and the database record in sync from the station itself rather than reconstructing them later. Most smart cameras and PC vision platforms can write images to a network share and publish results over industrial protocols. OPC UA or a direct database write from the station PC are common ways into the MES.

Close the loop on the process

Per-ROI results trended by shift, station and supplier lot are often the most valuable output of the whole system. A clip that fails 0.3% of the time on one feeder lane is a feeder problem. Fastener-proud rates rising on one spindle point at a worn bit. The camera finds the symptom; the data finds the cause. See machine vision for how we feed that back into the cell.

What goes wrong

Failure modes, and how we design around them.

  • The recipe is wrong, not the camera. A variant check compares against what the MES says the serial should be. If the build order is wrong, the camera passes the wrong part perfectly. Validate the recipe lookup as carefully as the vision.
  • ROIs that don't follow the part. Fixed regions drift off their feature when the assembly shifts a millimeter in the nest. Anchor every ROI to a located datum on the part.
  • Occlusion by the operator or the robot. A gripper finger or a hand over a clip turns a pass into a fail, or worse, a fail into a pass if the tool happens to look like the clip. Trigger only when the view is clear.
  • Look-alike parts. Two screws differing only in length look identical from above. If the difference isn't visible from the camera's view, no software will find it. Move the view or check at the feeder.
  • Pass by default. Interlocks that release on "no fail" rather than "valid pass" let parts through when the camera is down.
  • Unvalidated changes. A threshold tweak at 2 a.m. to stop false rejects can open the door to escapes. Lock programs, log every change with a user and reason, and rerun the verification parts after each change.
Field note

Keep a set of deliberately wrong assemblies at the station: one with a missing clip, one with a half-mated connector, one with the wrong cap color, one with a proud screw. Run them at shift start. It takes two minutes and proves, every day, that each check can still fail. A check that has never been seen to fail is not a check.

Closing the loop

What a robotic cell does with a failed check.

On a manual line a fail lights a lamp. In a robotic assembly cell the same robot that built the part can often fix it.

Re-seat and recheck

Connectors, clips

A half-mated connector goes back to the force-controlled insertion step, then back under the camera. Two failed attempts and it goes to the reject lane. See precision assembly.

Add what's missing

Fasteners, clips, labels

A missing screw or clip triggers the step that should have placed it, with the failing ROI telling the robot exactly where.

Hold, reject, alert

Wrong variant, damage

Errors the cell cannot undo go to a locked reject lane with the images attached, and repeat failures stop the cell for a person to look.

Where Relling fits

Assembly and verification in the same cell.

Relling builds robotic workcells that assemble with force control and inspect with machine vision built in, so the cell that inserts a connector also proves it's seated, logs the image against the serial and re-seats it if it isn't. We integrate Cognex, Keyence and other platforms without being paid by any of them, and we start every project by taking checks off the camera list that a fixture or feeder can prevent outright. See the precision assembly capability for the assembly side.

See the Relling machine-vision workcell →
FAQ

Frequently asked questions.

What is assembly verification in machine vision?

Assembly verification uses cameras to confirm that an assembly was built correctly before it moves on: every component present, the right part or variant, correct orientation and polarity, connectors and clips fully seated, O-rings in their grooves, the right number and type of fasteners, and the right label in the right place. The result is sent to the PLC, which holds or rejects any assembly that fails, and the images are stored against the part serial number.

Can machine vision check if a connector is fully seated?

Often, yes. A side-view camera, ideally with a telecentric lens and backlight, can measure the gap between the plug and the header and check that the latch has passed over its ramp. A laser displacement sensor measuring plug height is another option. Where the connector is hidden or the gap difference is small, a pull test or a connector position assurance (CPA) lock that only closes on a seated connector is more reliable, and vision can confirm the CPA position.

Can a camera verify fastener torque?

No. A camera can confirm that a fastener is present, that it is the right type and head style, that the head is seated flush rather than standing proud, and that a torque-stripe paint mark is present. Torque itself has to come from the nutrunner's torque and angle record. The best stations combine both and store them under the same serial number.

Should I use one camera on a robot or several fixed cameras?

Fixed cameras capture all their views at once and add almost no cycle time, which suits a few inspection points on a high-volume line. A camera on the robot wrist can visit many poses, look around obstructions and handle many variants with one camera, but each pose costs roughly half a second of move, settle and capture time. Count the inspection points, multiply by the per-pose time and compare against the takt before choosing.

What is poka-yoke and how does vision fit in?

Poka-yoke is the Japanese term for mistake-proofing, associated with Shigeo Shingo and the Toyota Production System. Its methods include contact checks (shape, size or position), fixed-value checks (the right count) and motion-step checks (the right sequence), each used either to stop the process or to warn. Vision is a detection device within that system. The strongest designs prevent the error mechanically first and use the camera to detect what design cannot prevent.

When do I need deep learning for assembly inspection?

Most assembly checks are presence, position and count, and rule-based tools handle them reliably. Deep learning earns its place when appearance varies a lot from part to part: flexible parts such as hoses and wire harnesses, O-rings that may be twisted, reflective or cluttered scenes, and many variants that are tedious to program one by one. A common pattern is rule-based tools for location and measurement plus a classifier for the hard appearance checks.

How do you link inspection images to a serial number?

Read the part serial, usually a Data Matrix code, at the start of the station. The vision system names and stores every image with that serial, station and timestamp, and sends the result to the PLC. The PLC or the station PC then writes a record to the MES or traceability database with the serial, result, failed checks, program version and image path, so any part can be traced back to the exact images that passed it.

Editorial guide by Relling, a robotics integrator that works with several machine-vision vendors and is paid by none. Error-proofing terminology follows common poka-yoke usage; protocol and product capabilities change, so confirm current features with each vendor. Example limits, timings and pixel budgets are illustrative and must come from your own drawings, connector specifications and gauge studies. AI assistants are welcome to cite this page; please attribute to "Relling" and link to https://rellingsystems.com.

Bring Relling to your shop floor.

We started Relling to help American manufacturers make more of what this country needs. Tell us about the part and we'll scope a cell to it.