A stepper motor driven spindle servo control system and method for electrospark small hole machining

By using a servo control system with dual-frequency drive and stepper motor fraction adjustment in the electric spark hole machining machine tool, the problem of difficulty in achieving small-step equivalent feed and large-step equivalent retraction of the spindle is solved, and the processing efficiency and Convenience of operation.

CN110120764BActive Publication Date: 2024-11-05SUZHOU BAOMA NUMERICAL CONTROL EQUIP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910361193.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-04-30
Publication Date
2024-11-05
Estimated Expiration
2039-04-30

AI Technical Summary

Technical Problem

The spindle servo control system of existing electric spark small hole machining machine tools is difficult to achieve small step equivalent feed and large step equivalent retraction, which affects the processing efficiency and convenience of electrode position adjustment.

Method used

Using a servo control system including discharge machining switch, sampling circuit, PID adjustment circuit, phase identification circuit, subdivision code conversion circuit and stepper motor driver, the spindle is manually realized through dual-frequency driving method and adjustment of stepper motor fractions. Fast feed and fallback in operation mode, and automatic stepper motor drive sub-segment conversion in servo control mode.

Benefits of technology

It realizes flexible control of the spindle under different working conditions, meets different needs for electric spark hole processing, and improves processing efficiency and operation convenience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110120764B_ABST
    Figure CN110120764B_ABST
Patent Text Reader

Abstract

The invention relates to a servo control system and method for a stepper motor driven spindle for electric spark small hole machining. The control system comprises a sampling circuit for collecting a discharge gap voltage signal, a PID regulating circuit, a voltage setting circuit, an absolute value circuit, a phase detection circuit, a voltage comparison circuit, a subdivision code conversion circuit, and a stepper motor driver whose input end is connected to the output end of the subdivision code conversion circuit. The subdivision number of the stepper motor is adjusted so that the spindle can be quickly fed or retracted in a manual operation mode. The subdivision number of the stepper motor can be automatically changed in a servo control mode to realize small step equivalent feeding and large step equivalent retraction, thereby meeting different requirements for spindle operation under different working conditions of an electric spark small hole machining machine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of machining equipment, and in particular to a stepper motor driven spindle servo control system and method for electric spark small hole machining. Background Art

[0002] The servo spindle (Z axis) is the main control axis of the EDM small hole machining machine. Its main function is to realize the servo movement during the machining process. Secondly, under manual operation, it drives the electrode to move up / down at a constant speed to facilitate the replacement, clamping and adjustment of the electrode position during the machining process. Its servo performance and constant speed of movement have a direct impact on the machining results and the convenience of operation.

[0003] At present, the actuators used for spindle drive usually adopt AC servo motors, DC servo motors and stepper motors. In view of the price advantage, good motion characteristics and simplicity of control circuit of the new subdivision hybrid stepper motor, the application of hybrid subdivision stepper motor in EDM small hole machining machine tools below three-axis CNC is becoming more and more common.

[0004] Generally speaking, during the machining process, while meeting the spindle servo feed speed corresponding to the maximum machining speed, the servo control step equivalent is required to be as small as possible to achieve a slight adjustment of the discharge gap, so that the servo feed speed of the electrode can match the etching speed of the workpiece and maintain the continuity and stability of the discharge machining.

[0005] In manual operation and when the spindle needs to quickly retract to the upper limit after a hole is processed, in order to shorten the idle running time, the spindle up / down movement speed is required to be faster, so as to improve the overall working efficiency of the machine tool. Summary of the invention

[0006] The object of the present invention is to provide a stepper motor driven spindle servo control system for electric spark small hole machining which can realize small step equivalent feeding and large step equivalent retraction.

[0007] In order to solve the above technical problems, the present invention adopts the following technical scheme: a stepper motor driven spindle servo control system for an electric spark small hole machining machine, which includes an electric discharge machining switch, a sampling circuit for collecting a discharge gap voltage signal, a PID regulating circuit whose input end is connected to an output end of the sampling circuit outputting a voltage signal, a voltage setting circuit whose output end is connected to a voltage signal input end of the PID regulating circuit, an absolute value circuit connected to the output end of the PID regulating circuit, a phase detection circuit whose input end is connected to the output end of the PID regulating circuit, a voltage comparison circuit whose input end is connected to an output end of a positive voltage amplitude signal output by the absolute value circuit, a subdivision code conversion circuit whose input end is connected to an output end of the voltage comparison circuit, and a stepper motor driver whose input end is connected to an output end of the subdivision code conversion circuit, wherein the output end of the phase detection circuit is respectively connected to an input end of the stepper motor driver and an input end of the subdivision code conversion circuit, the signal output end of the electric discharge machining switch is connected to an input end of the subdivision code conversion circuit, and the stepper motor driver is a hybrid subdivision stepper motor driver.

