Products
Service & Support
Industries & Solutions
Career
Company

Fixed Focus or Autofocus for Industrial Code Reading

When fixed focus is enough and when autofocus pays off

Rob Kline
22 2026 | 11:07 Clock

Reading Time: minutes

TL;DR

· Fixed focus is usually the better choice when working distance is stable and the required depth of field can be covered.

· Autofocus is useful when product heights or reading distances vary significantly.

· For moving parts, autofocus settling time must fit within the available read window.

· The right choice depends on working distance, depth of field, and line speed, not on maximum lens flexibility.

How do fixed focus and autofocus work?

Fixed focus: A lens element is positioned so a defined working distance is in sharpest focus. Depth of field determines the range that remains acceptably sharp. With an adjustable iris, stopping down increases depth of field but reduces the light reaching the sensor.

Autofocus: Modern industrial code readers commonly use a liquid lens. Voltage changes the shape of a fluid-filled optical element, allowing the focal distance to change without mechanical lens movement. A processor selects the target distance and the lens adjusts through software.

Both approaches work. The application determines which one fits.

A code does not have to be perfectly sharp

Barcode decoding does not require a tack-sharp image. It requires enough contrast and image information for the algorithm to distinguish bars, spaces, or cells. Slightly soft focus can still provide reliable reads and may smooth print defects, glare, or surface texture.

The practical target is reliable decoding throughout the required working range, not maximum sharpness in every frame.

How stable is the working distance?

If products consistently pass the reader at the same distance, fixed focus is usually the simpler and less expensive choice. Once adjusted, nothing needs to refocus between reads.

Autofocus becomes valuable when working distance changes significantly, for example on multi-SKU lines with different product heights, in tote scanning, with pallets at different stack levels, or where the final mounting distance is difficult to predict.

Start with the application’s actual distance variation, not with the maximum flexibility the lens offers.

How much depth of field do you need?

An adjustable C-mount lens provides another option before autofocus becomes necessary: tune the depth of field. Stopping down the iris increases the range that remains acceptably sharp. Opening it admits more light but reduces that range.

A well-selected fixed-focus lens can therefore cover more variation in product height than its name might suggest. Liquid-lens systems address changing distances by refocusing, which introduces another consideration: time.

Is the part moving while you read it?

For moving products, autofocus settling time can become important. After a focus change, a liquid lens needs time to reach the requested focal state. If the image is captured too early, the part may not yet be sufficiently focused.

Fixed focus has no refocusing delay. At the tuned working distance, it is ready whenever the image is captured.

Worked example: At 100 m/min (330 ft/min), a product travels about 17 cm (6.6 in) in 100 ms. If refocusing occurs inside the read window, that movement must be included in the timing calculation.

This does not make autofocus unsuitable for fast lines It means focus time, conveyor speed, trigger position, and read-window length need to work together.

Fixed focus or autofocus: which should you choose?

Choose fixed focus when

Choose autofocus when

working distance is stable

working distance changes substantiall

available depth of field covers product variatio

multiple product heights must be handled

consistent timing and repeatability are priorities

reading occurs at several distances

a simpler optical setup is preferred

physical lens adjustment is impractical

frequent changeovers justify automatic refocusing

the read window provides enough time for focus adjustment

The trade-off is straightforward: autofocus provides flexibility when the application changes; fixed focus provides simplicity when it does not.

Takeaway

Do not choose autofocus simply because it handles more variation. First determine the actual working-distance range, required depth of field, line speed, and available read window.

If a fixed-focus lens covers that operating range reliably, additional focusing capability adds little value. If the application genuinely requires multiple reading distances, autofocus can solve a problem fixed focus cannot.

Choose the lens that matches the job.

Discover more about our related technologies and products:

Did you like this post?

0

Share this post

Author

Rob Kline

Rob Kline


8 Contributions

Comment

Energy consumption labeling
Energy consumption labeling

EPREL - European Product Database for Energy Labeling

Do you have any questions or suggestions? We are at your disposal.

For all questions concerning commercial topics such as quotations, orders, delivery times, our inside sales department will be happy to support you.

Contact us directly by phone: +49 7158 173-555


Balluff GmbH

Zabergäustraße 8
73765 Neuhausen a.d.F.

Free sample product

In order to add a free sample product to the cart we will need to remove all the normal products from the cart. Are you sure you want to continue