The photo-interrupter-type pump cam sensor detects that the sensor light is shielded or unshielded by the rotary cam. The sensor detects the purge unit capping and
wiping states with the combination of the state detected by the pump cam and the state of pump motor rotation control performed by the pump encoder.