MVisionPro Engineering Library · fix

Why a code does not read, and what to check first

In short

Save a failed and a good frame from one station, with their exposure, gain, focus, speed and decoder settings. Change one thing per test and compare at the same settings. A smear along the travel direction suggests motion blur. A sharp, well-framed image that still fails points to the decoder, its timeout or the result's path. Stopping the line narrows the search but does not prove the cause.

The order of checks

Cheap checks come first, the decoder last. This order is practice, not a standard.

  1. Framing and quiet zone. If a finder pattern (the shape that locates a 2D code) or a bar end touches the edge of the decoder's region of interest (ROI), the code may be clipped. Enlarge the ROI to fit the quiet zone, the clear margin around the code. In modules (the smallest cells or bars), Data Matrix needs one per side and QR Code four (GS1, DENSO WAVE). GS1-128 needs ten at each end (GS1). For other codes, follow their specification.
  2. Pixels per module. Divide the code's pixel width by its module count. Basler's Data Matrix Code Reader needs at least 3 px/module in its Starter version and 6–20 in Basic (vendor documentation). Check your decoder's figure. Our 3–5 px/module starting target is a rule of thumb from such limits, not a standard. If you are short, narrow the field or add pixels, then check that the whole code fits.
  3. Motion blur and focus. A directional smear suggests motion blur. Shorten the exposure under continuous light, or the pulse if it outshines ambient light. Win back the light with stronger continuous lighting or a synchronised pulse. Gain amplifies signal and noise, adds no light and cannot remove blur (vendor guidance). Check brightness, noise and module-edge contrast. Soft edges without a smear point to focus, especially if only nominal-height parts read. Refocus on the code plane and test both height extremes with the line stopped. Our depth-of-field estimate gives the in-focus distance range, assuming a thin lens and a two-pixel blur circle. It does not prove edge contrast.
  4. Glare and lighting. A saturated patch moving with the lamp or camera angle suggests glare. Keep the exposure fixed and change only the light angle or polarisation. Shiny metal can read as black and narrow the apparent quiet zone (vendor guidance). On a direct part mark (a code marked into the part), try one lighting setup at a time. Compare dot-to-surface contrast under diffuse light around the surface, grazing-angle dark field, coaxial light along the lens axis and polarised light against reflections. This order is practice. ISO/IEC 29158:2025 sets grading conditions for such marks.
  5. The mark itself. Scratches, voids, faded ink, broken dots and a damaged clocking pattern (the alternating cells setting the Data Matrix grid) are physical defects. No setting repairs them. Yet Cognex ReadIDMax tolerates a damaged quiet zone, finder or clocking pattern (vendor documentation). Compare a known-good code under the same optics before changing decoder settings.
  6. Tilt and curvature. If failures follow tilt, rotation or curvature rather than speed or height, present the code square to the camera, then restore the pose step by step. For ReadIDMax, the 40° maximum angle of incidence is setup advice, not a decoding limit (vendor documentation).
  7. Decoder settings. First enable the expected symbology (code type). Then test only the option that matches the failure: polarity for light-on-dark codes, damage mode for damaged marks, perspective or grid mode for distorted ones, result count when only the first code returns, timeout when decoding stops early. Rerun the same saved frame after each change. Option names differ by vendor.

Calculate for your case

Assume 2448 px across a 160 mm field, a 0.30 mm module, 1200 mm/s and a 100 µs exposure. That gives 15.3 px/mm, so a module spans 4.6 px (calculated). In 100 µs the code moves 0.12 mm, or 1.8 px: 40% of a module. So a code within the 3–5 px starting range can read at a standstill and fail at speed. With an assumed 1 px of blur, the calculated time limit is about 54.5 µs. It applies to continuous-light exposure or to a pulse that outshines ambient light, timed as the exposure article shows.

The tool page picks a real lens, so its figures differ: a 160.5 × 134.2 mm field and a 55 µs limit. It also states "at the minimum exposure time of 50 µs, calculated motion blur is 1.00 px". It has no field for the 100 µs exposure, so calculate that blur by hand: speed × exposure × px/mm.

Common mistakes

Next step

Send us the failed frame, its settings and the reader's part number. We will confirm what that version's datasheet states for reading distance, field of view and speed.

Sources

Related

How this material was prepared

Prepared by MVisionPro from the stated sources and the MVisionPro calculation engine. A physical test is claimed only when the material says so explicitly. Read the editorial method.

Editorial status: verified. Content updated 2026-09-23.