To enable avoidance of erroneous detection in the position and speed of a carriage caused by an encoder sensor even when an encoder sheet is stained.
A CPU 50 allows the carriage 15 to move in a main scanning direction, the encoder sensor 21 to read the graduations of the encoder sheet, and a counter to count the marks of the graduations. Such counting is performed till measuring time reaches prescribed time by allowing a timer to perform time measurement from the start of movement of the carriage 15. Thereafter, whether or not a counted value by the counter reaches a target counted value set in advance is determined. If the counted value does not reach the target counted value, a motor 34 for controlling the encoder sheet is driven to rotate to move the encoder sheet, whereby the stain of the encoder sheet is made to get out of a read object range of the encoder sensor 21.
Kei Osawa