Control of the Z-axis is fundamental to high quality, well-focused scans. However it is also an area which can exhibit problems, some of which may appear over time on systems which have been focusing well to date. Common issues include focus drive stalling, slippage or inappropriate system settings. Some advice is provided below in order to diagnose common errors.


Please be aware of the risks of physical collisions with Z-axis movements, and consult your systems reseller when in doubt regarding movement of physical hardware.

  1. Lead Screw Pitch Incorrect
    This configuration value defines the expected travel distance for one complete rotation of the Z-axis focus motor. It is important that this is defined accurately in the system configuration settings, or else discrepancies will occur between the physical moves of the Z-axis and the distances expected by the software.

    To check the current lead screw pitch value, run Surveyor and open menu Control > System Properties > Focus tab.

    The correct value for your focus drive should be published by the appropriate hardware vendor, such as microscope manufacturer data sheet. Some common values are 0.1 mm, or 0.7 mm for some older Leica microscope models.

  2. Friction Drive Coupling Reliability
    A common cause of focusing problems is the usage of a friction drive coupling to attach an external focus motor to the microscope body focus shaft. This type of coupling uses a circular pad at each end of the connection, one pad attached to the focus drive and one attached to the microscope spindle, which are pressed tightly together. As the focus motor rotates its own pad, the other pad should rotate symmetrically.

    However because these are only held through tension, the result is very unreliable and prone to slippage. In some cases the weight of the stage is sufficient to cause the Z-axis to drift downwards during scanning. In other cases the focus problem may appear only intermittently in a scan.

    The solution is to use a direct drive coupling (oldham coupling) which is recommended in all scanning systems. This should be the first step for those systems which do not possess this connection.

  3. Focus Drive Speed Too Fast
    Another very common cause of focusing problems is that the drive speed is set too fast, which causes the focus motor to stall. This may happen regularly, or it may happen only occasionally in a large scan, which can sometimes make the issue difficult to diagnose. One tell-tale sign is that once the focus motor has slipped, the remainder of the scan will be out of focus from that point onwards (typically for systems which do not have a Z-axis focus encoder).

    To check the current Z-axis speed, run Surveyor and open menu Control > Define Lens Automation Settings > Focus tab.

    The speeds are defined uniquely per objective, so it's important to ensure that the speed settings are adjusted for each objective lens as shown in this dialog.

    A useful means of verifying the current speed is to first focus the live camera image, and then drive the focus down by a specific distance, for example 50 microns. Then drive the focus back up by the same distance, and the live camera image should still be focused as before. To do this, right-click on the joytools Z coordinates to enter a move distance. Now repeat this moving upwards then downwards, and also repeat for varying distances both large and small until you can gain some degree of confidence in the reliability. When in doubt, err on the side of slower Z axis speed.

  4. Moving Focus by Hand
    For those systems without the use of Z-axis focus encoder, the true position of the Z-axis is unknown by Surveyor, which relies on the most recent focus initialize to define a relative zero/home position for the Z-axis. What can happen is that the Z-axis is moved outside of Surveyor control, for example by turning the microscope focus knob by hand, and the software then loses track of the change in position. Over time, the discrepancy between Surveyor Z-axis coordinates and physical Z position can become sufficiently different to cause Surveyor to butt against its soft limits during scanning - and the image appears out of focus.

    The solution is to initialize the focus via Surveyor menu Control > Focus > Init.

    To do this, first focus the sample in the live camera window. Sometimes it is useful to perform this using the objective lens which shows the shortest working distance to the stage, and then enter an appropriate range of movement above and below the current Z position, ensuring this will not collide with the objective lens or any optics below. For example on a 40X lens with a short working distance, it may be appropriate to define 200 microns range above and -5000 microns below. If unsure, please consult your systems reseller for support.

    It is easy to forget that the focus upper and lower soft limits may need to be reinitialized on a frequent basis.