The aim of the project, described in this paper, is to retrofit a Zeiss length measuring machine for the calibration of linear scales, with a pitch distance of a few micrometers. The retrofitting consists of optics, equipped with a CCD camera, for capturing the line sizes and distances, an appropriate illumination system, a motion system carrying the scale and providing linear motion at constant speed. The paper starts with discussing the various definitions of the pitch distance. From these definitions simple algorithms, to determine the pitch distance, are derived. The main point is to minimize the effect of non-linearity and diffraction, by using appropriate optics and illumination, hereby improving measurement accuracy. The carriage carrying the scale is driven by ultrasonic piezomotor providing nanometer resolution. The displacement is measured by an HP laser interferometer. For higher resolution the CCD camera system can be replaced by a near field microscope.