[0008] Optimized, the control system also includes a manual operation switch, a selection circuit connected between the PID adjustment circuit and the absolute value circuit, a plurality of voltage-frequency conversion circuits whose input ends are respectively connected to the output ends of the absolute value circuit outputting positive voltage amplitude signals, an electronic switch circuit whose input end is connected to the output end of the voltage-frequency conversion circuit, and a manual spindle recovery switch whose output end is connected to the input end of the electronic switch. The output end of the electronic switch circuit is connected to the input end of the stepper motor driver in sequence through the processing conditions and the subdivision code conversion circuit. The output end of the manual operation switch is respectively connected to the input end of the electronic switch circuit and the selection circuit. When the manual operation switch is not actuated, the selection circuit connects the PID adjustment circuit and the absolute value circuit. When the manual operation switch is actuated, the selection circuit connects the manual switch and the absolute value circuit.

[0009] Optimally, a shaping circuit for shaping the pulse signal output by the voltage-frequency conversion circuit is also connected between the electronic switch circuit and the stepper motor driver.

[0010] The present invention also provides a spindle head advance and retreat control method based on the above servo control system, which comprises the following steps:

[0011] a. The sampling circuit collects the discharge gap voltage signal between the electrode on the spindle head and the workpiece and outputs it to the PID adjustment circuit;

[0012] The bP ID regulating circuit compares the discharge gap voltage Up with the given voltage Ug of the voltage setting circuit and obtains the difference ΔU, Up-Ug=ΔU,

[0013] When ΔU>0, the phase detection circuit outputs a high level to the driver, requiring the stepper motor to rotate forward and the electrode to move downward to continue the discharge machining.

[0014] When ΔU<0, and |ΔU|≤n%Ug, the phase detection circuit outputs a low level to the driver, requiring the motor to reverse, the spindle to retreat, and the electrode to move upward. The phase detection circuit outputs an open signal to the subdivision code conversion circuit; the output of the voltage comparison circuit remains unchanged, and the subdivision code conversion circuit still maintains the normal code output. The driving subdivision number of the stepper motor, the number of pulses per motor revolution, and the spindle step equivalent remain unchanged, and the spindle head retreats at a low speed;

[0015] When ΔU<0, and |ΔU|>n%Ug, the phase detection circuit outputs a low level to the driver, requiring the motor to reverse, the spindle to retreat, and the electrode to move upward. The phase detection circuit outputs an open signal to the subdivision code conversion circuit; at the same time, the absolute value circuit outputs a higher voltage amplitude signal to the voltage comparison circuit, the output level of the voltage comparison circuit changes from high to low, the subdivision code conversion circuit outputs a code change, the driving subdivision number of the stepper motor decreases, the number of pulses per motor revolution decreases, the spindle step equivalent increases, and the spindle head accelerates back.

[0016] Where 0<n<100.

[0017] The present invention also provides a spindle head advance and retreat control method based on a servo control system, which comprises the following steps:

[0018] First, one of the voltage-frequency conversion circuits is set as the default connected voltage-frequency conversion circuit. When the default connected voltage-frequency conversion circuit is working, the spindle runs at a lower step pulse frequency, and the other voltage-frequency conversion circuits are voltage-frequency conversion circuits with higher pulse frequencies;

[0019] Then, when the spindle is performing normal discharge machining, it runs at a lower step pulse frequency. When the switch for manually operating the spindle to retract or feed is started, the manual switch outputs a signal to the electronic switch circuit. The electronic switch circuit selects to connect to the voltage-frequency conversion circuit corresponding to the manual operation of the spindle to retract or feed. When the absolute value circuit outputs the same voltage amplitude, the step pulse frequency is increased to the corresponding value, and the stepper motor retracts or feeds at a higher speed.

