Abstract:
The measuring device is used for determining a relative position between a first item and a second item or the image thereof. The items are displaceable or rotatable relative to one another. The first item has a code carrier, which is arranged along a path. The code carrier is provided with a code pattern at right angles to the path. The second item has a code reader oriented on the code carrier path. A computer is connected downstream of the code reader and has means for quantifying the signal supplied by the code reader and for comparing with a stored code image of the code carrier, as well as for calculating the relative position from the comparison result. This measure permits automatic reading of the position, accompanied by a very high measuring accuracy. The measured result can be digitally displayed and, if required, can be directly stored on a data carrier and/or can be further processed in a computer.

Description:
FIELD OF THE INVENTION 
     The present invention relates generally to the area of optical measuring devices, particularly such devices including means to read bar codes remotely, and such devices useful in surveying and in other areas. 
     BACKGROUND OF THE INVENTION 
     There is a need in various fields for technology for non-contacting determination of the relative positions of two parts or items movable relative to one another. These can be parts of precision machines whose positions are to be established with a high level of accuracy, or instrument dials, e.g., reading optical instruments. Thus, e.g., in the case of conventional levelling instruments or levels using a telescope or television camera connected to the instrument, a height reading scale on a remote levelling rod or staff must be read. However, the reading of the remote height reading scale via the telescope requires a relatively high degree of concentration on the part of the observer. Thus, reading errors constantly occur with this method, particularly where the observers are untrained. 
     Attempts have been made to eliminate the high susceptibility to error of known levels in different ways. Japanese Specification No. 57749-81 proposed providing the levelling staff with coded light sources corresponding to the height on the reading scale. The reading of the staff is to take place with the aid of a receiver adapted thereto. However, the levelling staff is very complicated and is not really suitable for rough use in the open or on building sites. In addition, this levelling staff has a considerable energy consumption, which is also disadvantageous. 
     According to Australian provisional patent No. 2542/77, the levelling staff is provided with combinations of black and white longitudinal strips and triangles. By scanning these marks at right angles to the staff and on choosing a suitable code, conclusions can be drawn with regard to the measured height from the scanned pulse length. However, in this case, the limited measuring accuracy and the low sensitivity when making readings over longer distances are severe disadvantages. 
     SUMMARY OF THE INVENTION 
     The present invention provides a very generally usable measuring device of the character described, which eliminates reading errors, has a high degree of reliability even in rough use and also has high measuring accuracy. 
     Devices according to the invention permit automatic reading of position, accompanied by a very high measuring accuracy. The measured result can be digitally displayed and, if necessary, can be stored directly on a data carrier and/or can be further processed in a computer. It is even possible to read a scale even if it does not project on the optical axis of the observation telescope. The reading also makes it possible to obtain distance or range information. When used on levels, by incorporating all of the information in the image field concerning the graduated staff into the measuring and evaluation process, it is possible to more accurately determine the level height and range, even when there are serious problems with noise and interference signals, than is possible using known methods and devices. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The invention is described in greater detail below relative to non-limitative embodiments shown used with a level by way of example, and with reference to the drawings, wherein: 
     FIG. 1 shows a level with remotely arranged graduated staff and a detail of a bar code provided along the staff; 
     FIG. 2 is a section through the level of FIG. 1; 
     FIG. 3 is a block circuit diagram of an elevational and display means connected to the level of FIG. 1; and 
     FIG. 4 shows signal diagrams A, B and C useful in explaining the operation of the invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     The levelling means according to FIG. 1, a level being used by way of example to illustrate the invention, comprises a level 1, as well as a levelling staff 2 set up at a distance Z from the level 1. According to the preferred embodiment, a transversely directed bar code 3 is placed longitudinally on the staff 2, and level 1 is used to read the levelling staff 2. 
     In FIG. 2, level 1 is shown comprising an objective 4, a focusing lens 5 with associated focusing drive mechanism 6, a beam splitter 7, a reticule 8 and an eyepiece 9. There is also a detector group 10 in the vicinity of the beam deflected from the main beam path by beam splitter 7. The detector group 10 is a transducer used for scanning the image elements at right angles to the optical axis, and for producing electrical signals corresponding thereto. The arrangement is chosen in such a way that the code elements of levelling staff 2 impinging through objective 4 are imaged in the plane of detector group 10. A signal processing device 11, shown in detail in FIG. 3, is connected in series with the detector group 10. 
     Referring now to FIG. 3, in signal processing device 11, the signals of the detectors Qi in detector group 10 are supplied to a computer 15 via an amplifier 12, a sample and hold means 13 and an analog/digit converter 14. A display means 16 for displaying the measured results is connected to the output side of the computer. 
     To the focusing drive mechanism 6 of the level is connected a position pick-up 17, e.g., a displacement transducer or an angle pick-up coupled to the rotary knob. This device 17 makes it possible to determine the position of the focusing drive mechanism when it is focused on the levelling staff. The output signal of the position pick-up 17 is supplied to computer 15 as a further input signal. 
     To computer 15 is connected a read-only memory (ROM) 18, in which is stored a reference code corresponding to the bar code on the levelling staff. 
     The computer determines the position of the code image on the measuring staff and consequently the level height in the manner to be described in greater detail hereinafter by comparing the code image taken by detector group 10 and the reference code stored in the ROM 18. 
     The actual levelling process consists of pointing the telescope of level 1 at levelling staff 2 and focusing with the focusing drive mechanism 6. From the telescope focusing position supplied by the position of pick-up 17, the computer initially determines the distance Z between level 1 and levelling staff 2. For this purpose, the ROM 18 contains corresponding calibration constants for the distance Z, as a function of the focusing position. 
     On the basis of the focal length f of the telescope objective, which is preferably also stored in ROM 18, and the previously determined distance Z between the level 1 and the levelling staff 2, computer 15 calculates the image scale m in accordance with the equation m=-f/Z. The levelling staff 2 is imaged on detector group 10 with this image scale. 
     The operation of the signal processing device 11 for the selected example will now be explained relative to FIGS. 4A to 4C. FIG. 4A shows the signal for the reference code R(r; m, Δ), read out from the ROM 18 and for ease of understanding this signal is shown in the plane of detector group 10 and as a function of the position r of the individual detectors Di in this plane. Thus, r represents the variable, while the image scale m is to be considered a parameter. Δ is also a parameter and represents the relative position of the beginning of the code to the beginning of an individual detector element D according to FIG. 4B. 
     The selection of the code representation or the detector arrangement is made in such a way that the distance Δ is always smaller than the detector spacing h&#39; between two adjacent detector elements Di, see FIG. 4B. 
     As a function of the location position r, FIG. 4B now shows the sensitivity curves D(r) of the individual detector elements Di (r), for i=1, 2, . . . N. 
     As a result of a correspondingly chosen control program, computer 15 is made to continuously multiply the value of the reference code R(r; m, Δ)with the associated value of the detector sensitivity curve D(r) according to FIGS. 4A and 4B and to integrate the same over the position r. The result is constituted by the discrete values P 1 , P 2 , etc., (m, Δ) plotted in FIG. 4C: ##EQU1## 
     The sensitivity curve Dl (r) is then displaced by a suitable computer manipulation by the detector spacing h&#39;, is multipled by R(r; m, Δ) and integrated. A second discretizing value P2(m, Δ) is obtained from this operation. This process is repeated until the complete reference code is covered. The result is diagrammatically shown in FIG. 4C. 
     In a program-controlled manner, computer 15 finally determines the cross-correlation K L  (m, Δ) between the intensity values Qi measured by the individual detection elements Di in detector group 10 and the calculated discretized reference values Pi(m, Δ), according to the following formula, in which N is the number of detector elements used: ##EQU2## 
     On the basis of the thus calculated cross-correlation function values, the computer 15 then seeks in a program-controlled manner the displacement with the maximum value of the previously determined cross-correlation. The parameters m and Δ are then varied and by known numerical mathematical methods, the maximum value of the cross-correlation function Kl(m, Δ) is determined as a function of L, m and Δ. 
     From the thus calculated values for L, m and Δ, is selected the value group with the highest correlation and from the corresponding parameters the reading position is calculated, i.e., in the present example the level height. 
     For the initially performed determination of the distance Z between level 1 and levelling staff 2, there is an accuracy estimate Δ Z/Z on the basis of the following: 
     
         ΔZ/Z=OPD·8·Z/D.sup.2 
    
     D being the aperture of the objective lens in level 1 and OPD the optical phase difference. If a value OPD≦λ/2 and D=40 mm is assumed for the OPD, then the relative distance precision Δ Z/Z is better than ±14% for Z=100 m and better than ±0.7% for Z=5 m. 
     In order to be suitable for the described use and processing, bar code 3 must fulfill the following conditions. As the image scale of levelling staff 2 varies on the plane of the detector group with the distance D between level 1 and levelling staff 2, the image scale m is subject to considerable variations. For example, on varying the distance Z from 1.5 to 100 m, there is a change to the image scale by the factor 66.6. 
     As the individual elements Di of detector group 10 have a finite distance from one another, the projection of a code element onto a detector element must be greater than the reciprocal spacing h&#39; of the detector elements, so that the latter can still resolve the code. Thus, on the basis of the Nyquist theory taken from communications engineering, the projection of a code element G&#39; should be at least twice as large as the reciprocal spacing h&#39; of the detector elements. 
     This condition fixes the size of the code grid G to be chosen for the levelling staff 2, as G≧2 h&#39; m, m now being the image scale for the maximum measuring distance Z of the staff in the plane of detector group 10. 
     In the case of short distances Z between level 1 and levelling staff 2, with a limited number of detector elements available via the telescope, the visual field will be so small that there are only a few grid elements G in the visual field of detector group 10. This number of grid elements can be so small that it is not sufficient for a clearly defined code formation and consequently for a clear and precise reading of the code carrier. In order to overcome this problem, in such cases use is made of optics with a variable focal length, such as a zoom lens or a magnification changer in the reader, i.e., in the present example on level 1. The device for scanning the visual field (scanner) is also suitable for this purpose. 
     Another solution of the aforementioned problem is to subdivide the grid elements of the code, either the bright or the dark parts or both, by a finer grid system to consequently form a further fine code. This fine code will not be &#34;seen&#34; by the detector group 10 for large distances Z, and instead acts as a grey value. In the case of short distances Z, the sine code helps to clearly determine the position on the detector group in the case of a limited visual field. A code grid has proved suitable as a coarse code which is approximately 1.5 times the image size of the line spacing on the code carrier for the largest measuring distance Z occurring in practice. 
     It is further pointed out that the code carrier can have any random shape determinable by a scanner, e.g., it can also be circular. This makes it possible to automatically and very accurately scan the angular position of a component connected to the code carrier. The necessary calculating operation is simplified in that the image scale m can be looked upon as a system-related fixed quantity, provided that the distance between the code carrier and the reader is fixed, which would be appropriate for most such applications. 
     In place of the cross-correlation described in the preferred embodiment, the comparison operations performed in the computer could also consist of a random integral comparison operation. Then, many and preferably most of the detector elements on which the code pattern is imaged will be used for comparison with the reference code. 
     Instead of processing the derived signals in connection with levelling means from position signals on levelling staff 2, the same derived signals can be used for direct measurement of an angle position, related to any defined position. For instance, levelling staff 2 may be connected in a defined position to a distant machine part, or respective code patterns may be directly fixed to such part. If this part moves in a direction parallel to the code pattern&#39;s axis, it is possible to directly compute angle values corresponding to the displacement of such part against the former position for the former defined reference. 
     While the invention has been described in detail above, it is to be understood that this detailed description is by way of example only, and the protection granted is to be limited only within the spirit of the invention and the scope of the following claims.