To attain a stable scale detection even when the distance between a belt and a sensor is varied.
A region 5A where a scale 5 exists and a region 5B where the scale 5 does not exist are irradiated with a first light emitting diode 1A and a second light emitting diode 1B via a collimating lens 2 and a slit mask 3, respectively. Reflected light is received by a first sensor 4A and a second sensor 4B, respectively, to find a differential signal of each output, and scale detection is performed based on it. Even when distance between the scale 5 and sensors 4A, 4B changes, detection level of the first sensor 4A and the second sensor 4B similarly changes and stable scale detection can be performed independently of change of the distance between the belt and the sensor by taking the difference.