Article
Motorized Lens Focus and the Focus Meter on the Line Plot in ALTRON
You have mounted the camera above the production line on a structure you need a ladder to reach. Every focus ring adjustment means climbing up, turning it a little, climbing down and checking the monitor. With a motorized focus lens, these trips disappear, and you adjust focus from your desk inside ALTRON. Here we explain how manual lens control works and how to find the sharpest point by the numbers with the focus meter on the line plot.

Where is the lens control?
Select the camera node and go to the Lens tab in the row of icons at the top of the settings panel. The main controls are:
- Lens Power: turns the lens power on or off. Turning it off reduces power consumption and heat.
- Lens Frequency: sets the speed of the lens motors from 1 to 20. A low value gives slow, precise movement, suitable for fine adjustment. A high value moves the lens quickly.
- Focus: you choose the far or near direction and move the lens with the step buttons 1, 2, 5, 10 and 20.
- 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:
- Place a target with sharp, high-contrast edges, such as a black-and-white pattern, in the field of view.
- 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.
- Open the View › Focus Meter window. The focus meter measures each new line only within this range.
- Move the lens in large steps until the focus meter reading improves.
- Lower Lens Frequency and move back and forth around the best point in steps of 1 and 2. Once you pass the peak and the reading gets worse, go back a step or two.
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 have not yet found the approximate focus, set Lens Frequency high. For the final adjustment, lower it.
- When you are done, turn off Lens Power.
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 on their own page.
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.