Patent ID: 7530658

Claim:
A printer comprising: a motor; an encoder, configured to be opposed to a scale provided with a plurality of marks or slits arranged in a first direction at predetermined intervals; comprising: a plurality of detectors, arranged in a second direction perpendicular to the first direction while being staggered in the first direction, each of which detects a position of each of the marks or slits, and the plurality of detectors being operable to respectively output an detection signal which have a first frequency; a first signal generator, which is operable to generate an first output signal which have a second frequency which is 2 n -times of the first frequency based on the detection signal output from a first detector of the plurality of detectors, where n is an integer and is greater than 0; a second signal generator, which is operable to generate a second output signal which have the second frequency based on the detection signal output from a second detector of the plurality of detectors; a third signal generator, which is operable to generate a third output signal which have the second frequency based on the detection signal output from a third detector of the plurality of detectors; and a fourth signal generator, which is operable to generate a fourth output signal which have the second frequency based on the detection signal output from a fourth detector of the plurality of detectors; and a controller, which detects a rotational position of the motor and a rotational speed of the motor based on at least one of the first output signal, the second output signal, the third output signal, and the fourth output signal, and which controls the rotational speed of the motor by PID control based on the detected rotational position and the detected rotational speed, wherein: the controller stores a target speed table having a target rotational speed corresponding to the rotational position; and the target speed table having the target rotational speed corresponding to the rotational position which is detected on the basis of at most three of: the first output signal, the second output signal, the third output signal, and the fourth output signal.