Control device

The control device addresses vibrations and accuracy issues in industrial machinery by timing gain switches with feed mode changes at maximum speed thresholds, ensuring stable transitions and improved machining quality.

WO2026013802A9PCT designated stage Publication Date: 2026-11-12FANUC LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2024/024977
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2026-11-12

AI Technical Summary

Technical Problem

Switching feed modes in industrial machinery control systems, such as between cutting feed and rapid traverse, often leads to vibrations and degraded machining accuracy due to simultaneous gain changes, which can amplify speed steps and cause excessive current steps.

Method used

The control device switches gains for cutting feed and rapid traverse modes at specific speed thresholds, namely just before and after reaching the maximum cutting feed speed, respectively, to prevent excessive current steps and vibrations.

Benefits of technology

This approach maintains machining accuracy by minimizing vibrations and ensuring smooth transitions between feed modes, thereby improving the quality of machined surfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024024977_12112026_PF_FP_ABST
    Figure JP2024024977_12112026_PF_FP_ABST
Patent Text Reader

Abstract

A control device according to the present disclosure comprises a servo control unit that controls a motor on the basis of interpolation data for commanding a movement amount for each control cycle for controlling the motor. When switching from a cutting feed mode to a fast feed mode, the servo control unit switches a gain for cutting feed to a gain for fast feed immediately before the speed of the motor reaches the maximum speed of the cutting feed, and when switching from the fast feed mode to the cutting feed mode, switches from the gain for fast feed to the gain for cutting feed immediately after the speed of the motor falls below the maximum speed of the cutting feed.
Need to check novelty before this filing date? Find Prior Art

Description

control device

[0001] This disclosure relates to a control device.

[0002] When controlling multiple motors installed in industrial machinery such as machine tools, the command speed for cutting feed is generally set lower than the command speed for rapid traverse. Therefore, the gain during cutting feed is set higher than the gain during rapid traverse to improve the tracking performance during each feed operation.

[0003] In the current control system, when the feed mode switches between cutting feed and rapid traverse, the system decelerates and stops briefly in between (for example, Patent Document 1). Therefore, even if the gain is switched simultaneously with the feed mode switch, the current step is small. For example, to improve tracking performance when switching the feed mode from rapid traverse to cutting feed, increasing the proportional gain is more effective, but this tends to lead to vibration. On the other hand, increasing the integral gain can suppress vibration, but the tracking performance is inferior compared to when the proportional gain is increased.

[0004] Japanese Patent Publication No. 2008-130013

[0005] Switching the feed mode and simultaneously switching the gain can cause vibrations in the cutting section, potentially degrading machining accuracy. For example, when switching from constant-speed cutting feed to rapid traverse, or vice versa, the change in proportional gain can directly amplify speed steps, sometimes leading to excessive current steps. In production environments, there is a need for a mechanism that allows the gain to be switched when switching feed modes to prevent excessive current steps.

[0006] The control device according to this disclosure solves the above problem by switching the gain when the speed reaches the maximum speed of the cutting movement command after the feed mode has been switched.

[0007] One aspect of the present disclosure is a control device comprising a servo control unit that controls a motor based on interpolation data that commands the amount of movement for each control cycle of the motor, wherein when switching from a cutting feed mode to a rapid traverse mode, the servo control unit switches the gain for cutting feed to a gain for rapid traverse just before the motor speed reaches the maximum cutting feed speed, and when switching from a rapid traverse mode to a cutting feed mode, it switches from the gain for rapid traverse to a gain for cutting feed just after the motor speed falls below the maximum cutting feed speed.

[0008] This is a schematic hardware configuration diagram of the control device according to the first embodiment. This is a block diagram illustrating the schematic functions of the control device according to the first embodiment. This is a block diagram illustrating a schematic configuration example of the servo control unit according to the first embodiment. This is a block diagram illustrating a schematic configuration example of the speed control unit according to the first embodiment. This is a graph illustrating the speed change when switching from cutting feed to rapid traverse. This is a graph illustrating the speed change when switching from rapid traverse to cutting feed. This is a block diagram illustrating a schematic configuration example of the speed control unit according to the second embodiment. This is a graph illustrating the integral gain change when switching from cutting feed to rapid traverse. This is a graph illustrating the integral gain change when switching from rapid traverse to cutting feed.

