Patent ID: 8058831

Claim:
A control device that controls drive means, the control device comprising: periodic signal acquisition means for acquiring a pulse signal having a period that corresponds to a speed of a driven body being displaced depending on drive by the drive means; edge detecting means for detecting either a rising or falling edge of the pulse signal; timer means for starting timekeeping from a time point when the edge is detected by the edge detecting means; computing means for computing, after an edge is detected by the edge detecting means, a period between the presently detected edge and an immediately previously detected edge; storing means for storing in chronological order the period of edge computed by the computing means; comparing means for comparing lengths of time between a measurement time kept by the timer means and a latest period of edge stored in the storing means; and output means for outputting a value of either the measurement time or the period, whichever is longer based on a comparison result of the comparing means.