PURPOSE: To detect a speed with high accuracy, by making the pulse from a pulse generator (PG) synchronous with the change-over of a counter and detecting the GS pulse without releasing the same.
CONSTITUTION: When an order signal is inputted to a terminal 22, CPU 2 sets a setting sampling time through a timer. When a set time is elapsed, the setting signal is inputted to a latch circuit 4' through a latch circuit 4''' and an order signal is generated at the first rising of the input of a PG pulse signal. This order signal is inputted to a latch circuit 4" and counters 5, 5' are changed over by the gate signal therefrom. Therefore, the synchronism of the gate signal with a PG pulse is taken and the number and time of the PG pulses can be detected by a sampling system corresponding to a pulse width.