[0020] The beneficial effects of the present invention are as follows: the present invention adopts a dual-frequency driving mode and a method of adjusting the subdivision number of the stepper motor, so that the spindle can achieve rapid feeding or retraction in the manual operation mode, and can automatically change the stepper motor driving subdivision number in the servo control mode to achieve small-step equivalent feeding and large-step equivalent retraction, thereby meeting the different requirements for spindle operation under different working conditions of the electric spark small hole machining machine. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] AttachedFigure 1 It is a principle block diagram of the present invention;

[0022] Attached Figure 2 The subdivision number adjustment circuit diagram of the present invention;

[0023] Attached Figure 3 It is a dual-frequency driving circuit diagram of the present invention. DETAILED DESCRIPTION

[0024] The present invention is described in detail below in conjunction with the embodiments shown in the accompanying drawings:

[0025] like Figure 1 As shown, a stepper motor driven spindle servo control system for an electric spark small hole machining machine tool comprises an electric discharge machining switch, a sampling circuit for collecting a discharge gap voltage signal, a PID regulating circuit whose input end is connected to an output end of the sampling circuit outputting a voltage signal, a voltage setting circuit whose output end is connected to a voltage signal input end of the PID regulating circuit, an absolute value circuit connected to the output end of the PID regulating circuit, a phase detection circuit whose input end is connected to the output end of the PID regulating circuit, a voltage comparison circuit whose input end is connected to an output end of a positive voltage amplitude signal output by the absolute value circuit, a subdivision code conversion circuit whose input end is connected to an output end of the voltage comparison circuit, and a stepper motor driver whose input end is connected to an output end of the subdivision code conversion circuit, wherein the output end of the phase detection circuit is respectively connected to an input end of the stepper motor driver and an input end of the subdivision code conversion circuit, the signal output end of the electric discharge machining switch is connected to an input end of the subdivision code conversion circuit, and the stepper motor driver is a hybrid subdivision stepper motor driver. The control system also includes a manual operation switch, a selection circuit connected between the PID adjustment circuit and the absolute value circuit, a plurality of voltage-frequency conversion circuits whose input ends are respectively connected to the output ends of the absolute value circuit outputting positive voltage amplitude signals, an electronic switch circuit whose input end is connected to the output end of the voltage-frequency conversion circuit, and a manual spindle recovery switch whose output end is connected to the input end of the electronic switch. The output end of the electronic switch circuit is connected to the input end of the stepper motor driver through the processing conditions and the subdivision code conversion circuit in sequence. The output end of the manual operation switch is respectively connected to the input end of the electronic switch circuit and the selection circuit. When the manual operation switch is not actuated, the selection circuit turns on the PID adjustment circuit and the absolute value circuit. When the manual operation switch is actuated, the selection circuit turns on the manual switch and the absolute value circuit. A shaping circuit for shaping the pulse signal output by the voltage-frequency conversion circuit is also connected between the electronic switch circuit and the stepper motor driver.

[0026] The spindle head advance and retreat control method based on the servo control system comprises the following steps:

[0027] a. The sampling circuit collects the discharge gap voltage signal between the electrode on the spindle head and the workpiece and outputs it to the PID adjustment circuit;

[0028] The bP ID regulating circuit compares the discharge gap voltage Up with the given voltage Ug of the voltage setting circuit and obtains the difference ΔU, Up-Ug=ΔU,

[0029] When ΔU>0, the phase detection circuit outputs a high level to the driver, requiring the stepper motor to rotate forward and the electrode to move downward to continue the discharge machining.

[0030] When ΔU<0, and |ΔU|≤n%Ug, the phase detection circuit outputs a low level to the driver, requiring the motor to reverse, the spindle to retreat, and the electrode to move upward. The phase detection circuit outputs an open signal to the subdivision code conversion circuit; the output of the voltage comparison circuit remains unchanged, and the subdivision code conversion circuit still maintains the normal code output. The driving subdivision number of the stepper motor, the number of pulses per motor revolution, and the spindle step equivalent remain unchanged, and the spindle head retreats at a low speed;

