Abstract:
Optical apparatus for measuring displacement of a moveable member so as to enable compact construction and high accuracy measurement includes an optical grid, a light source, a plurality of light receiving arrays, and an operating circuit. Also, each of the plurality of light receiving arrays has a plurality of light receiving elements arranged at a pitch S. The operating circuit calculates the displacement of the moveable member based on outputs from the plurality of light receiving arrays, which are arranged so that a predetermined distance in a direction of displacement shifts one from another.

Description:
TECHNICAL FIELD 
     The present invention relates to a relative position measuring apparatus using an optical displacement measuring device. More particularly, the invention relates to a high accuracy relative position measuring apparatus that employs a linear optical encoder system comprising a glass scale and a light detecting sensor. 
     BACKGROUND ART 
     Laser-based measuring apparatuses using lasers and optical encoder-based measuring apparatuses using optical encoders are known in the art. The laser-based measuring apparatus can achieve high measurement accuracy as measurements are made using the laser light wavelength as the unit of measurement. The laser-based measuring apparatus is primarily used as a relative position measuring apparatus for measuring the length between two points. The optical encoder-based measuring apparatus comprises: a scale constructed from a glass plate, film, thin metal plate, or the like; an optical grid formed with a prescribed pitch on the scale; a fixed index grid disposed opposite the scale with prescribed spacing provided therebetween (the phase of the index grid is 90 degrees shifted relative to the phase of the optical grid); a fixed light source for illuminating the scale with collimated light; and a light detection sensor. When the scale moves, the optical grid and the index grid overlap each other, producing a pattern of light and dark. The light detection sensor detects this light and dark pattern. The optical encoder-based measuring apparatus is commercially implemented as a digital gauge, and is primarily used as a relative position measuring apparatus for measuring the distance between two points. Optical encoder-based measuring apparatus according to the prior art will be described below with reference to relevant drawings. 
     FIG. 21 is a diagram showing a first prior art. The measuring apparatus shown in FIG. 21 comprises: a glass scale  10 ; an optical grid  11  formed on the glass scale  10 ; a light source  1  for illuminating the glass scale  10  with collimated slight; index grids  51  to  54  which receive light transmitted through the glass scale  10 ; an index base  50  where the index grids  51  to  54  are formed; light receiving elements  61  to  64  for receiving light transmitted through the index grids  51  to  54 ; and a substrate  20  where the light receiving elements  61  to  64  are formed. Also a semiconductor integrated circuit (IC)  22  and terminals  21  for connecting a cable  70  are formed on the substrate  20 . 
     The phase of the index grid  51  is shifted by  90  degrees, the phase of the index grid  52  is shifted by 180 degrees, the phase of the index grid  53  is shifted by 270 degrees, and the phase of index grid  54  is shifted by 360 degrees relative to the phase of the optical grid  11 . The light receiving elements  61  to  64  are each constructed from a signal light receiving element such as a photosensor. 
     The above-described first prior art is constructed by combining the glass scale, index grids, and light detection sensors, and thus the provision of index grids has been indispensable. Furthermore, to achieve high accuracy measurement, the pitch of the index grids, the proportions of the transparent and opaque portions of the index grids, the distance from the glass scale to the index grids, and the distance from the index grids to the light detection sensors must be adjusted accurately. 
     FIG. 22 is a diagram showing second prior art. The measuring apparatus shown in FIG. 22 comprises: a glass scale  10 ; an optical grid  11  formed on the glass scale  10 ; a light source for illuminating the glass scale  10  with collimated light; a light receiving array  37  for receiving light transmitted through the glass scale  10 ; and a substrate  20  where the light receiving array  37  is formed. Also a semiconductor integrated circuit (IC)  23  and terminals  21  for connecting a cable  70  are formed on the substrate  20 . 
     FIG. 23 is a diagram showing the relationship between the optical grid  11  and the light receiving array  37  in the second prior art. Reference character s designates the pitch of the optical grid  11 , while reference character w denotes the width of a transparent portion of the optical grid  11  and v denotes the width of an opaque portion of the optical grid  11 . Here, w and v are each set equal to s/2. 
     The light receiving array  37  consists of a plurality of light receiving elements. Reference character p designates the pitch of the light receiving elements, while reference character u denotes the width of a light receiving portion  35  and r denotes the width of a light insensitive portion. Here, p=3/4×s, u=s/2, and r=s/4. That is, the ratio of u to r is 2:1. 
     More specifically, the light receiving array  37  is arranged so that four light receiving elements, g 1 , g 2 , g 3  and g 4 , corresponds to three optical grid elements e 1 , e 2  and e 3 . Further, the light receiving array is constructed so that every fourth light receiving element receives the same amount of light. 
     In addition, a light receiving element a 1  is arranged so that its output is shifted in phase by 90 degrees relative to the output of b 1 , and a light receiving element b 1  is arranged so that its output is shifted in phase by 90 degrees relative to the output of c 1 . Likewise, c 1  and d 1  are arranged so that their outputs are shifted in phase by 90 degrees, respectively. In this arrangement, as shown in FIG. 24, every four light receiving elements are connected together and their outputs are summed. Here, let the sum of a 1 , a 2 , a 3 , . . . be denoted by A, the sum of b 1 , b 2 , b 3 , . . . denoted by B, the sum of c 1 , c 2 , c 3 , . . . denoted by C, and the sum of d 1 , d 2 , d 3 , . . . denoted by D. Then, the phases of A, B, C, and D are shifted by 90 degrees relative to one another. The measuring apparatus makes a measurement by processing the signals of A, B, C, and D. 
     As described above, in the second prior art, the size of each light receiving element has had to be restricted to 3/4×s, and complicated wiring has had to be provided to enable data to be taken from every four elements in the plurality of light receiving elements and summed together. 
     Another prior art is described in Japanese Unexamined Patent Publication Nos. 8-313209 and 9-33210. This prior art uses a light detection sensor (CCD) having sensor elements arranged in an array at the same pitch as the optical grid, and the light detection sensor is constructed to also serve as an index grid. In this prior art, however, since the light source is moved together with the optical grid while holding the light detection sensor stationary, the length of the light detection sensor (CCD) must be made equal to the measuring length. 
     Still another prior art is described in Japanese Unexamined Patent Publication 10-132612. In this prior art, light detection sensors are arranged so that they are shifted by s/4 relative to one another. This prior art, however, has the problem that the pitch of the optical grid is coarse and the resolution is low, since four light detection sensors must be arranged within one pitch of the optical grid. 
     It is an object of the present invention to provide a compact and high accuracy optical displacement measuring apparatus that resolves the above-outlined problems. 
     It is another object of the present invention to provide an optical displacement measuring apparatus that uses a plurality of light receiving arrays each having a plurality of light receiving elements arranged at the same pitch as the optical grid. 
     It is still another object of the present invention to provide an optical displacement measuring apparatus capable of indicating the unit of measurement (1 μm, 0.5 μm, etc) using simple configuration. 
     DISCLOSURE OF THE INVENTION 
     The present invention comprises: a moveable first member having an optical grid formed with a pitch s; a light source for illuminating the first member; a plurality of light receiving arrays, each having a plurality of light receiving elements arranged at the pitch s, for receiving light transmitted through the first member; and a computing circuit for measuring a displacement of the first member based on outputs from the plurality of light receiving arrays, and wherein the plurality of light receiving arrays are arranged so that one is shifted from another by a predetermined distance in a direction of movement of the first member. 
     Preferably, the optical grid includes a transparent portion and an opaque portion, and the ratio of the width of the transparent portion to the width of the opaque portion is 1:1, while each of the light receiving elements includes a light receiving portion and a light insensitive portion, and the ratio of the width of the light receiving portion to the width of the light insensitive portion is 1:1. 
     Further preferably, the plurality of light receiving arrays are arranged along the direction of movement of the first member, or along a direction perpendicular to the direction of movement of the first member. 
     More preferably, the predetermined distance is equal to s/4 or a minimum measurement unit, for example, 1 μm. 
     Preferably, the number of light receiving arrays is 2, 4, s, or s/2. 
     Further preferably, the light source emits collimated light. 
     In one preferred embodiment, the operating circuit includes: an intra-pitch relative position computing unit which performs a phase calculation based on the outputs from the plurality of light receiving arrays, and computes a relative position within one pitch from the phase calculation; a direction discriminating computing unit which discriminates the direction of movement of the first member based on the outputs from the plurality of light receiving arrays; a counter which counts a number of clear bands of contrast occurring due to the movement of the first member; a relative position computing unit which measures the displacement of the first member based on the result of the relative position computed by the intra-pitch relative position computing unit and on a count value supplied by the counter. Preferably, the optical displacement measuring apparatus comprises a display device for displaying the count value of the counter. 
     In another preferred embodiment, the computing circuit includes a converter which converts the outputs from the plurality of light receiving arrays into digital signals, a generator for generating a count signal for counting the amount of displacement of the first member based on the digital signals, and a counter which counts a leading edge or a trailing edge events of the count signal. 
     Preferably, an optical displacement measuring apparatus comprises a display device for displaying the count value of the counter. 
     More preferably, the count value of the counter corresponds a 1 μm or 0.5 μm displacement of the first member. 
     ADVANTAGEOUS EFFECT OF THE INVENTION 
     Since no index grid or the like is used, the present invention achieves an optical displacement measuring apparatus compact in size. 
     Furthermore, since the pitch of the light receiving elements is made the same as the pitch of the optical grid, and since the ratio of the width of the light receiving portion to the width of the light insensitive portion in each light receiving element is also made the same as the ratio of the width of the transparent portion to the width of the opaque portion in the optical grid, the invention achieves high accuracy with a simple configuration. 
     Moreover, in the optical displacement measuring apparatus of the invention, since provisions are made to generate a signal corresponding to a minimum measurement unit (1 μm, 0.5 μm, etc) and to display the measured result based on that signal, the measured result can be displayed using a simple and inexpensive configuration. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a schematic diagram showing a measuring apparatus according to a first embodiment of the present invention. 
     FIG. 2 is a diagram showing the relationship between an optical grid and a light receiving element array. 
     FIG. 3 is a diagram showing light receiving element arrays according to the first embodiment. 
     FIG. 4 is a block diagram showing a signal flow according to the first embodiment. 
     FIG. 5 is a diagram showing changes of outputs obtained from light receiving elements according to the first embodiment. 
     FIG. 6 is a diagram showing signal changes when a glass scale moves in direction A. 
     FIG. 7 is a diagram showing signal changes when the glass scale moves indirection B. 
     FIG. 8 is a schematic diagram showing a measuring apparatus according to a second embodiment of the present invention. 
     FIG. 9 is a diagram showing light receiving element arrays according to the second embodiment. 
     FIG. 10 is a block diagram showing a signal flow according to the second embodiment. 
     FIG. 11 is a diagram showing light receiving element arrays according to a third embodiment. 
     FIG. 12 is a block diagram showing a signal flow according to the third embodiment. 
     FIG. 13 is a diagram showing changes of signals obtained from light receiving elements according to the third embodiment. 
     FIG. 14 is a diagram showing light receiving element arrays according to a fourth embodiment. 
     FIG. 15 is a block diagram showing a signal flow according to the fourth embodiment. 
     FIG. 16 is a diagram showing changes of signals obtained from light receiving elements according to the fourth embodiment. 
     FIG. 17 is a block diagram showing a signal flow according to a fifth embodiment. 
     FIG. 18 is a diagram showing changes of signals obtained from light receiving elements according to the fifth embodiment. 
     FIG. 19 is a block diagram showing signal flow according to a sixth embodiment. 
     FIG. 20 is a diagram showing changes of signals obtained from light receiving elements according to the sixth embodiment. 
     FIG. 21 is a diagram showing first prior art. 
     FIG. 22 is a diagram showing second prior art. 
     FIG. 23 is a diagram showing the relationship between an optical grid and a light receiving element array. 
     FIG. 24 is a diagram showing a wiring of a light receiving element array according to the second prior art. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Embodiment 1 
     A first embodiment of the present invention will be described below. 
     FIG. 1 is a schematic diagram showing an optical displacement measuring apparatus according to this embodiment. Reference numeral  10  is a glass scale where an optical grid  11  is formed, and  1  is a light source for illuminating the glass scale  10  with collimated light. Further, reference numerals  31  to  34  are light receiving arrays for receiving light transmitted through the glass scale  10 . Reference numeral  40  is a semiconductor integrated circuit (one-chip IC) having adders  41  to  44 , an intra-pitch relative position computing unit  45 , a direction discriminating computing unit  46 , a counter  47 , and a relative position computing unit  48 . Reference numeral  21  indicates terminals for connecting a cable  70 . The cable  70  is used to supply power as well as to transfer signals to an external device such as a display device. The light receiving arrays  31  to  34 , the semiconductor integrated circuit  40 , and the terminals  21  are mounted on a substrate  20 . 
     The glass scale  10  is mounted on a movable measuring portion of the optical displacement measuring apparatus according to the present embodiment. The optical grid  11  is formed to extend in the direction of movement, A-B, of the glass scale  10 ; the length L of the optical grid  11  is made a little longer than the measurable length of the measuring apparatus, while the width E of the optical grid  11  is set so that the light transmitted through the optical grid  11  covers the light receiving arrays  31  to  34 . The glass scale  10  and the surface of the light receiving arrays  31  to  34 , are separated by a suitable distance. Preferably, light emitted from the light source  1  is monochromatic light. 
     FIG. 2 is an enlarged view showing a portion of the optical grid  11  and a portion of the light receiving element array  31 , with relative dimensions given for comparison purposes. Arrow A-B indicates the direction of movement of the glass scale. Reference character s designates the pitch of the optical grid  11 , while reference character w denotes the width of a transparent portion of the optical grid  11  and v denotes the width of an opaque portion of the optical grid  11 . Here, w and v are each set equal to s/2. 
     The light receiving array  31  consists of a plurality of light receiving elements  39 . Each light receiving element  39  consists of a light receiving portion  35  where light can be received, and a light insensitive portion  36  where light cannot be received. Reference character p designates the pitch of the light receiving element  39 , while reference character u denotes the width of the light receiving portion  35  and r the width of the light insensitive portion  36 . Here, u and r are each set equal to s/2. 
     FIG. 3 is a diagram showing the details of the light receiving arrays  31  to  34 . Arrow A-B indicates the direction of movement of the glass scale. The light receiving arrays  31  to  34  are arranged along the direction of movement, A-B, of the glass scale. Each light receiving array consists of fifty light receiving elements  39  horizontally (along a direction parallel to A-B) and four light receiving elements  39  vertically (along a direction perpendicular to A-B). Thus, each light receiving array is constructed from a total of two hundred light receiving elements  39 . 
     The width, p, of each light receiving element  39  is set at 8 μm, which is the same as the pitch, s, of the optical grid  11 , while u and r are each set at 4 μm. The horizontal length, Lx, of each light receiving array is, therefore, 400 μm (8×50). On the other hand, the length, q, of each light receiving element is set at 100 μm. The vertical length, Ly, of each light receiving array is, therefore, 400 μm (100×4). 
     The distance, t, between adjacent light receiving element arrays is set at s/4=2 μm. The horizontal length, LLx, of the light receiving arrays as a whole is, therefore, 1606 μm. Generally, the horizontal length, LLx, of the light receiving element arrays as a whole can be given as s×n×4+(s/4)×3, where s is the pitch and n is the number of light receiving elements in the horizontal direction in each light receiving element array. Accordingly, the length, L, of the optical grid  11  formed on the glass scale  10  must be set at least equal to the measuring length plus the length LLx. In the present embodiment, since the vertical length, Ly, of each light receiving element array is 400 μm, as noted above, the width, E, of the optical grid  11  formed on the glass scale  10  must be at least 400 μm. 
     Here, the distance, t, between adjacent light receiving arrays is set at s/4=2 μm, but instead, the distance t may be set, as necessary, at s×n (n is an integer)+s/4. 
     A method of computing the position of the glass scale  10  will be described below. 
     In the present embodiment, the pitch, s, of the optical grid  11  formed on the glass scale  11  coincides with the pitch, p, of the light receiving elements  39 , and also, the ratio of the width of the transparent portion  12  to the width of the opaque portion  13  in the optical grid  11  coincides with the ratio of the width of the light receiving portion  35  to the width of the light insensitive portion  36  in each light receiving element. As a result, each light receiving element within the same light receiving array is illuminated with the same amount of light. However, since the light receiving arrays are spaced apart by the distance t which is different from the pitch of the light receiving elements, the amount of light that falls on each light receiving element varies from one light receiving array to the next. 
     FIG. 4 is a block diagram illustrating a signal flow in the present embodiment. The semiconductor integrated circuit  40  includes the adders  41  to  44 , intra-pitch relative position computing unit  45 , direction discriminating computing unit  46 , counter  47 , and relative position computing unit  48 . The adders  41  to  44  are connected to the respective light receiving arrays  31  to  34 . Each adder adds together the outputs of all the light receiving elements in its associated light receiving array. In the present embodiment, since each light receiving array consists of two hundred light receiving elements  39 , a 200-times output can be obtained. I 1  to I 4  denote the outputs of the respective adders  41  to  44 . By summing the outputs from the plurality of light receiving elements, since manufacturing variations among the elements, etc. can be canceled, a highly accurate output can be obtained. 
     FIG. 5 illustrates how the outputs I 1  to I 4  change when the glass scale  10  is moved in the direction of arrow A in FIG.  1 . First, the output I 1  of the light receiving array  31  will be explained. It is assumed here that the initial state of the output I 1  is given when the transparent portion  12  of the optical grid  11  is aligned with the light receiving portion  35  of the light receiving array  31 , as shown in FIG.  2 . In this initial state, the output I 1  takes a maximum value as shown in FIG.  5 . The maximum value at this time is normalized to 1. When the glass scale  10  is moved in the direction of arrow A from the position in the initial state, the output I 1  gradually decreases. When the glass scale  10  has moved by s/4 (1/4 pitch), the output I 1  is at 1/2, and when the glass scale  10  has moved by s/2 (1/2 pitch), the output I 1  is at 0. The output I 1  is 0 when the opaque portion  13  of the optical grid  11  is aligned with the light receiving portion  35  of the light receiving array  31 . When the glass scale  10  is further moved in the direction of arrow A, the output I 1  gradually increases. When the glass scale  10  has moved by 3/4×s (3/4 pitch), the output I 1  is at 1/2, and when the glass scale  10  has moved by s (1 pitch), the output I 1  again reaches the maximum value. 
     Next, the output I 2  of the light receiving array  32  will be explained. The light receiving array  32  is arranged so that it is shifted by s/4 with respect to the light receiving array  31 . Therefore, in the initial state, the output I 2  is at 1/2 as shown in FIG.  5 . When the glass scale  10  is moved in the direction of arrow A, the output I 2  gradually increases. When the glass scale  10  has moved by s/4 (1/4 pitch), the output I 2  reaches the maximum value. When the glass scale  10  has moved by s/2 (1/2 pitch), the output I 2  is at 1/2; when the glass scale  10  has moved by 3/4×s (3/4 pitch), the output I 2  is at 0; and when the glass scale  10  has moved by s (1 pitch), thee output I 2  is at 1/2. As can be seen from a comparison between the output I 1  and the output I 2 , the output I 2  is 90 degrees shifted in phase with respect to the output I 1 . 
     The light receiving array  33  is arranged so that it is shifted by 2/4×s with respect to the light receiving array  31 . Therefore, in the initial state, the output I 3  of the light receiving array  33  is at 0 as shown in FIG. 5, and when the glass scale  10  has moved by s/2 (1/2 pitch), the output I 3  is at the maximum value. As can be seen from a comparison between the output I 1  and the output I 3 , the output I 3  is 180 degrees shifted in phase with respect to the output I 1 . 
     The light receiving array  34  is arranged so that it is shifted by 3/4×s with respect to the light receiving array  31 . Therefore, in the initial state, the output I 4  of the light receiving array  34  is at 1/2 as shown in FIG. 5, and when the glass scale  10  has moved by 3/4×s (3/4 pitch), the output I 4  is at the maximum value. As can be seen from a comparison between the output I 1  and the output I 4 , the output I 4  is 270 degrees shifted in phase with respect to the output I 1 . 
     Next, a description will be given of a method of how the intra-pitch relative position, x, of the glass scale  10  can be obtained based on the outputs I 1  to I 4 . 
     First, the phase Φ at the relative position x is obtained from the following equation (I). 
     
       
         Φ=tan −1 (( I   2   ′−I   4 ′)/( I   1   ′−I   3 ′))  (I) 
       
     
     Here, I 1 ′ to I 4 ′ are values obtained by multiplying the respective outputs I 1  to I 4  by two, and by subtracting 1 from the respective products. This is equivalent to expanding the respective outputs I 1  to I 4  from −1 to +1. The Φ obtained from equation (I) takes a value within the range of −π/2 to π/2. Therefore, π or 2π must be added to the Φ obtained from equation (I) in accordance with the relative magnitudes and the signs of the respective outputs I 1  to I 4 . Here, tan −1  is an arc tangent. 
     Next, the relative position x is obtained from the following equation (II). 
     
       
           x=Φ×s /2π  (II) 
       
     
     The above computations are performed by the intra-pitch relative position computing unit  45  in the semiconductor integrated circuit  40  shown in FIG.  4 . 
     Next, a description will be given of a method of how the direction of movement of the glass scale  10  can be discriminated based on the outputs I 1  to I 4 . 
     First, the outputs I 1  and I 2  as analog signals are converted to digital signals J 1  and J 2 , respectively, using a threshold of 0.5, as shown in FIG.  6 . FIG. 6 illustrates the case where the glass scale  10  is moved in the direction of arrow A shown in FIG.  1 . FIG. 6 shows the waveforms of the outputs I 1  and I 2  along with the waveforms of the digital signals J 1  and J 2  after conversion. On the other hand, FIG. 7 illustrates the case where the glass scale  10  is moved in the direction of arrow B shown in FIG.  1 . FIG. 7 shows the waveforms of the outputs I 1  and I 2  along with the waveforms of the digital signals J 1  and J 2  after conversion. In FIGS. 6 and 7, the positions of the light receiving arrays  31  and  32  relative to the position of the optical grid  11  on the glass scale  10  are also shown. 
     Referring to FIG. 6, when the digital signal J 2  falls, the digital signal J 1  is binary 0, and when the digital signal J 2  rises, the digital signal J 1  is binary 1. On the other hand, referring to FIG. 7, when the digital signal J 2  falls, the digital signal J 1  is binary 1, and when the digital signal J 2  rises, the digital signal J 1  is binary 0. In this way, by using the rising/falling of J 2  as a trigger, the direction of movement of the glass scale  10  can be discriminated. 
     The above has dealt with an example in which the outputs I 1  and I 2  are used, but it will be appreciated that the direction of movement of the glass scale  10  can also be discriminated using the outputs I 3  and I 4 . Alternatively, the magnitude relationship among the outputs I 1  to I 4  may be converted into a digital signal and the direction of movement of the glass scale  10  may be discriminated using this digital signal. 
     The above conversion and discrimination process is performed by the direction discriminating computing unit  46  within the semiconductor integrated circuit  40  shown in FIG.  4 . 
     Next, the counter  47  contained in the semiconductor integrated circuit  40  of FIG. 4 will be described. 
     The counter  47  counts the digital signal J 2  in accordance with an instruction signal supplied from the direction discriminating computing unit  46 . More specifically, when the result of the discrimination by the direction discriminating computing unit  46  shows that the glass scale  10  is moving in the direction of A, for example, the counter  47  increments the count value each time when the leading edge of the digital signal J 2  occurs. Conversely, when the result of the discrimination by the direction discriminating computing unit  46  shows that the glass scale  10  is moving in the direction of B, the counter  47  decrements the count value each time when the trailing edge of the digital signal J 2  occurs. 
     Accordingly, pitch moving distance L can be obtained from the following equation (III). 
     
       
           L=s×k   (III) 
       
     
     where k is the count value. 
     Next, the current position computing unit  48  contained in the semiconductor integrated circuit  40  of FIG. 4 will be described. 
     The current position computing unit  48  computes the current position, H, of the glass scale  10  from the relative position x, the phase Φ at the relative position x, the count value k, and the pitch moving distance L. If the relative position in the initial state is denoted by x 0 , the phase by Φ 0 , the count value by 0, and the pitch moving distance by 0 and if the relative position, when the glass scale  10  stops, is denoted by x 1 , the phase by Φ 1 , the count value by K 1 , and the pitch moving distance by L 1 , then the current position H can be obtained from the following equation (IV) or (V). 
     
       
           H=L   1 +( x   1   −x   0 )  (IV) 
       
     
     
       
           H=s ×( k   1 +(Φ 1 −Φ 0 )/2π  (V) 
       
     
     The current position, H, of the glass scale  10 , obtained by the current position computing unit  48 , is displayed as the measured value on the display device  49 . The display device  49  can be mounted in a suitable position on the optical displacement measuring apparatus of the present embodiment. 
     Embodiment 2 
     A second embodiment of the present invention will be described below. 
     FIG. 8 is a schematic diagram showing an optical displacement measuring apparatus according to this embodiment. In the first embodiment shown in FIG. 1, the light receiving arrays  31  to  34  are arranged along the direction of movement, AB, of the glass scale  10 . In contrast, in the present embodiment, light receiving arrays  231  to  234  are arranged along a direction perpendicular to the direction of movement, AB, of the glass scale  10 , as shown in FIG.  8 . 
     FIG. 9 is a diagram showing the details of the light receiving arrays  231  to  234 . As shown in FIG. 9, the four light receiving arrays  231  to  234  are arranged side by side in a direction perpendicular to the direction of movement, AB, of the glass scale  10 . Each light receiving array consists of one hundred light receiving elements  39  horizontally (along a direction parallel to A-B) and two light receiving elements  39  vertically (along a direction perpendicular to A-B). Thus, each light receiving array is constructed from a total of two hundred light receiving elements  39 . 
     The pitch, p, of each light receiving element  39  is set at 8 μm, which is the same as the pitch, s, of the optical grid  11 , while the light receiving portion u and the light insensitive portion r are each set at 4 μm. The horizontal length, Lx, of each light receiving array is, therefore, 800 μm (8×100). On the other hand, the length, q, of each light;receiving element is set at 100 μm. The vertical length, Ly, of each light receiving array is, therefore, 200 μm (100×2). 
     The light receiving element arrays are arranged so that one is shifted from another by f=s/4=2 μm in the horizontal direction. The horizontal length, LLx, of the light receiving arrays as a whole is, therefore, 806 μm. Generally, the horizontal length, LLx, of the light receiving element arrays as a whole can be given as s×n+(s/4)×3, where s is the pitch and n is the number of light receiving elements in the horizontal direction in each light receiving array. Accordingly, the length, L, of the optical grid  11  formed on the glass scale  10  must be set at least equal to the measuring length plus the length LLx. Further, the vertical length, LLy, of the light receiving element arrays as a whole is 800 μm (200 μm×4). Accordingly, the width, E, of the optical grid  11  formed on the glass scale  10  must be at least 800 μm. 
     Here,the light receiving arrays are arranged so that one is shifted from another by a distance f=s/4=2 μm, but instead, the distance f may be set, as necessary, at s×n (n is an integer)+s/4. In FIG. 9, the light receiving arrays  231  to  234  are shown as being arranged without providing any spacing between them, but instead, the light receiving arrays may be spaced apart from one another by a suitable distance. 
     FIG. 10 is a block diagram illustrating signal flow in the present embodiment. Parts that are identical in function to those in FIG. 4 are designated by the same reference numerals. The outputs obtained from the light receiving arrays  231  to  234  are denoted by I 21  to I 24 , respectively. Using these outputs I 21  to I 24  instead of the corresponding outputs I 1  to I 4  in the first embodiment, the current position H and the direction of movement of the glass scale  10  can be obtained in the same manner as the first embodiment. 
     In the first and second embodiments, the plurality of light receiving arrays are arranged only in a horizontal direction or a vertical direction with respect to the direction of movement, AB, of the glass scale  10 . However, the light receiving arrays may be arranged in other suitable way, the only requirement being that the outputs from the four light receiving arrays be shifted in phase by 90 degrees relative to one another. For example, it is also possible to arrange two light receiving arrays vertically and two light receiving arrays horizontally, or to arrange the four light receiving element arrays in an oblique direction. 
     The first and second embodiments have been described as using four light receiving element arrays. It will, however, be noted that the current position H and the direction of movement of the glass scale  10  can also be computed using two light receiving element arrays. 
     More specifically, in the first embodiment, the output I 1  of the light receiving element array  31  and the output I 3  of the light receiving element array  33  are exactly 180 degrees apart in phase, as shown in FIG.  5 . Likewise, the output I 2  of the light receiving element array  32  and the output I 4  of the light receiving element array  34  are exactly 180 degrees apart in phase. Accordingly, (I 1 ′−I 3 ′) and (I 2 ′−I 4 ′) in equation (I) can be replaced by 2I 1 ′ and 2I 2 ′, respectively. Then, equation (I) can be transformed into the following equation (VI). 
     
       
         Φ=tan −1 ( I   2   ′/I   1 ′)  (VI) 
       
     
     The Φ obtained from equation (VI) takes a value within the range of −π/2 to π/2. Therefore, π or 2π must be added to the Φ obtained from equation (VI) in accordance with the signs of the respective outputs I 1  and I 2 . In this way, the phase Φ can be obtained using only the two outputs I 1  and I 2 . That is, only two light receiving arrays  31  and  32  need to be provided in this case. The method of computing the relative position x and current position H is the same as that in the first embodiment, and will not be described in detail here. 
     When using only two light receiving arrays, an error tends to occur in the value of tan −1  when the value of the output I 1  or I 2  is at or near −1 or 1. When using four light receiving arrays, on the other hand, the outputs I 2  and I 4  can be used when the value of the output I 1  or I 3  is at or near −1 or 1, while when the value of the output I 2  or I 4  is at or near −1 or 1, the outputs I 1  and I 3  can be used. Accordingly, when four light receiving arrays are used, the measurement accuracy can be further enhanced over the entire range. 
     The first and second embodiments have been described dealing with the case where four or two light receiving arrays are arranged in such a manner as to be shifted from one another. The light receiving arrays are so arranged in order to shift the phase of each light receiving element by 90 degrees. It will, however, be noted that the number of light receiving arrays is not limited to four or two, but the necessary number of light receiving arrays can be provided according to the phase angle (°) of the output to be measured, that is, in the quantity equal to the number obtained by dividing 360 by the desired phase angle, for example, six light receiving arrays if it is desired to obtain an output for every 60 degrees, eight light receiving arrays if it is desired to obtain an output for every 45 degrees, and so on. 
     Further, the first and second embodiments have been described dealing with the case where the light receiving elements are arranged in such a manner as to be shifted from one another by s/4. In this case also, the light receiving elements are so arranged in order to shift the phase of each light receiving element by 90 degrees. Here again, the amount of displacement of each light receiving element can be varied according to the phase angle of the output to be obtained, for example, s/6 if it is desired to obtain an output for every 60 degrees, s/8 if it is desired to obtain an output for every 45 degrees, and so on. 
     In this way, by increasing the number of light receiving arrays, the measurement accuracy can be further enhanced because an output curve with improved linearity can be used. 
     Embodiment 3 
     A third embodiment of the present invention will be described below. 
     In the optical displacement measuring apparatus according to the present embodiment, the positional relationships among the light source  1 , the glass scale  10 , and the substrate  20  are the same as those in the second embodiment. In the present embodiment, however, eight light receiving arrays  331  to  338  are arranged side by side, as shown in FIG. 11, in a direction perpendicular to the direction of movement, AB, of the glass scale  10 . As shown in FIG. 11, each light receiving array consists of one hundred light receiving elements  39  horizontally (along a direction parallel to A-B) and one light receiving element  39  vertically (along a direction perpendicular to A-B). Thus, each light receiving array is constructed from a total of one hundred light receiving elements  39 . 
     The pitch, p, of each light receiving element  39  is set at 8 μm, which is the,same as the pitch, s, of the optical grid  11 . Likewise, the light receiving portion u and the light insensitive portion r are each set at 4 μm, which is the same as the transparent portion  12  and the opaque portion  13  of the optical grid  11 . The horizontal length, Lx, of each light receiving array is, therefore, 800 μm (8×100). On the other hand, the length, q, of each light receiving element is set at 100 μm; therefore, the vertical length, Ly, of each light receiving array is also 100 μm. 
     The light receiving arrays are arranged so that one is shifted from another by f=s/8=1 μm in the horizontal direction. The horizontal length, LLx, of the light receiving arrays as a whole is, therefore, 807 μm. Accordingly, the length, L, of the optical grid  11  formed on the glass scale  10  must be set at least equal to the measuring length plus the length LLx. Further, the vertical length, LLy, of the light receiving arrays as a whole is 800 μm (100 μm×8). Accordingly, the width, E, of the optical grid  11  informed on the glass scale  10  must be at least 800 μm. 
     Here, the light receiving arrays are arranged so that one is shifted from another by a distance f=s/8=1 μm, but instead, the distance f may be set, as necessary, at s×n (n is an integer)+s/8. In FIG. 11, the light receiving arrays are shown as being arranged without providing any spacing between them, but instead, the light receiving arrays may be spaced apart from one another by a suitable distance. 
     FIG. 12 is a block diagram illustrating signal flow in the present embodiment. Reference numerals  341  to  348  are adders, which are connected to the respective light receiving arrays. Each adder adds together the outputs of all the light receiving elements in its associated light receiving array. In the present embodiment, since each light receiving array consists of one hundred light receiving elements  39 , a 100-times output can be obtained. I 31  to I 38  denote the outputs of the respective adders  341  to  348 . 
     FIG. 13 illustrates how the outputs I 31  to I 38  change when the glass scale  10  is moved in the direction of arrow A. First, the output I 31  of the light receiving array  331  will be explained. It is assumed here that the initial state of the output I 31  is given when the transparent portion  12  of the optical grid  11  is aligned with the light reception active portion  35  of the light receiving array  331 . In this initial state, therefore, the output I 31  takes a maximum value. The maximum value at this time is normalized to 1. As can be seen from FIG. 13, the output I 32  is shifted in phase by 45 degrees with respect to the output I 31 . Likewise, the outputs I 33  to I 38  are shifted in phase by 45 degree, respectively. 
     In FIG. 12, reference numerals  351  to  358  are comparators, which are connected to the respective adders. The comparators  351  to  358  convert the outputs I 31  to I 38  into digital signals J 31  to J 38  by using a threshold of 0.5. In FIG. 13, the digital signals J 31  to J 36  are also shown. 
     Here, signals A and B are defined as follows. The signals A and B are generated by a logic operation circuit  360  connected to the comparators  351  to  358 . 
     
       
         
           A=J 
           31 
           ·J 
           37 
           +J 
           33 
           ·J 
           35 
         
       
     
     
       
         
           B=J 
           32 
           ·J 
           38 
           +J 
           34 
           ·J 
           36 
         
       
     
     The signals A and B are shown in FIG.  13 . Since the pitch of the light receiving elements  39  in each light receiving array is 8 μm, the digital signals J 31  to J 38  each periodically vary with a cycle T=8 μm. Accordingly, the leading edge/trailing edge of the signals A and B occurs exactly at every 1 μm. Then, a counter  370  connected to the logic operation circuit  360  increments its count value by using the leading edge/trailing edge of the signals A and B as a trigger. This means that the counter  370  increments by 1 for every 1 μm movement of the glass scale. 
     When the count value of the counter  370  in the initial state is set to 0, the count value×1 μm indicates the current position of the glass scale  10 . Accordingly, by displaying the count value of the counter  370  directly on the external display device  380 , the measured value can be displayed in units of 1 μm. 
     Embodiment 4 
     A fourth embodiment of the present invention will be described below. 
     In the optical displacement measuring apparatus according to the present embodiment, the positional relationships among the light source  1 , the glass scale  10 , and the substrate  20  are the same as those in the second embodiment. In the present embodiment, however, four light receiving arrays  431  to  434  are arranged side by side, as shown in FIG. 14, in a direction perpendicular to the direction of movement, AB, of the glass scale  10 . 
     The present embodiment is intended to achieve the same results as the third embodiment by using the four light receiving arrays  431  to  434 . In FIG. 13, it is noted that the digital signal J 31  and the digital signal J 35  are exactly 180 degrees apart in phase. This means that the digital signal J 35  can be generated by inverting J 31 . Likewise, the digital signals J 36 , J 37 , and J 38  can be generated from J 32 , J 33 , and J 34 , respectively. Accordingly, using the four light receiving arrays, measuring can be performed in a manner similar to the third embodiment. 
     FIG. 14 shows the details of the light receiving arrays  431  to  434  in the present embodiment. As shown in FIG. 14, the four light receiving arrays  431  to  434  are arranged side by side in a direction perpendicular to the direction of movement, AB, of the glass scale  10 . Each light receiving array consists of one hundred light receiving elements  39  horizontally (along a direction parallel to A-B) and one light receiving element  39  vertically (along a direction perpendicular to A-B). Thus, each light receiving array is constructed from a total of one hundred light receiving elements  39 . 
     The pitch, p, of each light receiving element  39  is set at 8 μm, which is the same as the pitch, s, of the optical grid  11 . Likewise, the light receiving portion u and the light insensitive portion r are each set at 4 μm, which is the same as the transparent portion  12  and the opaque portion  13  of the optical grid  11 . The horizontal length, Lx, of each light receiving array is, therefore, 800 μm (8×100). On the other hand, the length, q, of each light receiving element is set at 100 μm; therefore, the vertical length, Ly, of each light receiving element array is also 100 μm. 
     The light receiving arrays are arranged so that one is shifted from another by f=s/8=1 μm in the horizontal direction. The horizontal length, LLx, of the light receiving arrays as a whole is, therefore, 803 μm. Accordingly, the length, L, of the optical grid  11  formed on the glass scale  10  must be set at least equal to the measuring length plus the length LLx. Further, the vertical length, LLy, of the light receiving element arrays as a whole is 400 μm (100 μm×4). Accordingly, the width, E, of the optical grid  11  formed on the glass scale  10  must be at least 400 μm. 
     Here, the light receiving arrays are arranged so that one is shifted from another by a distance f=s/8=1 μm, but instead, the distance f may be set, as necessary, at s×n (n is an integer)+s/8. In FIG. 14, the light receiving arrays  431  to  434  are shown as being arranged without providing any spacing between them, but instead, the light receiving arrays may be spaced apart from one another by a suitable distance. 
     FIG. 15 is a block diagram illustrating signal flow in the present embodiment. Reference numerals  441  to  444  are adders, which are connected to the respective light receiving arrays. Each adder adds together the outputs of all the light receiving elements in its associated light receiving array. In the present embodiment, since each light receiving array consists of one hundred light receiving elements  39 , a 100-times output can be obtained. I 41  to I 44  denote the outputs of the respective adders  441  to  444 . 
     FIG. 16 illustrates how the outputs I 41  to I 44  change when the glass scale  10  is moved in the direction of arrow A. First, the output  14 , of the light receiving array  431  will be explained. It is assumed here that the initial state of the output I 41  is given when the transparent portion  12  of the optical grid  11  is aligned with the light reception active portion  35  of the light receiving array  431 . In this initial state, therefore, the output I 41  takes a maximum value. The maximum value at this time is normalized to 1. As can be seen from FIG. 16, the output I 42  is shifted in phase by 45 degrees with respect to the output I 41 . Likewise, the outputs I 43  and I 44  are shifted in phase by 45 degree, respectively. 
     In FIG. 15, reference numerals  451  to  454  are comparators, which are connected to the respective adders. The comparators  451  to  454  convert the outputs I 41  to I 44  into digital signals J 41  to J 44  using a threshold of 0.5. In FIG. 16, the digital signals {overscore (J 41 )} to {overscore (J 44 )} are shown along with digital signals J 41  to J 44 . {overscore (J 41 )} to {overscore (J 44 )} are inverted versions of J 41  to J 44 , and are generated by a logic operation circuit  460 . 
     Here signals A and B are defined as follows. The signals A and B are generated by the logic operation circuit  460  connected to the comparators  451  to  454 . 
     
       
         
           A=J 
           41 
           ·{overscore (J 43 )} 
           +J 
           43 
           ·{overscore (J 41 )} 
           =J 
           41 
           ⊕J 
           43 
         
       
     
     
       
         
           B=J 
           42 
           ·{overscore (J 44 )} 
           +J 
           44 
           ·{overscore (J 42 )} 
           =J 
           42 
           ⊕J 
           44 
         
       
     
     Here, symbol ⊕ denotes an exclusive-OR operation. Therefore, if an exclusive-OR circuit is used for the logic operation circuit, the inverted signals need not be generated, and the logic circuit can be simplified. That is, in equations 
     
       
           A=J   41   ⊕J   43  and  B=J   42   ⊕J   44   
       
     
     inverted signals are not contained. 
     The signals A and B are shown in FIG.  16 . Since the pitch of the light receiving elements  39  in each light receiving array is 8 μm, the digital signals J 41  to J 44  each periodically vary with a cycle T=8 μm. Accordingly, the leading edge/trailing edge of the signals A and B occurs exactly at every 1 μm. Then, a counter  470  connected to the logic operation circuit  460  increments its count value by using the leading edge/trailing edge of the signals A and B as a trigger. This means that the counter  470  increments by 1 for every 1 μm movement of the glass scale. 
     When the count value of the counter  470  in the initial state is set to 0, the count value×1 μm indicates the current position of the glass scale. Accordingly, by displaying the count value of the counter  470  directly on the external display device  480 , the measured value can be displayed in units of 1 μm. Thus, the same results as in the third embodiment can be obtained using the four light receiving arrays  431  to  434 . 
     Embodiment 5 
     A fifth embodiment of the present invention will be described below. 
     In the optical displacement measuring apparatus according to the present embodiment, the positional relationships among the light source  1 , the glass scale  10 , and the substrate  20  are the same as those in the second embodiment. The present embodiment, however, uses eight light receiving arrays  331  to  338 , such as shown in FIG. 11, to enhance the measurement accuracy. 
     FIG. 17 is a block diagram illustrating signal flow in the present embodiment. Reference numerals  541  to  548  are adders, which are connected to the respective light receiving arrays  331  to  338 . Each adder adds together the outputs of all the light receiving elements in its associated light receiving array. In the present embodiment, since each light receiving array consists of one hundred light receiving elements  39 , a 100-times output can be obtained. I 51  to I 58  denote the outputs of the respective adders  541  to  548 . 
     FIG. 18 illustrates, using solid lines, how the outputs I 51  to I 58  change when the glass scale  10  is moved in the direction of arrow A. First, the output I 51  of the light receiving array  331  will be explained. It is assumed here that the initial state of the output I 51  is given when the transparent portion  12  of the optical grid  11  is aligned with the light receiving portion  35  of the light receiving array  331 . In this initial state, therefore, the output I 51  takes a maximum value. The maximum value at this time is normalized to 1. As can be seen from FIG. 18, the output I 52  is shifted in phase by 45 degrees with respect to the output I 51 . Likewise, the outputs I 53  to I 58  are shifted in phase by 45 degrees, respectively. 
     In FIG. 17, reference numerals  551  to  558  are comparators, which are connected to the respective adders  541  to  548 . The comparators  551  to  558  convert the outputs I 51  to I 58  into digital signals J 51  to J 58  by using a threshold of 0.5. In FIG. 18, the digital signals J 51  to J 58  are also shown. 
     In FIG. 17, reference numerals  511  to  518  are analog adders. The analog adder  511  adds the outputs I 51  and I 52  and divides the sum by two to generate an output V 51 . In the same manner, outputs V 52  to V 58  are generated by the analog adders  512  to  518 , respectively. In FIG. 18, the generated outputs V 51  to V 58  are shown by dashed lines. As can be seen from FIG. 18, the output V 52  is shifted in phase by 45 degrees with respect to the output V 51 . Likewise, the outputs V 53  to V 58  are shifted in phase by 45 degrees, respectively. 
     Reference numerals  521  to  528  in FIG. 17 are also comparators, which are connected to the respective analog adders  511  to  518 . The comparators  521  to  528  convert the outputs V 51  to V 58  into digital signals W 51  to W 58  by using a threshold of 0.5. In FIG. 18, the digital signals W 51  to W 58  are also shown. 
     Here, signals C and D are defined as follows. The signals C and D are generated by a logic operation circuit  560  connected to the comparators  551  to  558  and  521  to  528 . 
     
       
         
           C=J 
           51 
           ·J 
           56 
           +J 
           53 
           ·J 
           58 
           +J 
           52 
           ·J 
           55 
           +J 
           54 
           ·J 
           57 
         
       
     
     
       
         
           D=W 
           51 
           ·W 
           56 
           +W 
           53 
           ·W 
           58 
           +W 
           52 
           ·W 
           55 
           +W 
           54 
           ·W 
           57 
         
       
     
     The signals C and D are shown in FIG.  18 . Since the pitch of the light receiving elements  39  in each light receiving array is 8 μm, the digital signals J 51  to J 58  each periodically vary with a cycle T=8 μm. Accordingly, the leading edge/trailing edge of the signals C and D occurs exactly at every 0.5 μm. Then, a counter  570  connected to the logic operation circuit  560  increments its count value by using the leading edge/trailing edge of the, signals C and D as a trigger. This means that the counter  570  increments by 1 for every 0.5 μm movement of the glass scale. 
     When the count value of the counter  570  in the initial state is set to 0, the count value×0.5 μm indicates the current position of the glass scale. The count value of the counter  570  is displayed on the external display device  580 . 
     As described above, in the present embodiment, two outputs, 45 degrees apart in phase, are added together by each analog adder and the sum is divided by two. Here, consider the processing of the two outputs I 51  and I 52 . Assuming that I 51  is sinα and I 52  is sin(α+45°), the output V 51  is then 1/2 (I 51 +I 52 )=0.92×sin(α+45/2°). As can be seen, V 51  is at the midpoint between I 51  and I 52 . Since the amplitude of V 51  is smaller than the amplitude of I 51 , the amplitude of W 51  is adjusted by correcting the op-amp amplification factor of the analog adder. 
     Embodiment 6 
     A sixth embodiment of the present invention will be described below. 
     In the optical displacement measuring apparatus according to the present embodiment, the positional relationships among the light source  1 , the glass scale  10 , and the substrate  20  are the same as those in the second embodiment. 
     The present embodiment is intended to achieve the same results as the fifth embodiment by using four light receiving arrays. In FIG. 18, it is noted that the digital signal J 51  and the digital signal J 55  are exactly 180 degrees apart in phase. This means that the digital signal J 55  can be generated by inverting J 51 . Likewise, the digital signals J 56 , J 57 , and J 58  can be generated from J 52 , J 53 , and J 54 , respectively. Accordingly, using the four light receiving arrays, measuring can be performed in a manner similar to the fifth embodiment. In the present embodiment, the light receiving arrays  431  to  434  shown in FIG. 14 are used. 
     FIG. 19 is a block diagram illustrating signal flow in the present embodiment. Reference numerals  641  to  644  are adders, which are connected to the respective light receiving arrays  431  to  434 . Each adder adds together the outputs of all the light receiving elements in its associated light receiving array. In the present embodiment, since each light receiving array consists of one hundred light receiving elements  39 , a 100-times output can be obtained. I 61  to I 64  denote the outputs of the respective adders  641  to  644 . 
     FIG. 20 illustrates, using solid lines, how the outputs I 61  to I 64  change when the glass scale  10  is moved in the direction of arrow A. First, the output I 61  of the light receiving array  431  will be explained. It is assumed here that the initial state of the output I 61  is given when the transparent portion  12  of the optical grid  11  is aligned with the light receiving portion  35  of the light receiving element array  431 . In this initial state, therefore, the output I 61  takes a maximum value. The maximum value at this time is normalized to 1. As can be seen from FIG. 20, the output I 62  is shifted in phase by 45 degrees with respect to the output I 61 . Likewise, the outputs I 63  and I 64  are shifted in phase by 45 degrees, respectively. 
     In FIG. 19, reference numerals  651  to  654  are comparators, which are connected to the respective adders  641  to  644 . The comparators  641  to  654  convert the outputs I 61  to I 64  into digital signals J 61  to J 64  by using a threshold of 0.5. In FIG. 20, the digital signals {overscore (J 61 )} to {overscore (J 64 )} are shown along with digital signals J 61  to J 64 . {overscore (J 61 )} to {overscore (J 64 )} are inverted versions of J 61  to J 64 . The digital signals {overscore (J 61 )} to {overscore (J 64 )} are generated by a logic operation circuit  660  from the digital signals J 61  to J 64 . 
     In FIG. 19, reference numerals  611  to  613  are analog adders. The analog adder  611  adds the outputs I 61  and I 62  and divides the sum by two to generate an output V 61 . In the same manner, outputs V 62  and V 63  are generated by the analog adders  612  and  613 , respectively. Reference numeral  614  in FIG. 19 is an analog subtractor. The analog subtractor  614  subtracts  161  from the output I 64  and divides the resulting difference by two to generate an output V 64 . In FIG. 20, the thus generated outputs V 61  to V 64  are shown by dashed lines. As can be seen from FIG. 20, the output V 62  is shifted in phase by 45 degrees with respect to the output V 61 . Likewise, the outputs V 63  and V 64  are shifted in phase by 45 degrees, respectively. 
     Reference numerals  621  to  624  in FIG. 19 are also comparators, which are connected to the respective analog adders  611  to  614 . The comparators  621  to  624  convert the outputs V 61  to V 64  into digital signals W 61  to W 64  by using a threshold of 0.5. In FIG. 20, the digital signals {overscore (W 61 )} to {overscore (W 64 )} are shown along with digital signals W 61  to W 64 . The digital signals {overscore (W 61 )} to {overscore (W 64 )}are inverted versions of W 61  to W 64 . The digital signals W 61  to W 64  are generated by the logic operation  660  from the digital signals W 61  to W 64 . 
     Here, signals C and D are defined as follows. The signals C and D are generated by the logic operation circuit  660  connected to the comparators  651  to  654  and  621  to  624 . 
     
       
         
           C=J 
           61 
           ·{overscore (J 62 )} 
           +J 
           63 
           ·{overscore (J 64 )} 
           +J 
           62 
           ·{overscore (J 61 )} 
           +J 
           64 
           ·{overscore (J 63 )} 
           =J 
           61 
           ⊕J 
           62 
           +J 
           63 
           ⊕J 
           64 
         
       
     
     
       
           D=W   61   ·{overscore (W 62 )}   +W   63   ·{overscore (W 64 )}   +W   62   ·{overscore (W 61 )}   +W   64   ·{overscore (W 63 )}   =W   61 ⊕W 62   +W   63   ⊕W   64   
       
     
     Accordingly, an exclusive-OR circuit is used for the logic operation circuit  660 , eliminating the need to generate inverted signals and thus simplifying the circuit. 
     The signals C and D are shown in FIG.  20 . Since the pitch of the light receiving elements  39  in each light receiving array is 8 μm, the digital signals J 61  to J 64  each periodically vary with a cycle T=8 μm. Accordingly, the leading edge/trailing edge of the signals C and D occurs exactly at every 0.5 μm. Then, a counter  670  connected to the logic operation circuit  660  increments its count value by using the leading edge/trailing edge of the signals C and D as a trigger. This means that the counter  670  increments by 1 for every 0.5 μm movement of the glass scale. Thus, the same results as in the fifth embodiment can be obtained using the four light receiving arrays  431  to  434 . 
     In the third to sixth embodiments, the pitch, s, of the optical grid  11  and the pitch, p, of the light receiving elements  39  are both 8 μm, and four or eight light receiving arrays are arranged so that one is shifted from another by s/8 (or p/8), to obtain a count value for every 0.5 or 1 μm. On the other hand, if s=p=12 μm, six or twelve light receiving arrays should be arranged so that one is shifted from another by s/12=1 μm; in this case also, a count value can be obtained for every 0.5 or 1 μm in the same manner as described above. 
     Also consider the case where the pitch, s, of the optical grid  11  and the pitch, p, of the light receiving elements are both 0.008 inch (0.2032 mm) and the light receiving arrays are arranged so that one is shifted from another by 0.001 inch (0.0254 mm); in this case, by employing a method similar to those used in the third to sixth embodiments, a count value can be obtained for every 0.0005 inch (0.0127 mm) or 0.001 inch (0.0254 mm). 
     In this way, by arranging the number, s or s/2, of light elements so that one is shifted from another by an amount equal to a minimum unit in accordance with the pitch of the optical grid, a count value can be obtained for the desired numeric value. In the third to sixth embodiments the light receiving arrays are arranged along a direction perpendicular to the direction of movement of the glass scale  10 , but they may be arranged along a direction parallel to the direction of movement of the glass scale  10  as in the first embodiment.