PURPOSE: To accurately index a cam reference position by rotating a cam of a head driving mechanism by one revolution, measuring a rotary angle of the cam while a loading state of a thermal head is detected by a sensor, and calculating the reference position of the cam from the measured value.
CONSTITUTION: A cam rotary angle 63 from a home position to a vertex is a value obtained in a design, and number of motor driving pulses corresponding to the angle is input to a memory. Then, a stepping motor 21 is driven, and number of driving pulses corresponding to a cam rotary angle θ0 is counted while an output level of a sensor 20 is in a light shielding state. Then, a cam rotary angle θ4 to a position where the level of the sensor 20 is altered to a light transmitting state is obtained from an equation of θ4 = θ3-θ0/2, and stored. Thereafter, in the case of printing, a cam 8 is rotated by a stepping motor 21 until a thermal head 1 arrives at a bottom dead point, the cam 8 is rotated at the θ4 from a time point when the level of the sensor 20 is altered from the shielding state to the transmitting state after the printing is finished, and then stopped.