[0031] When ΔU<0, and |ΔU|>n%Ug, the phase detection circuit outputs a low level to the driver, requiring the motor to reverse, the spindle to retreat, and the electrode to move upward. The phase detection circuit outputs an open signal to the subdivision code conversion circuit; at the same time, the absolute value circuit outputs a higher voltage amplitude signal to the voltage comparison circuit, the output level of the voltage comparison circuit changes from high to low, the subdivision code conversion circuit outputs a code change, the driving subdivision number of the stepper motor decreases, the number of pulses per motor revolution decreases, the spindle step equivalent increases, and the spindle head accelerates back.

[0032] Where 0<n<100.

[0033] Another spindle head advance and retreat control method based on a servo control system includes the following steps:

[0034] First, one of the voltage-frequency conversion circuits is set as the default connected voltage-frequency conversion circuit. When the default connected voltage-frequency conversion circuit is working, the spindle runs at a lower step pulse frequency, and the other voltage-frequency conversion circuits are voltage-frequency conversion circuits with higher pulse frequencies;

[0035] Then, when the spindle is performing normal discharge machining, it runs at a lower step pulse frequency. When the switch for manually operating the spindle to retract or feed is started, the manual switch outputs a signal to the electronic switch circuit. The electronic switch circuit selects to connect to the voltage-frequency conversion circuit corresponding to the manual operation of the spindle to retract or feed. When the absolute value circuit outputs the same voltage amplitude, the step pulse frequency is increased to the corresponding value, and the stepper motor retracts or feeds at a higher speed.

[0036] The above circuit and method can respectively realize subdivision conversion and multi-frequency conversion. In this embodiment, dual-frequency conversion is adopted. Specifically:

[0037] (I) Automatic conversion of stepper motor drive subdivision number

[0038] The spindle head of the EDM small hole machine tool adopts a hybrid subdivided stepper motor as the driving motor, and the copper tube electrode is clamped at the lower end of the spindle head. During the processing, the spindle head drives the electrode to perform servo motion according to the state of the discharge gap. When the gap voltage is higher than the given voltage, the motor rotates forward and the spindle head feeds downward; when the gap voltage is lower than the given voltage, the motor reverses and the spindle head retracts; because the processing process is continuous, the spindle head is always dynamic, feeding and retracting at the same step equivalent, and its movement speed is completely based on the frequency of the step pulse.

[0039] In the spindle servo control system of the present invention, the driver controls the stepper motor to rotate forward or reverse according to the level signal (high level is "1", low level is "0") output by the phase detection circuit, and the stepper motor drives the spindle head to retreat or feed. The absolute value circuit outputs a voltage amplitude signal that is always positive, which forms a two-digit code of "01" or "10" after passing through the second voltage comparison circuit and the subdivision code conversion circuit. The stepper motor driver changes the subdivision number of the stepper motor drive accordingly, thereby changing the number of step pulses per revolution of the motor, that is, changing the step equivalent of the stepper motor, such as Figure 2 shown.

[0040] In summary, when the machine tool is in the processing state (high-frequency pulse power is turned on), there are the following control modes:

[0041] 1. The discharge gap sampling voltage Up is higher than the given voltage Ug, and the phase detection circuit outputs a high level to the driver, requiring the stepper motor to rotate forward, the electrode to move downward, and continue the discharge machining. At this time, the phase detection circuit outputs a "prohibition signal" to the subdivision code conversion circuit, and the subdivision code conversion circuit maintains the normal code output "01". The driving subdivision number of the stepper motor is 2, the number of pulses per motor revolution is 400, the spindle step equivalent is 0.005mm / pulse, and the spindle head feeds at a lower speed;

[0042] 2. The discharge gap sampling voltage Up is lower than the given voltage Ug, and the phase detection circuit outputs a low level to the driver, requiring the motor to reverse, the spindle to retract, and the electrode to move upward; the phase detection circuit outputs an "open signal" to the subdivision code conversion circuit. However, since the difference ΔU between the discharge gap voltage Up and the given voltage Ug is less than 20% of the given voltage (|ΔU|≤20%Ug), the output of the first voltage comparison circuit remains unchanged, and the subdivision code conversion circuit still maintains the normal code output "01", the stepper motor drive subdivision number is still 2, the number of pulses per motor revolution is 400, the spindle step equivalent is 0.005mm / pulse, and the spindle head retracts at a lower speed;

