Machine tool control device and machine tool control program
The machine tool control device addresses mechanical resonance and chip breaking by dynamically adjusting oscillation conditions based on position deviation thresholds, enhancing machining stability and chip fragmentation.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- FANUC LTD
- Filing Date
- 2022-09-07
- Publication Date
- 2026-05-19
AI Technical Summary
Existing machine tool control devices face challenges in preventing mechanical resonance during chip breaking, which can lead to poor processing, machine tool stoppage, and cutting tool breakage, while also requiring comprehensive adjustments for varying processing conditions.
A machine tool control device and program that monitors the relative position of the workpiece and cutting tool, determines unstable states based on position deviation thresholds, and adjusts oscillation conditions to prevent mechanical resonance and break chips through air cuts.
The solution effectively breaks chips and suppresses mechanical resonance, ensuring stable machining operations by dynamically adjusting oscillation conditions based on real-time position deviations.
Smart Images

Figure 0007862572000001 
Figure 0007862572000002 
Figure 0007862572000003
Abstract
Description
Technical Field
[0001] The present invention relates to a machine tool control device for controlling a machine tool.
Background Art
[0002] Some machine tool control devices superimpose a swing command for relatively swinging the workpiece and the cutting tool on a movement command for commanding the relative movement of the workpiece and the cutting tool, thereby generating an air cut during the cutting of the workpiece by the cutting tool to break the chips.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] According to such a machine tool control device, the chips can be finely divided by relative swinging, and adverse effects such as the chips getting caught on the cutting tool can be suppressed. However, the present inventors have focused on the fact that the following problems may occur.
[0005] That is, depending on the swinging conditions, there is a risk of inducing mechanical resonance due to, for example, the frequency of relative swinging coinciding with the resonance frequency with respect to the machine tool. As a result, there is a risk of poor processing of the workpiece, stoppage of the machine tool, breakage of the cutting tool, etc. On the other hand, regarding the prior confirmation to prevent mechanical resonance from occurring, since the swinging conditions can change according to the processing conditions, it is necessary to comprehensively perform for each processing condition, which is difficult.
[0006] The present disclosure has been made in view of the above circumstances, and an object thereof is to achieve both chip breakage and suppression of mechanical resonance.
Means for Solving the Problems
[0007] The machine tool control device disclosed herein is In the control of a machine tool equipped with a cutting tool for cutting a workpiece, a machine tool control device is provided that generates an air cut during the cutting of the workpiece to break up chips by superimposing a movement command that commands the relative movement of the workpiece and the cutting tool with a movement command that commands the relative oscillation of the workpiece and the cutting tool, A position information acquisition unit acquires position information relating to the relative position of the workpiece and the cutting tool, A state determination unit determines that an unstable state exists when the position deviation, which increases as the difference between the actual relative position (based on the position information) and the commanded relative position (based on the movement command and the oscillation command) increases, exceeds a threshold, A oscillation switching unit performs a switching process to switch the oscillation conditions of the relative oscillation, provided that the aforementioned unstable state is determined to be the case. It has.
[0008] The machine tool control program disclosed herein is In the control of a machine tool equipped with a cutting tool for cutting a workpiece, a machine tool control device is provided that generates an air cut during the cutting of the workpiece to break up chips by superimposing a movement command that commands the relative movement of the workpiece and the cutting tool with a movement command that commands the relative oscillation of the workpiece and the cutting tool, A machine tool control program that enables a computer to function, The aforementioned computer further, A position information acquisition unit acquires position information relating to the relative position of the workpiece and the cutting tool, A state determination unit determines that an unstable state exists when the position deviation, which increases as the difference between the actual relative position (based on the position information) and the commanded relative position (based on the movement command and the oscillation command) increases, exceeds a threshold, A oscillation switching unit performs a switching process to switch the oscillation conditions of the relative oscillation, provided that the aforementioned unstable state is determined to be the case. To make it function as such. [Effects of the Invention]
[0009] According to this disclosure, it is possible to achieve both chip fragmentation and suppression of mechanical resonance. [Brief explanation of the drawing]
[0010] [Figure 1] This is a configuration diagram showing a machine tool control device and a machine tool according to the first embodiment. [Figure 2] This is a diagram showing the configuration of a machine tool control system. [Figure 3] This graph shows the changes in actual relative position and positional deviation. [Figure 4] This is a configuration diagram showing a machine tool control device according to a second embodiment. [Figure 5] This graph shows the trend of positional deviation. [Figure 6] This is a configuration diagram showing a machine tool control device according to the third embodiment. [Modes for carrying out the invention]
[0011] The embodiments of this disclosure will be described below with reference to the drawings. However, this disclosure is not limited in any way to the embodiments described below, and may be implemented with appropriate modifications without departing from the spirit of this disclosure.
[0012] [First Embodiment] As shown in Figure 1, the machine tool 80 has a workpiece holder 85 for holding a workpiece 86 and a tool holder 87 for holding a cutting tool 88. The workpiece holder 85 is driven, for example, by a first motor 81a as a spindle motor, and the tool holder 87 is driven, for example, by a second motor 81b and a third motor 81c. Hereinafter, the first motor 81a, the second motor 81b, and the third motor 81c will simply be referred to as "motor 81".
[0013] By the relative movement between the work holding part 85 and the tool holding part 87, the work 86 and the cutting tool 88 move relatively. Hereinafter, the relative movement between the cutting tool 88 and the work 86 for cutting the work 86 is simply referred to as "relative movement", and the relative position between the cutting tool 88 and the work 86 is simply referred to as "relative position". Also hereinafter, the relative swing of the cutting tool 88 and the work 86 in a direction intersecting the direction of the relative movement is simply referred to as "relative swing".
[0014] For each motor 81, an encoder 82 for detecting the rotation angle of the motor 81 is provided. Hereinafter, the relative position based on the rotation angle detected by these encoders 82 is referred to as "actual relative position Pa".
[0015] The machine tool control device 50 controls the machine tool 80 shown above. The machine tool control device 50 is mainly composed of, for example, a numerical control device and a servo control device that operates the motor 81 etc. based on a command from the numerical control device. Also, from another viewpoint, the machine tool control device 50 is mainly composed of a computer Cp and a machine tool control program Pg for making it function as the machine tool control device 50. The computer Cp mentioned here includes a numerical control device, a servo control device, etc., and has an arithmetic unit, a display, an operation unit, etc. The arithmetic unit of the computer Cp has, for example, a CPU, a RAM, a ROM, etc.
[0016] The machine tool control device 50 presses the cutting tool 88 against the work 86 by relative movement by controlling the machine tool 80, and further cuts the work 86 with the cutting tool 88 by relatively moving from that state. Furthermore, during the cutting of the work 86, the machine tool control device 50 intermittently generates an air cut in which the cutting tool 88 idles without cutting the work 86 by superimposing relative swing on the relative movement, thereby breaking the chips.
[0017] As shown in Figure 2, the machine tool control device 50 includes a machining command unit 11, a movement command unit 18, a rocking command unit 28, an adder 21, a subtractor 22, a position / speed control unit 35, and a current control unit 36. Note that the subtractor 22 may be read as a "position information acquisition unit".
[0018] The machining command unit 11 is configured to allow the user to input a machining program, which is done, for example, by operating the control unit while checking the display of a numerical control device or the like.
[0019] The movement command unit 18 calculates a "movement command C1" as a command value for relative movement based on the machining command Cx based on the machining program. The oscillation command unit 28 calculates an "oscillation command C2" as a command value for relative oscillation based on the machining conditions X based on the machining program. Specifically, the oscillation command unit 28 calculates a repeatable sinusoidal command as the oscillation command C2.
[0020] The adder 21 receives a movement command C1 from the movement command unit 18 and a oscillation command C2 from the oscillation command unit 28. Then, it calculates a superimposed command C3 by adding, or superimposing, the oscillation command C2 onto the movement command C1. Hereafter, the relative position when moving relatively according to the superimposed command C3 will be referred to as the "command relative position Pc".
[0021] The subtractor 22 obtains the command relative position Pc from the adder 21 and the actual relative position Pa from the encoder 82. Then, it calculates the position deviation ΔP by subtracting the actual relative position Pa from the command relative position Pc.
[0022] The position and speed control unit 35 obtains the position deviation ΔP from the subtractor 22. Then, based on the position deviation ΔP or its integrated value, it generates a torque command for the motor 81. In other words, the position and speed control unit 35 performs feedback control in cooperation with the subtractor 22.
[0023] The current control unit 36 calculates a current value based on the torque command received from the position and speed control unit 35, and operates the motor 81 based on that current value. As a result, the cutting tool 88 cuts the workpiece 86, and air cut is performed to break up the chips.
[0024] Next, with reference to Figure 3, the problems to be solved in this embodiment will be explained. The upper curve in Figure 3 shows an example of the transition of the actual relative position Pa. That is, the upper curve is filled in black because it is closely adjacent in the horizontal direction, but it has a wave-like trajectory that includes relative fluctuations. The dashed line that overlaps with this curve showing the actual relative position Pa shows the command relative position Pc. The amplitude of the command relative position Pc is smaller than the amplitude of the actual relative position Pa for most of the periods t1 and t2, which will be described later. The lower curve shows the transition of the position deviation ΔP. This position deviation ΔP is also filled in black because it is closely adjacent in the horizontal direction, but it has a wave-like trajectory with approximately the same period as the actual relative position Pa. Note that in Figure 3, the position deviation ΔP is shown magnified in the vertical direction. Therefore, the length of "ΔP" in the vertical direction in Figure 3 is longer than the length of the difference in the vertical direction between "Pc" and "Pa".
[0025] Hereinafter, the period during which relative movement and relative oscillation are performed in a predetermined manner will be referred to as "first period t1," and the period during which relative movement and relative oscillation are performed in a different manner will be referred to as "second period t2." In the first period t1, mechanical resonance does not occur to a large extent, so the position deviation ΔP remains relatively small. In contrast, in the second period t2, mechanical resonance occurs to a large extent, resulting in a larger position deviation ΔP than in the first period t1. This may lead to machining defects in the workpiece 86, shutdown of the machine tool 80, and damage to the cutting tool 88.
[0026] To solve the above problems, the machine tool control device 50 further includes a threshold setting unit 24, a state determination unit 25, and a oscillation switching unit 26, as shown in Figure 2.
[0027] The threshold setting unit 24 receives the oscillation command C2 from the oscillation command unit 28, calculates the "command amplitude" as the amplitude of the command relative position Pc, and sets a threshold value ΔPth of the position deviation ΔP that is greater than the command amplitude. Specifically, the threshold setting unit 24 sets the threshold value ΔPth to be larger the larger the command amplitude is. More specifically, the threshold setting unit 24 sets the threshold value ΔPth to be, for example, the command amplitude multiplied by a predetermined value, or by adding or subtracting a predetermined value to that value. However, instead, the threshold value ΔPth may be set to be progressively larger as the command amplitude increases. In other words, the threshold value ΔPth may not only be calculated by multiplying the command amplitude by a fixed value, but the predetermined value to be multiplied may also be changed according to the magnitude of the command amplitude. The threshold setting unit 24 transmits the set threshold value ΔPth to the state determination unit 25.
[0028] The state determination unit 25 obtains the position deviation ΔP from the subtractor 22 and the threshold ΔPth from the threshold setting unit 24. If the position deviation ΔP is less than or equal to the threshold ΔPth, it is determined to be in a stable state, and if the position deviation ΔP exceeds the threshold ΔPth, it is determined to be in an unstable state. In other words, the state determination unit 25 determines that it is in an unstable state if the position deviation ΔP exceeds the threshold ΔPth. The state determination unit 25 transmits the determination result J to the oscillation switching unit 26.
[0029] The oscillation switching unit 26 transmits a switching command Cs to the oscillation command unit 28, provided that the determination result J is in an unstable state. The process of transmitting this switching command Cs corresponds to the "switching process" as a process for switching the oscillation conditions.
[0030] Hereinafter, the oscillation frequency of the command relative position Pc will be referred to as the "command frequency". The oscillation switching unit 26 transmits at least one of the following as a switching command Cs to the oscillation command unit 28: a command to change the command frequency, and a command to reduce the command amplitude. The oscillation command unit 28 switches the oscillation conditions of the relative oscillation based on this switching command Cs.
[0031] If the system does not reach a stable state even after switching, the state determination unit 25 determines that it is still in an unstable state, and the oscillation switching unit 26 issues a switching command Cs again, causing the oscillation conditions to be switched again. Therefore, the oscillation conditions are switched repeatedly until a stable state is reached, that is, until the amplitude of the position deviation ΔP falls below the threshold ΔPth. In the end, a stable state is achieved.
[0032] The configuration and effects of this embodiment are summarized below.
[0033] The adder 21 creates a superposition command C3 by superimposing the oscillation command C2 onto the movement command C1. Based on this superposition command C3, the position / speed control unit 35 and the current control unit 36 control the motor 81 to perform cutting of the workpiece 86 and generate air cut. This allows the workpiece 86 to be cut and the resulting chips to be broken up, suppressing problems such as chips getting entangled in the cutting tool 88.
[0034] The subtractor 22 obtains the command relative position Pc from the adder 21 and the actual relative position Pa from the encoder 82 to calculate the position deviation ΔP. The state determination unit 25 determines that the system is in an unstable state if the position deviation ΔP exceeds the threshold ΔPth. The oscillation switching unit 26 switches the oscillation conditions of the relative oscillation based on the determination that the system is in an unstable state. This makes it possible to avoid the unstable state and suppress mechanical resonance.
[0035] As described above, this embodiment makes it possible to achieve both chip fragmentation and suppression of mechanical resonance. More specifically, the following effects can be obtained.
[0036] If the oscillation switching unit 26 determines that an unstable state is present, it performs at least one of the following switching processes: changing the command frequency and reducing the command amplitude. When the command frequency is changed, the frequency of the relative oscillation is shifted away from the resonant frequency with respect to the machine tool 80, thereby avoiding mechanical resonance. When the command amplitude is reduced, the amplitude of the relative oscillation is suppressed, thereby reducing mechanical resonance. As a result, mechanical resonance can be suppressed.
[0037] The threshold setting unit 24 calculates a threshold ΔPth based on the magnitude of the command amplitude. Specifically, the threshold setting unit 24 can set an appropriate threshold ΔPth by setting the threshold ΔPth to a value that is larger than the command amplitude calculated by the oscillation command unit 28 each time.
[0038] [Second Embodiment] Next, the second embodiment will be described with reference to Figures 4 and 5. This embodiment will be described based on the first embodiment, focusing on the differences, and explanations of points that are the same as or similar to the first embodiment will be omitted as appropriate.
[0039] As shown in Figure 4, the machine tool control device 50 of this embodiment further includes a deviation storage unit 23. The deviation storage unit 23 acquires and stores the position deviation ΔP from the subtractor 22. The threshold setting unit 24 calculates a threshold ΔPth based on the position deviation history ΔPd stored in the deviation storage unit 23. Specifically, it is as follows.
[0040] As shown in Figure 5 below, the oscillation period of the position deviation ΔP is called the "deviation oscillation period ωΔ", and the oscillation period of the command relative position Pc is called the "command oscillation period ωc". As mentioned above, the adder 21 superimposes a repeatable sinusoidal command as the oscillation command C2 on the movement command C1. Therefore, the position deviation ΔP includes disturbances, such as cutting disturbances, while also containing many of the same frequency components as the aforementioned sinusoidal command. In other words, the command oscillation period ωc and the deviation oscillation period ωΔ are substantially equal. Hereafter, the command oscillation period ωc and the deviation oscillation period ωΔ will be collectively referred to as the "oscillation period ω". Furthermore, below, the interval divided based on the oscillation period ω will be called the "divided interval Sc", and the maximum value of the position deviation ΔP within the divided interval Sc will be called the "maximum deviation within the interval ΔPmax". However, instead of the maximum value of the position deviation ΔP, the maximum value of the absolute value of the position deviation ΔP may be used as the "maximum deviation within the interval ΔPmax".
[0041] The threshold setting unit 24 calculates the maximum deviation ΔPmax within each divided section Sc. Specifically, in this embodiment, the length of each divided section Sc is an integer multiple of half the length of the oscillation period ω. Therefore, the maximum value of the position deviation ΔP in each divided section Sc becomes the maximum deviation ΔPmax within that divided section Sc. The state in which the maximum deviation ΔPmax within that section is at its minimum value ΔPmax_min can be considered the steady state of the position deviation ΔP, that is, a stable state.
[0042] The threshold setting unit 24 sets the threshold ΔPth to a value obtained by multiplying the minimum value ΔPmax_min of the maximum deviation within the interval by a predetermined multiplier greater than 1. However, instead, the threshold ΔPth may be set to a value obtained by multiplying the average value of the maximum deviation ΔPmax within a predetermined number of divided intervals Sc by a predetermined multiplier greater than 1.
[0043] The threshold setting unit 24 transmits the set threshold ΔPth to the state determination unit 25, as shown in Figure 4. The process thereafter is the same as in the first embodiment. Therefore, the state determination unit 25 performs a state determination based on the received threshold ΔPth.
[0044] The configuration and effects of this embodiment are summarized below.
[0045] The deviation memory unit 23 stores the position deviation ΔP. The threshold setting unit 24 calculates the threshold ΔPth based on the history ΔPd of the position deviation ΔP stored in the deviation memory unit 23. This allows the threshold ΔPth to be set based on past position deviations ΔP, rather than simply based on the command amplitude. This is expected to lead to a more appropriate setting of the threshold ΔPth.
[0046] The threshold setting unit 24 calculates the maximum deviation ΔPmax within each divided interval Sc. It sequentially calculates this maximum deviation ΔPmax, compares it with the stored maximum deviation ΔPmax, and constantly updates the smaller of these values as the minimum value ΔPmax_min. This minimum value ΔPmax_min can be considered the steady state, or stable state, of the position deviation ΔP. Since the threshold ΔPth is determined based on this minimum value ΔPmax_min, it is expected that an even more appropriate threshold ΔPth can be set.
[0047] The adder 21 superimposes a repeatable sinusoidal command as an oscillation command C2 onto the movement command C1. As a result, the position deviation ΔP also contains many of the same frequency components as this sinusoidal wave. Focusing on this characteristic, the period of the division section Sc is set to an integer multiple of half the period of the command oscillation period ωc. By setting the threshold ΔPth with the maximum deviation in this division section Sc as the maximum deviation within the section ΔPmax, an even more appropriate threshold ΔPth can be set.
[0048] The threshold setting unit 24 sets the threshold ΔPth to a value obtained by multiplying the minimum value ΔPmax_min of the maximum deviation within the interval, or the average value of the maximum deviation ΔPmax within multiple divided intervals Sc, by a predetermined multiplier greater than 1. This allows for a margin to be provided between the minimum value ΔPmax_min and the threshold ΔPth, or between the average value and the threshold ΔPth. Therefore, it is possible to suppress the problem of the position deviation ΔP exceeding the threshold ΔPth each time due to disturbances, etc., and being judged as being in an unstable state.
[0049] [Third Embodiment] Next, the third embodiment will be described with reference to Figure 6. This embodiment will be described based on the second embodiment, focusing on the differences, and explanations of points that are the same as or similar to the second embodiment will be omitted as appropriate.
[0050] The machine tool control device 50 further includes a learning unit 33 and a second adder 21b. The learning unit 33 calculates a correction amount α based on the position deviation ΔP, and reduces the position deviation ΔP by adding the calculated correction amount α to the position deviation ΔP using the second adder 21b. The learning unit 33 has a memory and stores the relationship between the oscillation phase and the position deviation ΔP within one or more oscillation periods in the memory. Then, at a timing that can compensate for the phase delay of the oscillation operation corresponding to the responsiveness of the motor 81, it outputs the correction amount α calculated based on the position deviation ΔP stored in the memory to the second adder 21b. Generally, the position deviation ΔP with respect to the command amplitude increases as the oscillation frequency increases, so by performing this correction by the learning unit 33, the tracking ability of the actual relative oscillation to the periodic oscillation command C2 can be improved. As a result, the tracking ability of the actual relative position Pa to the command relative position Pc is also improved, and the position deviation ΔP is reduced. Ultimately, machining accuracy can be improved.
[0051] As described above, the learning unit 33 calculates a correction amount α based on the position deviation ΔP and corrects the position deviation ΔP by adding the calculated correction amount α to the position deviation ΔP. This reduces the position deviation ΔP. When the position deviation ΔP exceeds the threshold ΔPth, the oscillation conditions are changed. Therefore, it is expected that the frequency of changes in oscillation conditions will be reduced, and mechanical resonance will be further suppressed.
[0052] [Other embodiments] The embodiments described above can be modified as follows, for example. Instead of performing a switching process to switch the oscillation conditions, the oscillation switching unit 26 may perform a process to notify the user that it is necessary to switch the oscillation conditions, either through a display or a sound. Specifically, for example, the switching process may involve displaying the information on a screen. In addition, for example, the oscillation switching unit 26 may have a speaker, and the switching process may involve the speaker emitting the sound.
[0053] 22 Subtractor (Location Information Acquisition Unit) 23 Deviation storage section 24. Threshold setting section 25 State determination unit 26 Oscillating switching section 33 Learning Department 50 Machine tool control systems 80 Machine tools 86 Work 88 Cutting tools C1 movement command C2 Oscillation Command C3 Superimposition command Cp Computer pa actual relative position Pc Command Relative Position Pg Machine Tool Control Program ΔP position deviation ΔPth threshold ΔPmax: Maximum deviation within the interval ΔPmax_min: Minimum value of the maximum deviation within the interval. ω Oscillation period
Claims
1. In the control of a machine tool equipped with a cutting tool for cutting a workpiece, a machine tool control device is provided that generates an air cut during the cutting of the workpiece to break up chips by superimposing a movement command that commands the relative movement of the workpiece and the cutting tool with a movement command that commands the relative oscillation of the workpiece and the cutting tool, A threshold setting unit sets a threshold value that is greater than the amplitude of the relative oscillation based on the oscillation command, A position information acquisition unit acquires position information relating to the relative position of the workpiece and the cutting tool, A state determination unit determines that an unstable state exists when the position deviation, which increases as the difference between the actual relative position (based on the position information) and the commanded relative position (based on the movement command and the oscillation command) increases, exceeds the threshold, A oscillation switching unit performs a switching process to switch the oscillation conditions of the relative oscillation, provided that the aforementioned unstable state is determined to be the case. A machine tool control device having
2. It has a deviation storage unit that stores the aforementioned position deviation, The threshold setting unit sets the threshold based on the history of position deviations stored in the deviation storage unit. The machine tool control device according to claim 1.
3. The machine tool control device according to claim 2, wherein the threshold setting unit calculates the maximum deviation within a section, which is the maximum value of the position deviation or the maximum value of the absolute value of the position deviation, for each section divided based on the oscillation period as the period of the relative oscillation, and determines the threshold based on the maximum deviation within the section.
4. A machine tool control device for cutting a workpiece, wherein an air cut is generated during the cutting of the workpiece to break up chips by superimposing a movement command that commands the relative movement of the workpiece and the cutting tool with a movement command that commands the relative movement of the workpiece and the cutting tool, A position information acquisition unit acquires position information relating to the relative position of the workpiece and the cutting tool, A state determination unit determines that an unstable state exists when the position deviation, which increases as the difference between the actual relative position (based on the position information) and the commanded relative position (based on the movement command and the oscillation command) increases, exceeds a threshold, A oscillation switching unit performs a switching process to switch the oscillation conditions of the relative oscillation, provided that the aforementioned unstable state is determined to be the case. A deviation storage unit that stores the aforementioned position deviation, The system includes a threshold setting unit that sets the threshold based on the history of position deviations stored in the deviation storage unit, The threshold setting unit calculates the maximum deviation within each section, which is the maximum value of the position deviation or the maximum value of the absolute value of the position deviation, for each section divided based on the oscillation period, which is the period of the relative oscillation, and determines the threshold based on the maximum deviation within the section. Machine tool control device.
5. The machine tool control device according to claim 4, wherein the length of each division is an integer multiple of half the length of the oscillation period.
6. The machine tool control device according to claim 4 or 5, wherein the threshold setting unit sets the threshold value to a value obtained by multiplying the maximum deviation within the division section in which the maximum deviation within the section is minimized, or the average value of the maximum deviations within the sections in a plurality of division sections, by a predetermined multiplier greater than 1.
7. The machine tool control device according to any one of claims 1 to 5, wherein the oscillation switching unit performs at least one of the following as the switching process: a process to change the frequency of the relative oscillation and a process to reduce the amplitude of the relative oscillation based on the oscillation command.
8. The machine tool control device according to any one of claims 1 to 5, wherein the oscillation switching unit performs a process of notifying the user that it is necessary to switch the oscillation conditions, either by displaying a message or by sounding an audible message.
9. A machine tool control device according to any one of claims 1 to 5, comprising a learning unit that calculates a correction amount for the position deviation based on the position deviation and corrects the position deviation by adding the calculated correction amount to the position deviation.
10. In the control of a machine tool equipped with a cutting tool for cutting a workpiece, a machine tool control device is provided that generates an air cut during the cutting of the workpiece to break up chips by superimposing a movement command that commands the relative movement of the workpiece and the cutting tool with a movement command that commands the relative oscillation of the workpiece and the cutting tool, A machine tool control program that enables a computer to function, The aforementioned computer further, A threshold setting unit sets a threshold value that is greater than the amplitude of the relative oscillation based on the oscillation command, A position information acquisition unit acquires position information relating to the relative position of the workpiece and the cutting tool, A state determination unit determines that an unstable state exists when the position deviation, which increases as the difference between the actual relative position (based on the position information) and the commanded relative position (based on the movement command and the oscillation command) increases, exceeds the threshold, A oscillation switching unit performs a switching process to switch the oscillation conditions of the relative oscillation, provided that the aforementioned unstable state is determined to be the case. A machine tool control program that functions as such.
11. A machine tool control device that generates air cut during cutting of a workpiece and breaks up chips by superimposing a movement command that commands the relative movement of the workpiece and the cutting tool with a movement command that commands the relative movement of the workpiece and the cutting tool, A machine tool control program that enables a computer to function, The aforementioned computer further, A position information acquisition unit acquires position information relating to the relative position of the workpiece and the cutting tool, A state determination unit determines that an unstable state exists when the position deviation, which increases as the difference between the actual relative position (based on the position information) and the commanded relative position (based on the movement command and the oscillation command) increases, exceeds a threshold, A oscillation switching unit performs a switching process to switch the oscillation conditions of the relative oscillation, provided that the aforementioned unstable state is determined to be the case. A deviation storage unit that stores the aforementioned position deviation, A threshold setting unit sets the threshold based on the history of positional deviations stored in the deviation storage unit, To make it function as, The threshold setting unit calculates the maximum deviation within each section, which is the maximum value of the position deviation or the maximum value of the absolute value of the position deviation, for each section divided based on the oscillation period, which is the period of the relative oscillation, and determines the threshold based on the maximum deviation within the section. Machine tool control program.