[0009] Embodiments of this disclosure will be described below with reference to the drawings. In the following description, components having the same or similar functions will be denoted by the same reference numerals. Duplication of these components may be omitted.

[0010] In this application, "based on XX" means "based on at least XX," and includes cases where it is based on another element in addition to XX. Furthermore, "based on XX" is not limited to cases where XX is used directly, but also includes cases where it is based on something that has been calculated or processed. "XX" is any element (for example, any information).

[0011] [First Embodiment] Figure 1 is a schematic hardware configuration diagram showing the main parts of a control device according to one embodiment of the present disclosure. The control device 1 of the present disclosure can be implemented as a motor control device that controls a motor that drives industrial machinery such as machine tools and robots. Furthermore, the control device 1 of the present disclosure can be implemented as a numerical control device that controls an industrial machine equipped with a moving object that moves when driven by a motor, based on a numerical control program or the like. Below, an example of implementation as a numerical control device that controls based on a numerical control program or the like will be described.

[0012] The CPU 11 in the control device 1 of this disclosure is a processor that controls the control device 1 as a whole. The CPU 11 reads a system program stored in the ROM 12 via the bus 22 and controls the entire control device 1 according to the system program. The RAM 13 temporarily stores temporary calculation data, display data, and various data input from external sources.

[0013] The non-volatile memory 14 is composed of, for example, a memory backed up by a battery (not shown) or an SSD (Solid State Drive), and its stored state is maintained even when the power to the control device 1 is turned off. The non-volatile memory 14 stores operating programs and data read from external devices 72 via the interface 15, data and operating programs input via the input device 71, and various data acquired from industrial machines 3. The operating programs and data stored in the non-volatile memory 14 may be expanded into the RAM 13 when executed or used. In addition, various system programs, such as known analysis programs, are pre-written in the ROM 12.

[0014] Interface 15 is an interface for connecting the CPU 11 of the control device 1 to external devices 72 such as USB memory, CompactFlash®, and SD cards. External devices 72 can read, for example, operation programs and various data used to control the industrial machine 3. Operation programs and various data edited within the control device 1 can also be stored in the external devices 72. The PLC (Programmable Logic Controller) 16 controls the industrial machine 3 and its peripheral devices (for example, tool changers, actuators such as robots, sensors attached to the industrial machine 3, etc.) by outputting signals via the I / O unit 17 according to the sequence program built into the control device 1. The PLC 16 also receives signals from various switches on the control panel and peripheral devices located on the main body of the industrial machine 3, performs the necessary signal processing, and then passes the signals to the CPU 11.

[0015] The display device 70 outputs and displays data read into memory, data obtained as a result of the execution of operation programs and system programs, etc., via the interface 18. In addition, the input device 71, which consists of a keyboard and a pointing device, transmits commands and data based on the operator's operations to the CPU 11 via the interface 19.

[0016] Interface 20 is an interface for connecting the CPU 11 of the control device 1 to a wired or wireless network 5. Network 5 may communicate using technologies such as serial communication (RS-485, for example), Ethernet® communication, optical communication, wireless LAN, Wi-Fi®, Bluetooth®, etc. Other control devices 4, fog computer 6, cloud server 7, etc. are connected to network 5 and exchange data with the control device 1.

[0017] The axis control circuit 30 for controlling the drive shafts of the industrial machine 3 receives a position command for the drive shaft from the CPU 11 and outputs a command for the drive shaft to the servo amplifier 40. The servo amplifier 40 receives this command and drives the servo motor 50 related to the drive shaft, moving each part of the industrial machine 3 along its respective axis. Each servo motor 50 has a built-in position sensor and feeds back the position feedback signal from this position sensor to the axis control circuit 30. The axis control circuit 30 performs feedback control of the servo motor 50 based on this position feedback signal. In the hardware configuration diagram of Figure 1, only one axis control circuit 30, servo amplifier 40, and servo motor 50 are shown, but in reality, as many as the number of drive shafts equipped in the industrial machine 3 to be controlled are provided. For example, when controlling a typical machine tool equipped with three linear axes and two rotary axes, five sets of axis control circuits 30, servo amplifiers 40, and servo motors 50 are provided to move the spindle to which the tool is attached and the workpiece relative to each other in the directions of the three linear axes and two rotary axes (X axis, Y axis, Z axis, A axis, C axis).

