Patent ID: 7918526

Claim:
A method of controlling a printer which comprises: a detector, operable to output an output signal in accordance with a state of a printing medium transported within the printer; and a control signal generator, operable to generate a control signal in accordance with a level of the output signal relative to a threshold, the method comprising: detecting the output signal; detecting a timing signal indicative of a timing to judge the state of the printing medium; and generating the control signal with at least two of: a first method, in which the control signal is made valid when the level of the output signal reaches the threshold after the timing signal is detected, and the control signal is unchanged until first time period is elapsed from when the control signal is made valid; a second method, in which the control signal is made valid when the level of the output signal reaches the threshold at least once after the timing signal is detected, and the control signal is unchanged until a next timing signal is detected; and a third method, in which the control signal is made valid in accordance with a condition that the level of the output signal lastly reaches the threshold before a second time period is elapsed from when the timing signal is detected, and the control signal is unchanged until a next timing signal is detected; wherein: the control signal is generated with at least the first method in a case where printing is performed with respect to a plurality of printing media consecutively; the control signal is generated with the second method in a case where printing is performed with respect to only one printing medium; and the control signal is generated with the second method to detect a leading edge of the first one of the printing media.