摘要 |
A photoelectric encoder includes: a scale 13 having a grating 12 formed with a predetermined period Ps; and a detector head 20 being movable relative to the scale 13 and including a light source 14 and a light receiving unit 30. In a configuration where light
receiving elements 34 in the light receiving unit 30 output N-points light and dark signals (N is an integer of 3 or more), and where phases of the N-points light and dark signals are detected by a least-squares method to fit a sinusoidal function with fixed period to N-points digital signals digitized from the N-points light and dark signals, an N-points light and dark signal period P is set at an integral multiple of a data-point interval w of the N-points digital signals, and an overall length M of the light receiving elements 34 is set at an integral multiple of the N-points light and dark signal period P. Thereby, position detecting errors occurring due to a stain of the scale 13 and/or a defect in the grating 12 can be reduced by simple computing. |