摘要 |
PURPOSE:To realize a high-precision control, by obtaining a movement speed on a basis of the time from the preceding rise/fall of a pulse signal when the pulse signal rises/falls and measuring the speed with a two-fold frequency of the pulse signal. CONSTITUTION:The pulse signal of an encoder 2 which is shaped into square waves by a waveform shaping circuit 3 is inputted to an interruption generating circuit 4. The output of an OR gate becomes H by edges of the rise and the fall of a pulse, and an interruption request is inputted to a terminal INT of a microcomputer 6. In the computer 6, an external interruption routine is started, and sampling of a reference timer is performed to obtain the current time. This time is compared with the time when the preceding edge is generated, and an edge interval is calculated. This edge interval is compared with time interval data corresponding to a set rotation number for which the control aims, and the error is outputted as the variation of the power supply quantity to a DC motor 1 through a driver circuit 8. |