[0018] The spindle control circuit 60 receives a spindle rotation command and outputs a spindle speed signal to the spindle amplifier 61. The spindle amplifier 61 receives this spindle speed signal and rotates the spindle motor 62 of the industrial machine 3 at the commanded rotational speed, thereby driving the spindle. A position coder 63 is coupled to the spindle motor 62. The position coder 63 outputs a feedback pulse synchronized with the rotation of the spindle, and this feedback pulse is read by the CPU 11.

[0019] The control device 1 may be configured separately from the industrial machine 3. In this case, the control device 1 and the industrial machine 3 may be connected by signal lines or other means, or they may be connected via a network. Alternatively, the control device 1 may be integrated into the industrial machine 3 and connected to the industrial machine 3.

[0020] FIG. 2 is a schematic block diagram illustrating functions provided by a control device 1 according to a first embodiment of the present disclosure. Each function provided by the control device 1 according to the present embodiment is implemented by a CPU 11 included in the control device 1 shown in FIG. 1 executing a system program to control the operation of each unit of the control device 1.

[0021] [Correction under Rule 91 01.09.2026] The control device 1 of the present embodiment includes a program analysis unit 100, an interpolation unit 120, and a control unit 140, and the control unit 140 includes a servo control unit 150. Further, a control program 200 such as a numerical control program including commands for controlling the industrial machine 3 is stored in advance in a RAM 13 to a non-volatile memory 14 included in the control device 1.

[0022] [Correction under Rule 91 01.09.2026] The program analysis unit 100 sequentially reads blocks included in the control program 200, and analyzes commands related to the operation of the industrial machine 3 by the blocks. Then, based on the analysis result, command data for commanding the operation of the industrial machine 3 is created. The analysis by the program analysis unit 100 is based on parameters set in the control device 1 and settings of the industrial machine 3. The command data created by the program analysis unit 100 is, for example, when the block read from the control program 200 is a command for moving a movement target of the industrial machine 3, data for commanding the rotational operation of the servo motor 50 related to at least one axis related to the movement. Further, for example, if the block read from the control program 200 commands the operation of the spindle motor 62, the data commands the rotational operation of the spindle motor 62. The program analysis unit 100 outputs data commanding the rotational operation of each servo motor 50 to the interpolation unit 120. In addition, command data for controlling other operations of the industrial machine 3 is output to the control unit 140.

[0023] The interpolation unit 120 creates interpolation data indicating the movement amount for each predetermined interpolation period (control period) for each servo motor 50 related to the movement commanded by the command data, based on the command data related to the servo motor 50 created by the program analysis unit 100. In the interpolation data created by the interpolation unit 120, for example, the movement amount for each interpolation period is represented by a pulse amount. The interpolation unit 120 outputs the created interpolation data to the servo control unit 150.

[0024] The control unit 140 controls each part of the industrial machine 3 based on the command data created by the program analysis unit 100 and the interpolation data created by the interpolation unit 120. The control unit 140, for example, based on the command data created by the program analysis unit 100, creates control commands for the spindle motor 62 provided in the industrial machine 3, signals for controlling peripheral devices, and the like, and outputs them to the industrial machine 3. In addition, the control unit 140 acquires the state of each part of the industrial machine 3 as a feedback value and uses it for each control process. The control unit 140 includes a servo control unit 150 that controls the servo motor 50 provided in the industrial machine 3.

[0025] [Correction under Rule 91 01.09.2026] The servo control unit 150 controls the movement amount of the servo motor 50 for each interpolation period based on the interpolation data created by the interpolation unit 120. Figure 3 is a block diagram showing a schematic exemplary configuration of the servo control unit 150. The servo control unit 150 illustrated in Figure 3 is configured as a controller that performs PI control. Interpolation data, which is the movement amount for each control period, is input to the servo control unit 150 from the interpolation unit 120. The servo control unit 150 includes a position control unit 151, a speed control unit 152, and a speed calculation unit 153.

[0026] The position control unit 151 outputs the movement amount for each control period based on the difference between the movement position of the servo motor 50 calculated based on the movement amount obtained from the interpolation unit 120 and the position feedback value obtained from the servo motor 50. The position control unit 151 outputs a speed command value obtained by multiplying the position feedback value by a predetermined position gain K.

