摘要 |
According to an embodiment, an image forming apparatus includes: a carriage, on which a recording head is mounted, to be driven by a driving source to reciprocate; and a drive control unit that controls driving of the driving source by PWM control. The drive control unit includes a detecting unit that detects at least any one of a position and a velocity of the carriage, a calculating unit that calculates PWM command values from detection results output from the detecting unit, a storing unit that stores a maximum value and a minimum value of the PWM command values, a comparing unit that compares a difference between the maximum value and the minimum value against a predetermined threshold value, and a stop-output command unit that, when the difference between the maximum value and the minimum value exceeds the threshold value, outputs a command to stop driving of the carriage. |