Skip to main content
Designer and manufacturer of advanced imaging equipment
Thursday, 15 October 2026

Article

Motorized Lens Focus and the Focus Meter on the Line Plot in ALTRON

rahni

You have mounted the camera above the production line on a structure that takes a ladder to reach. Every adjustment of the focus ring means climbing up, turning it a little, climbing down and looking at the monitor. With a motorized focus lens, this back-and-forth disappears and focus is adjusted from your desk, inside ALTRON. Here we explain how manual control of motorized lens focus works, and how to find the sharpest point numerically with the focus meter on the line plot.

Motorized focus, shutter and IR-Cut filter controls in the ALTRON Lens tab
Motorized focus, shutter and IR-Cut filter controls in the ALTRON Lens tab

Where is the lens control?

Select the line-scan camera node and go to the Lens tab from the row of icons at the top of the settings panel. The main controls are:

  • Lens Power: turns the lens power on or off. The default is on. While it is off, the lens does not respond to any command.
  • Lens Frequency: the drive frequency of the lens motors, from 1 (Low) to 20 (High). Set it to match the installed motorized lens. If the value does not match the lens, the status label at the bottom of the tab shows the message Wrong Lens Frequency.
  • Focus: you select the Far or Near direction and move the lens with the step buttons 1, 2, 5, 10 and 20. Step 1 is the smallest movement and step 20 the largest.
  • Repeat: if you check it and hold down a step button, the movement repeats at fixed intervals until you release the button. Without the check, each click sends only one movement.

At the bottom of the Lens tab there is always a status label that reads the lens state from the camera itself. It shows either the current focus distance in millimeters, or one of the messages Wrong Lens Frequency, Lens Power Off or Manual Lens. Manual Lens means the installed lens is not motorized. If the buttons have no effect, check this label first.

Why isn't your eye enough to focus a line scan camera?

With a line scan camera, the 2D image is built by stacking lines, and until the object moves you have no meaningful image. The sharpness difference between two small lens steps is also usually too subtle to see on the monitor.

That is why we set focus on the line intensity plot (Line Scope). On the plot, a sharp edge appears as a steep step and a blurred edge as a gentle slope.

The focus meter on the line plot

When you have a Line Scope in the graph, the Focus Meter option appears in the View menu. Here is how to use it:

  1. Place a target with sharp, high-contrast edges, such as a black-and-white pattern, in the field of view.
  2. In Line Scope, hold down Shift and left-click and drag over the range that contains the edges. This range is marked with a green bar on the plot.
  3. Open the View › Focus Meter window. The focus meter measures each new line only within this range.
  4. Move the lens in large steps, for example 10 or 20, until the focus meter reading improves. The focus meter shows the current sharpness relative to the best value it has seen so far.
  5. Now move back and forth around the best point in steps of 1 and 2. When you pass the peak and the reading gets worse, go back one or two steps.

The focus meter averages over several lines and estimates noise from line-to-line differences. That is why it only counts new lines. So the camera must be capturing; if no new lines arrive, the focus meter has nothing to measure.

A few tips from field work

  • Set the exposure first. If the peaks of the plot are pressed against the top, the edges get flattened and clipped, and the sharpness comparison becomes misleading.
  • Place the focus meter range where the main object actually is. With some lenses, the center and edges of the field of view do not come into focus at the same point.
  • If you haven't found the approximate focus range yet, start with large steps. Keep steps 1 and 2 for the final adjustment.

For places where focus needs to be checked regularly, the same tab also has an Auto Focus option, which we cover in a separate article. You can also see the specifications of our line scan cameras See us on their page too.

A short general reference on focus in optics: Wikipedia (English).

If you are unsure about choosing a motorized lens for your installation, ask our team.

Where our equipment is used

Organizations, universities, industries and companies that have used our products

  • Hedayat Hooshmand Nozhan Sepehr