[0027] The speed control unit 152 performs proportional-integral control (PI control) that controls the speed of the servo motor 50, based on the speed deviation that is the difference between the speed command value output from the position control unit 151 and the speed feedback value calculated by the speed calculation unit 153 based on the position feedback value for each control cycle from the servo motor 50. Figure 4 is a block diagram showing a schematic exemplary configuration of the speed control unit 152. The speed control unit 152 includes a proportional gain unit 154, an integral gain unit 155, and an integrator 156. The speed control unit 152 applies the proportional gain K in the proportional gain unit to the input speed command p and the value obtained by multiplying the speed command by the integral gain K in the integral gain unit 155 I and integrating the resulting value with the integrator 156 are summed, and the summed value is output as the speed command value.

[0028] Here, the position gain K, the proportional gain K p , the integral gain K I in the rapid traverse mode, the position gain K which is the gain for the rapid traverse mode _r , the proportional gain K p_r , the integral gain K I_r is used. Further, in the cutting feed mode, the position gain K which is the gain for the cutting feed mode _c , the proportional gain K p_c , the integral gain K I_c is used.

[0029] The position control unit 151 and the speed control unit 152 according to the present embodiment, when the feed mode is switched from cutting feed to rapid traverse, after switching to the rapid traverse mode, before the speed of the servo motor 50 reaches the maximum cutting feed speed F cmax , switch the position gain K, proportional gain K p , integral gain K I from the respective gains for cutting feed to the respective gains for rapid traverse.

[0030] Figure 5 is a graph illustrating an example of speed transition when switching from cutting feed to rapid traverse is performed. In the graph illustrated in Figure 5, the solid line indicates the cutting feed speed, and the dotted line indicates the rapid traverse speed. In the example of Figure 5, the cutting feed speed is F c , and the rapid traverse speed is Fr Therefore, let's assume that the feed mode switches from cutting feed to rapid traverse at time t1. Conventionally, at time t1, the respective gains would be switched from the cutting feed gain to the rapid traverse gain. In the servo control unit 150 of this disclosure, when the feed mode switches from cutting feed mode to rapid traverse mode, the feed speed is switched not at the timing of the feed mode switch, but at the maximum cutting feed speed F cmax At time t2, which is the point just before reaching the target, the position gain K and proportional gain K p , integral gain K I Switch the value to the value for fast traverse mode. This gain switching is, for example, when the speed of the servo motor 50 is the maximum cutting feed speed F cmax From a predetermined velocity variation δ F1 It is preferable to perform the test when the speed drops below a certain threshold.

[0031] Furthermore, in this embodiment, when the feed mode is switched from rapid traverse to cutting feed, the position control unit 151 and speed control unit 152, before switching to cutting feed mode, set the speed of the servo motor 50 to the maximum cutting feed speed F. cmax When it falls below this value, the position gain K and proportional gain K p , integral gain K I Switch the gain from the rapid traverse gain to the cutting feed gain.

[0032] [Correction based on Rule 91 01.09.2026] Figure 6 is a graph illustrating the change in speed when switching from rapid traverse to cutting feed. In the graph illustrated in Figure 6, the solid line represents the cutting feed speed, and the dotted line represents the rapid traverse speed. In the example in Figure 6, the feed mode is assumed to switch from rapid traverse to cutting feed at time t3. Conventionally, at time t3, the respective gains were switched from the rapid traverse gain to the cutting feed gain. In the servo control unit 150 according to this disclosure, when the feed mode switches from rapid traverse mode to cutting feed mode, the feed speed is switched to the maximum cutting feed speed F, rather than at the timing of the feed mode switch. cmax At time t4, when the value falls below a certain level, the position gain K and proportional gain Kp , integral gain K I This switches to a value for the cutting feed mode. This gain switching is, for example, when the speed of the servo motor 50 is the maximum cutting feed speed F cmax From a predetermined velocity variation δ F2 It is preferable to perform the test when the speed drops below a certain threshold.

[0033] [Correction based on Rule 91 01.09.2026] In the control device 1 according to this embodiment with the above configuration, the gain is switched after a sufficient amount of time has elapsed since the switch from cutting feed to rapid traverse. Also, the gain is switched considerably before the switch from rapid traverse to cutting feed. Therefore, the effect of the gain switch does not affect the operation of the cutting feed, and it is possible to maintain the quality of the machined surface.