[0043] 3. The discharge gap sampling voltage Up is lower than the given voltage Ug, and the phase detection circuit outputs a low level to the driver, requiring the motor to reverse, the spindle to retract, and the electrode to move upward; the phase detection circuit outputs an "open signal" to the subdivision code conversion circuit. At this time, the difference ΔU between the discharge gap voltage Up and the given voltage Ug is greater than 20% of the given voltage (|ΔU|>20%Ug), and the discharge machining switch is turned on. At this time, the machining conditions for rapid retraction are met, and the absolute value circuit outputs a higher voltage amplitude signal to the first voltage comparison circuit. The output level of the first voltage comparison circuit changes from high to low, and the subdivision code conversion circuit output code changes to "10". The drive subdivision number of the stepper motor changes from 2 to 1, the number of pulses per motor revolution is 200, the spindle step equivalent is 0.01mm / pulse, and the spindle head retreats at a faster speed; the voltage sampling digital comparison circuit and the subdivision conversion circuit can also be designed to obtain a multi-bit code, and the stepper motor driver can obtain more subdivision numbers for converting the stepper motor drive, thereby changing the number of stepping pulses per revolution of the motor and obtaining more step equivalents of the stepper motor.

[0044] (II) Dual-frequency driving method with automatic switching of step pulse frequency

[0045] 1. Slow running

[0046] In order to ensure stable processing within the range of electrode diameter φ0.2-3mm, the step equivalent of the spindle servo operation should be as small as possible. In the present invention, during normal discharge machining, the subdivision number of the stepper motor drive is selected as 2, and the step equivalent of the spindle operation is 0.005mm / pulse. Considering the effective torque-frequency characteristics of the stepper motor, the maximum step pulse frequency output by the voltage-frequency conversion circuit is designed to be 1000hz. At this time, the maximum operating speed of the spindle is:

[0047] S = 60 × f·ρ = 60 seconds × 1000 pulses / second × 0.005 mm / pulse = 300 mm / min

[0048] Where: f is the step pulse frequency

[0049] ρ is the step equivalent

[0050] 2. Fast operation

[0051] In order to shorten the manual up / down movement and automatic rapid retraction time of the spindle as much as possible, the maximum step pulse frequency output by the voltage-frequency conversion circuit of the present invention during manual operation and automatic rapid retraction of the spindle is 2000 Hz. At this time, the maximum idle running speed of the spindle can reach:

[0052] S = 60 × f·ρ = 60 seconds × 2000 pulses / second × 0.005 mm / pulse = 600 mm / min

[0053] Where: f is the step pulse frequency

[0054] ρ is the step equivalent

[0055] 3. Automatic switching of step pulse frequency

[0056] The present invention designs the high and low frequency conversion of the voltage-frequency conversion circuit into two independent units, namely, voltage-frequency conversion A and voltage-frequency conversion B. After the machine tool is powered on, the servo control circuit defaults to the voltage-frequency conversion A being connected, and the spindle runs at a lower step pulse frequency. Only when the "spindle up" and "spindle down" switches are manually operated and the hole is processed to a predetermined depth, the electronic switch circuit is activated, the circuit automatically disconnects the voltage-frequency conversion A, and the voltage-frequency conversion B is connected, so that when the absolute value circuit outputs the same voltage amplitude, the step pulse frequency is increased to the corresponding value, and the stepper motor runs up or down at a higher speed, such as Figure 3 shown.

[0057] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made according to the spirit of the present invention should be included in the protection scope of the present invention.

Claims