[0034] [Second Embodiment] The control device according to the second embodiment of this disclosure will be described below. The control device 1 according to this embodiment has the same hardware configuration as the control device 1 according to the first embodiment.

[0035] [Correction based on Rule 91 01.09.2026] The control device 1 according to this embodiment, like the control device 1 according to the first embodiment, comprises a program analysis unit 100, an interpolation unit 120, and a control unit 140, and the control unit 140 comprises a servo control unit 150. In addition, the RAM 13 to non-volatile memory 14 of the control device 1 have a control program 200, such as a numerical control program that includes commands for controlling the industrial machine 3, pre-stored therein.

[0036] The program analysis unit 100 and interpolation unit 120 according to this embodiment have the same functions as those of the first embodiment.

[0037] The servo control unit 150 controls the amount of movement of the servo motor 50 for each interpolation period based on the interpolation data created by the interpolation unit 120. The servo control unit 150 includes a position control unit 151, a speed control unit 152, and a speed calculation unit 153, similar to the servo control unit 150 in the first embodiment. The position control unit 151 and speed calculation unit 153 in this embodiment have the same functions as the position control unit 151 and speed calculation unit 153 in the first embodiment.

[0038] The speed control unit 152, like the speed control unit 152 in the first embodiment, performs proportional-integral control (PI control) to control the speed of the servo motor 50 based on the speed deviation, which is the difference between the speed command value output from the position control unit 151 and the speed feedback value calculated by the speed calculation unit 153 based on the position feedback value from the servo motor 50 for each control cycle. The speed control unit 152 in this embodiment differs from the speed control unit 152 in that it switches only the integral gain in steps when switching the feed mode.

[0039] Figure 7 is a block diagram showing a schematic configuration example of the speed control unit 152 according to this embodiment. The speed control unit 152 includes a proportional gain unit 154, an integral gain unit 155, an integrator 156, and a gain switching filter 157. Similar to the speed control unit 152 according to the first embodiment, the proportional gain unit 154 adjusts the proportional gain K in response to the input speed command. p The value obtained by multiplying by and the integral gain K of the integral gain unit 155 with respect to the speed command I The value obtained by multiplying by and integrating with the value obtained by the integrator 156 is integrated and output as the speed command value. At this time, the gain switching filter 157 provided in the speed control unit 152 according to this embodiment switches the value of the integral gain that the integral gain unit 155 multiplies with the speed command in steps.

[0040] Figure 8 is a graph illustrating the transition of the integral gain when switching from cutting feed to rapid traverse. In the graph shown in Figure 8, the solid line represents the integral gain. In the example in Figure 8, the integral gain for the cutting feed mode is K I_c The integral gain for fast-forward mode is K I_r Furthermore, let's assume that the feed mode switches from cutting feed to rapid traverse at time t1. At this time, the gain switching filter 157 according to this embodiment applies an integral gain K from a predetermined time t2 after time t1. I The integral gain K for the cutting feed mode I_c The feed rate is gradually reduced until the maximum cutting feed rate F cmax The integral gain K for fast traverse mode occurs between the time t3, which is a predetermined point in time just before reaching the target. I_rThe goal is to achieve this. The time t3 - t2 (time constant T) for the switching process should be determined in advance through experiments or other means to set an appropriate value.

[0041] Figure 9 is a graph illustrating the transition of the integral gain when switching from rapid traverse to cutting feed. In the graph shown in Figure 9, the solid line represents the integral gain. In the example in Figure 9, the integral gain for the cutting feed mode is K I_c The integral gain for fast-forward mode is K I_r Furthermore, it is assumed that the feed mode switches from rapid traverse to cutting feed at time t4. At this time, the gain switching filter 157 according to this embodiment is set to the maximum cutting feed speed F when the feed speed is reached. cmax After the value falls below a certain point in time t5, the integral gain K I The integral gain K for fast-forward mode I_r The integral gain K for the cutting feed mode is gradually increased from there, at a predetermined time t6 prior to time t4. I_c The goal is to achieve this. The time t6-t5 (time constant T) for the switching process should be determined in advance through experiments or other means to set an appropriate value.

[0042] Note that the cutting feed rate F c and maximum cutting feed rate F cmax When the difference is small, or when the time constant T applied to the gain switching is long, the maximum cutting feed rate F cmax If the gain for rapid traverse mode is not switched at the point in time, vibration may occur during rapid traverse. In such cases, the value of the time constant T applied to the gain switching should be changed to a smaller value, and the speed should be set to the maximum cutting feed rate F. cmax It is desirable to switch to the gain for fast-forward mode before exceeding a certain threshold.

[0043] [Correction based on Rule 91 01.09.2026] In the control device 1 according to this embodiment with the above configuration, the switching of the integral gain is started after a sufficient amount of time has elapsed since the switch from cutting feed to rapid traverse, and the gain value is switched in steps by multiplying it by a predetermined time constant. Alternatively, the switching of the integral gain is started considerably before the switch from rapid traverse to cutting feed, and the gain value is switched in steps by multiplying it by a predetermined time constant. In this way, by changing only the integral gain in steps, it is expected that current steps will be suppressed and vibrations will be reduced.

[0044] While embodiments of this disclosure have been described in detail above, this disclosure is not limited to the individual embodiments described above. These embodiments can be added, replaced, modified, partially deleted, etc., in any way that does not depart from the spirit of the invention or from the idea and intent of this disclosure derived from the claims and their equivalents. For example, the order of operations and processes in the embodiments described above are shown as examples only and are not limited thereto. The same applies when numerical values ​​or mathematical formulas are used in the description of the embodiments described above.

[0045] The following are additional notes regarding embodiments of the present disclosure. (Addendum 1) A control device (1) according to one aspect of the present disclosure includes a servo control unit (150) that controls a motor based on interpolation data that commands the amount of movement for each control cycle for controlling the motor, wherein when switching from cutting feed mode to rapid traverse mode, the servo control unit (150) switches the gain for cutting feed to the gain for rapid traverse just before the motor speed reaches the maximum cutting feed speed, and when switching from rapid traverse mode to cutting feed mode, it switches from the gain for rapid traverse to the gain for cutting feed just after the motor speed falls below the maximum cutting feed speed.

[0046] (Note 2) The servo control unit (150) of a control device (1) in another aspect of the present disclosure switches between the integral gain for cutting feed and the integral gain for fast traverse by a predetermined time constant T in stages from immediately after switching from cutting feed mode to fast traverse mode until the motor speed reaches the maximum cutting feed speed, and when switching from fast traverse mode to cutting feed mode, switches between the integral gain for fast traverse by a predetermined time constant T in stages from when the motor speed falls below the maximum cutting feed speed until the feed mode switches from fast traverse mode to cutting feed mode.

[0047] 1 Control device 3 Industrial machine 4 Control device 5 Network 6 Fog computer 7 Cloud server 11 CPU 12 ROM 13 RAM 14 Non-volatile memory 15, 18, 19, 20 Interface 16 PLC 17 I / O unit 22 Bus 30 Axis control circuit 40 Servo amplifier 50 Servo motor 60 Spindle control circuit 61 Spindle amplifier 62 Spindle motor 63 Position coder 70 Display device 71 Input device 72 External device 100 Program analysis unit 120 Interpolation unit 140 Control unit 150 Servo control unit 151 Position control unit 152 Speed ​​control unit 153 Speed ​​calculation unit 154 Proportional gain unit 155 Integral gain unit 156 Integrator 157 Gain switching filter 200 Control program

Claims

1. A control device comprising a servo control unit that controls a motor based on interpolation data that commands the amount of movement for each control cycle that controls the motor, wherein when switching from cutting feed mode to rapid traverse mode, the servo control unit switches the gain for cutting feed to the gain for rapid traverse just before the motor speed reaches the maximum cutting feed speed, and when switching from rapid traverse mode to cutting feed mode, it switches from the gain for rapid traverse to the gain for cutting feed just after the motor speed falls below the maximum cutting feed speed.

2. The control device according to claim 1, wherein the servo control unit, from immediately after switching from cutting feed mode to rapid traverse mode until the motor speed reaches the maximum cutting feed speed, gradually switches only the integral gain for cutting feed to the integral gain for rapid traverse by a predetermined time constant T, and when switching from rapid traverse mode to cutting feed mode, from when the motor speed falls below the maximum cutting feed speed until the feed mode switches from rapid traverse mode to cutting feed mode, gradually switches only the integral gain for rapid traverse to the integral gain for cutting feed by a predetermined time constant T.