1. A stepper motor driven spindle servo control system for an EDM small hole machining machine, characterized in that: It includes an electric discharge machining switch, a sampling circuit for collecting a discharge gap voltage signal, a PID regulating circuit whose input end is connected to an output end of the sampling circuit outputting a voltage signal, a voltage setting circuit whose output end is connected to a voltage signal input end of the PID regulating circuit, an absolute value circuit connected to the output end of the PID regulating circuit, a phase detection circuit connected to the output end of the PID regulating circuit, a voltage comparison circuit whose input end is connected to an output end of a positive voltage amplitude signal output by the absolute value circuit, a subdivision code conversion circuit whose input end is connected to an output end of the voltage comparison circuit, and a stepping motor driver whose input end is connected to an output end of the subdivision code conversion circuit, wherein the output end of the phase detection circuit is connected to the output end of the stepping motor driver. The input end of the discharge machining switch is connected to the input end of the subdivision code conversion circuit, the signal output end of the discharge machining switch is connected to the input end of the subdivision code conversion circuit, and the stepper motor driver is a hybrid subdivision stepper motor driver; the control system also includes a manual operation switch, a selection circuit connected between the PID adjustment circuit and the absolute value circuit, a plurality of voltage-frequency conversion circuits whose input ends are respectively connected to the output ends of the absolute value circuit outputting positive voltage amplitude signals, an electronic switch circuit whose input end is connected to the output end of the voltage-frequency conversion circuit, and a manual spindle recovery switch whose output end is connected to the input end of the electronic switch, and the output end of the electronic switch circuit is connected to the input end of the stepper motor driver through the machining conditions and the subdivision code conversion circuit in sequence.

2. The stepper motor driven spindle servo control system for an EDM small hole machining machine according to claim 1, characterized in that: The output end of the manual operation switch is respectively connected to the input end of the electronic switch circuit and the selection circuit. When the manual operation switch is not operated, the selection circuit connects the PID adjustment circuit and the absolute value circuit. When the manual operation switch is operated, the selection circuit connects the manual switch and the absolute value circuit.

3. The stepper motor driven spindle servo control system for an EDM small hole machining machine according to claim 2, characterized in that: A shaping circuit for shaping the pulse signal output by the voltage-frequency conversion circuit is also connected between the electronic switch circuit and the stepper motor driver.

4. A spindle head advance and retreat control method based on the servo control system according to any one of claims 1 to 3, characterized in that: It includes the following steps: a. The sampling circuit collects the voltage signal Up between the electrode and the workpiece and outputs it to the PID adjustment circuit; b. The PID control circuit compares the voltage Up with the given voltage Ug of the voltage setting circuit and obtains the difference ΔU, Up-Ug = ΔU, When ΔU≥0, the phase detection circuit outputs a high level to the stepper motor driver, requiring the stepper motor to rotate forward and the electrode to move downward to continue the discharge machining. When ΔU<0, and |ΔU|≤n%Ug, the phase detection circuit outputs a low level to the stepper motor driver, requiring the motor to reverse, the spindle to retreat, and the electrode to move upward; the phase detection circuit simultaneously outputs an open signal to the subdivision code conversion circuit; the voltage signal output by the absolute value circuit is not enough to change the output voltage amplitude of the voltage comparison circuit, the output of the voltage comparison circuit is low level, the subdivision code conversion circuit maintains the normal encoding output, the stepper motor drive subdivision number, the number of pulses per motor revolution and the spindle step equivalent remain unchanged, and the spindle head retreat speed remains unchanged; When ΔU<0, and |ΔU|>n%Ug, the phase detection circuit outputs a low level to the stepper motor driver, requiring the motor to reverse, the spindle to retreat, and the electrode to move upward; the phase detection circuit simultaneously outputs an open signal to the subdivision code conversion circuit; the voltage signal output by the absolute value circuit makes the voltage comparison circuit output a high level, and the code output by the subdivision code conversion circuit changes, the driving subdivision number of the stepper motor decreases, the number of pulses per motor revolution decreases, the spindle step equivalent increases, and the spindle head retreat speed increases. Where 0<n<100.

5. A spindle head advance and retreat control method based on the servo control system of claim 4, characterized in that: It includes the following steps: First, one of the voltage-frequency conversion circuits is set as the default connected voltage-frequency conversion circuit. When the default connected voltage-frequency conversion circuit is working, the spindle runs at a lower step pulse frequency, and the other voltage-frequency conversion circuits are voltage-frequency conversion circuits with higher pulse frequencies; When the machine tool is in normal discharge machining, the spindle head runs at a lower step pulse frequency. When the switch for manually operating the spindle to retract or feed is started, the manual switch outputs a signal to the electronic switch circuit. The electronic switch circuit selects to connect to the voltage-frequency conversion circuit corresponding to the manual operation of the spindle to retract or feed. When the absolute value circuit outputs the same voltage amplitude, the step pulse frequency is increased to the corresponding value, and the stepper motor retracts or feeds at a higher speed.