Machining instruction correction device and machining instruction correction method
Patent Information
- Application Number
- JP2024551193
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2042-10-21
AI Technical Summary
Existing machining command systems fail to optimize tool orientation during machining operations without causing interference between the tool and workpiece, leading to suboptimal tool paths that may result in increased axis movement, energy consumption, and potential surface deterioration.
A machining command modification device and method that analyze and correct tool postures using machine coordinate information, tool shape information, and workpiece shape information to generate new machining commands that avoid interference while optimizing tool orientation, using evaluation values to assess and improve the quality of the tool path.
The solution ensures that the tool path after correction is not worse than before, with optimized tool orientation within a range where no interference occurs, reducing axis movement and energy consumption, and improving machining efficiency.
Abstract
Description
Machining command correction device and machining command correction method
[0001] The present disclosure relates to a machining command correction device and a machining command correction method that correct machining commands that control a machine tool, and in particular to a machining command correction device and a machining command correction method that correct machining commands that change the attitude of a tool relative to a workpiece.
[0002] Patent Literature 1 describes a tool path generation method and device for performing surface machining of a workpiece using a machine tool having at least one rotary feed axis while changing the tool attitude of the end mill relative to the workpiece. Specifically, Patent Literature 1 describes the following: setting one machining point on a plurality of rows of tool paths as a target machining point, selecting machining points within a predetermined range centered on the target machining point as machining points of interest, calculating the tool attitude of the target machining point by averaging the tool attitudes at the selected machining points of interest, correcting data related to the tool attitude of the target machining point using the calculated average tool attitude, obtaining shape data of the workpiece to be machined and shape data of the ball end mill to be used, checking for interference between the workpiece and the ball end mill based on the corrected tool attitude data, and if no interference between the workpiece and the ball end mill occurs, generating a new tool path based on the data related to the corrected tool attitude.
[0003] Patent re-publication No. WO2018 / 179401
[0004] Patent Document 1 describes a method of checking interference between a workpiece and a ball end mill based on corrected tool attitude data, and if no interference occurs between the workpiece and the ball end mill, generating a new tool path based on data related to the corrected tool attitude. When changing the tool attitude, it is desirable that the tool path after the change in tool attitude does not deteriorate compared to the tool path before the change in tool attitude.
[0005] Therefore, there has been a demand for a machining command correcting device and a machining command correcting method that optimize the tool posture within a range where the tool path after the tool posture change is not worse than the tool path before the tool posture change and no interference occurs.
[0006] A first representative aspect of the present disclosure is a machining command correction device comprising: a machining command analysis unit that generates first machine coordinate information that is a time-series change in the coordinates of each axis of the machine tool, based on a first machining command describing a time-series change in the position and attitude of the tool, and machine configuration information for performing coordinate conversion between a coordinate system based on a workpiece and a coordinate system based on the machine tool; a tool attitude correction unit that corrects the attitude of the tool based on the first machine coordinate information and generates second machine coordinate information; an interference calculation unit that calculates interference between the tool and the workpiece when the machine tool operates in accordance with the second machine coordinate information, based on the second machine coordinate information, the machine configuration information, tool shape information related to the shape of the tool used in machining the first machining command, and workpiece shape information related to the shape of the workpiece obtained when the first machining command is executed; and a machining command generation unit that generates a second machining command based on the second machine coordinate information when there is no interference, wherein the tool attitude correction unit determines the attitude of the tool after correction using an evaluation value that evaluates the quality of a tool path.
[0007] A second representative aspect of the present disclosure comprises: a machining command analysis unit that generates first machine coordinate information that is a time-series change in the coordinates of each axis of the machine tool, based on a first machining command describing a time-series change in the position and attitude of the tool, and machine configuration information for performing coordinate conversion between a coordinate system based on a workpiece and a coordinate system based on the machine tool; an interference calculation unit that calculates interference between the tool and the workpiece when the machine tool operates in accordance with the first machine coordinate information, based on the first machine coordinate information, the machine configuration information, tool shape information related to the shape of the tool used in machining the first machining command, and workpiece shape information related to the shape of the workpiece obtained when the first machining command is executed; a tool attitude correction unit that corrects the attitude of the tool based on the first machine coordinate information and generates second machine coordinate information; and a machining command generation unit that generates a second machining command based on the second machine coordinate information when there is no interference, wherein the interference calculation unit calculates a range of tool attitude in which no interference occurs, The tool attitude correction unit is a machining command correction device that corrects the tool attitude within the range of the calculated tool attitude and determines the corrected tool attitude using an evaluation value that evaluates the quality of the tool path.
[0008] A third representative aspect of the present disclosure is a machining command correction method in which a computer as a machining command correction device executes the following processes: generating first machine coordinate information which is time-series changes in the coordinates of each axis of the machine tool, based on a first machining command describing time-series changes in the position and attitude of the tool, and machine configuration information for performing coordinate conversion between a coordinate system based on a workpiece and a coordinate system based on the machine tool; correcting the attitude of the tool based on the first machine coordinate information and generating second machine coordinate information; calculating interference between the tool and a workpiece when the machine tool operates in accordance with the second machine coordinate information, based on the second machine coordinate information, the machine configuration information, tool shape information related to the shape of the tool used in machining the first machining command, and workpiece shape information related to the shape of the workpiece obtained when the first machining command is executed; and generating a second machining command based on the second machine coordinate information when there is no interference.
[0009] 1 is a block diagram showing the configuration of a data generation system. FIG. 2 is a diagram showing the flow of data generation in the data generation system. FIG. 3 is a block diagram showing the configuration of a machining command correcting device according to a first embodiment of the present disclosure. FIG. 4 is a diagram showing information on the type of machine configuration. FIG. 5 is a diagram for explaining information on the positions of the rotation axis center and the workpiece coordinate system. FIG. 6 is a diagram showing a state in which the center position of the ball of a ball end mill is fixed and the tool attitude is changed within a certain range. FIG. 7 is a characteristic diagram showing an example of first machine coordinate information. FIG. 8 is a diagram showing machine coordinates before and after changing the coordinate value of the rotation axis of each command point in a correction section. FIG. 9 is a characteristic diagram showing the amount of change in the axis (ΔLaxis(pi)). FIG. 10 is a diagram showing an example of parameter information on each height of the tool and the radius at that height. FIG. 11 is a flowchart showing CAD data serving as an example of workpiece shape information. FIG. 12 is a block diagram showing the configuration of a machining command correcting device according to a first modified example of the first embodiment of the present disclosure. FIG. 13 is a block diagram showing the configuration of a machining command correcting device according to a second modified example of the first embodiment of the present disclosure. FIG. 14 is a diagram showing an area in which the tool shape interferes with the workpiece, calculated by an interference calculation unit. 10A is a diagram showing an example in which new tool shape information is generated by increasing the tool protrusion amount, and FIG. 10B is a diagram showing an example in which new tool shape information is generated by decreasing the diameter of the tooling portion of the tool shape information. It is a diagram showing a state in which the interference region has disappeared and there is no interference. It is a block diagram showing the configuration of a machining command correcting device of a third modified example of the first embodiment of the present disclosure. It is a block diagram showing the configuration of a machining command correcting device of a second embodiment of the present disclosure. It is a diagram showing the changeable range of the tool attitude in which interference does not occur.
[0010] Prior to describing the embodiments of the present disclosure, a data generation flow of a data generation system that generates data for controlling a machine tool will be described. The machining command modifying device of the present disclosure can be applied to the data generation system.
[0011] Fig. 1 is a block diagram showing the configuration of a data generation system. Fig. 2 is a diagram showing the flow of data generation in the data generation system. As shown in Fig. 1, the data generation system 10 includes a CAM device 11 and a CNC device 12. The CAM device 11 includes a main processor 111 and a post processor 112.
[0012] A tool path is generated by the main processor 111 of the CAM device 11 based on shape data (CAD data) of the workpiece created by a CAD device (not shown). The tool path is time-series data of the position and attitude of the tool (tool axis vector), and may also include the feed rate or the movement method (linear movement, arc movement) from the previous position.
[0013] The tool path generated by the main processor 111 is a general-purpose command that does not depend on the type of machine tool. Therefore, the axis configuration of the machine that actually performs the machining is not taken into consideration, and the tool path generated by the CAM device 11 is not necessarily optimal for machine control.
[0014] The tool path generated by the main processor 111 is converted into a machining program tailored to each individual machine by the post processor 112. The post processor 112 performs operations such as inserting commands that can be used by the machine (spindle rotation, cutting fluid ON / OFF, etc.), but does not perform operations that change the tool path.
[0015] The CNC device 12 calculates time-series data (called machine coordinate information) of the coordinates of machine control points as viewed from the machine coordinate system from the machining program (called kinematic transformation). Each motor of the machine tool is controlled based on this machine coordinate information. Machine control points are points used to calculate the coordinates of the orthogonal axes, and are fixed on the machine, so their positions do not change even when the rotary axes are moved. An example of a machine control point is shown in Figure 2.
[0016] Because the motor position and acceleration / deceleration are calculated from the coordinates of the machine control point, if the trajectory of the machine control point is not smooth, the acceleration / deceleration of the axis will be large, resulting in a decrease in machining speed or increased power consumption. Furthermore, vibrations caused by the acceleration / deceleration of the axis may deteriorate the machined surface. Correcting the tool attitude within the CNC device 12 to smooth the machine control point may result in interference between the tool and workpiece, and the greater the change in tool attitude, the greater the risk of interference. To avoid interference, the tool attitude can only be changed very small amounts, which minimizes the risk of interference. Therefore, the effect of correcting the tool attitude on smoothing machine operation is limited. Therefore, it is desirable to check for interference between the tool and workpiece and optimize the tool attitude within a range that does not cause interference.
[0017] Furthermore, when changing the tool attitude, it is desirable that the tool path after the tool attitude change does not deteriorate compared to the tool path before the tool attitude change, for example, to avoid problems such as an increase in the amount of axis movement. The embodiments and modified examples of the present disclosure described below relate to a machining command correction device and a machining command correction method that optimize the tool attitude within a range where the tool path after the tool attitude change does not deteriorate compared to the tool path before the tool attitude change and no interference occurs.
[0018] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings. (First Embodiment) Fig. 3 is a block diagram showing the configuration of a machining command correcting device according to a first embodiment of the present disclosure. As shown in Fig. 3, the machining command correcting device 20 includes a machining command analyzing unit 21, a tool attitude correcting unit 22, an interference calculating unit 23, and a machining command generating unit 24. The machining command correcting device 20 may be installed in the CAM device 11 or the CNC device 12 shown in Fig. 1, or may be provided as a device separate from the CAM device 11 and the CNC device 12.
[0019] Hereinafter, each component of the machining command correction device will be described. (Machining command analysis unit) The machining command analysis unit 21 analyzes the first machining command P A and machine configuration information, first machine coordinate information M regarding the machine coordinates of each control axis of the machine tool. A The first processing command P AThe first machining command P includes data describing the time series changes in the position and posture of the tool described in the workpiece coordinate system. A ) by using the machine configuration information, the first machine coordinate information M A The calculation (kinematic transformation) for determining the coordinates of each control axis of the machine is a known technique.
[0020] First processing command P A is information describing, for example, time-series data of the position and attitude of the tool (tool axis direction vector) as viewed in the workpiece coordinate system, and the movement method (linear movement, arc movement, etc.) from the previous position. A The first machining command P may include information on the tool movement speed and the spindle rotation speed. A is, for example, a file of character strings written in G code included in a machining program, or a file in a format unique to the CAM device called CL data. However, the first machining command P A However, any format may be used as long as it includes time-series data of the position and posture of the tool as viewed in the work coordinate system, and information describing the movement method from the previous position. For example, the first machining command P A may be binary data or the like.
[0021] For example, when the machine coordinate information is generated between the main processor 111 and the post processor 112 of the CAM device 11, the first machining command P A When the machine coordinate information is generated between the post processor 112 and the CNC device 12, the first machining command P A becomes a G-code file. In the case where the machine coordinate information is generated after the G-code file is input to the CNC device 12 and before the kinematic conversion is performed in the CNC device 12, the first machining command P A is data in the internal format of the CNC device 12 in binary format.
[0022] Machine configuration information is information for performing coordinate conversion between a coordinate system based on the workpiece and a coordinate system based on the machine tool. When used to generate machine coordinate information, machine configuration information is information required to convert the tool position and orientation described in the workpiece coordinate system into the coordinates of each axis of the machine (kinematic conversion). Machine configuration information is also used when performing inverse kinematic conversion, which will be described later.
[0023] The machine configuration information includes, for example, the following information: (1) Information on the type of machine configuration The information on the type of machine configuration is, for example, information indicating whether the machine tool is a four-axis machine or a five-axis machine, information indicating whether the axis configuration is a table rotary type, a spindle rotary type, or a mixed type of table rotary type and spindle rotary type, and information indicating whether the direction of the rotation axis of the table rotary type is an AC-axis configuration or a BC-axis configuration. Figure 4 is a diagram showing the table rotary type, spindle rotary type, and mixed type configurations, as well as the AC-axis and BC-axis configurations of the table rotary type.
[0024] (2) Information on the positions of the rotation axis center and the workpiece coordinate system Fig. 5 is a diagram for explaining information on the positions of the rotation axis center and the workpiece coordinate system. Fig. 5 shows the A-axis rotation center and the origin of the workpiece coordinate system, and indicates that the difference between the A-axis rotation center and the origin of the workpiece coordinate system is dx in the X direction and dZ in the Z direction.
[0025] (Tool Attitude Correction Unit) The tool attitude correction unit 22 corrects the first machine coordinate information M generated by the machining command analysis unit 21. A The tool attitude is corrected based on the second machine coordinate information M B Below is an example of how to correct the tool orientation.
[0026] (A) In the case of machining with a ball end mill, the tip of a ball end mill is spherical, so as shown in Figure 6, even if the center position of the ball of the ball end mill is fixed and the tool attitude is changed within a certain range, the shape obtained after machining will not change. Therefore, when correcting the tool attitude, only the attitude of the tool is changed without changing the position of the center of the ball as seen in the workpiece coordinate system. With the tool in Figure 6, if the attitude is changed by more than 90 degrees, the cylindrical part of the tool will come into contact with the workpiece, causing the shape after machining to change, but this can be avoided by setting an upper limit on the amount of change in the tool attitude.
[0027] (B) First machine coordinate information M A When the first machine coordinate information M includes a period in which the tool posture should not be corrected and a period in which the tool posture can be corrected, A may include a movement for which the tool attitude should not be corrected, such as a positioning movement during rapid feed. Therefore, the tool attitude correcting unit 22 uses the first machine coordinate information M A A correction section in which the tool attitude can be corrected is extracted from the first machine coordinate information M. An example of a correction section is a cutting feed section made up of continuous broken line segments. There may be multiple correction sections. FIG. 7 is a characteristic diagram showing an example of the first machine coordinate information M. A 7, has four rapid-feed positioning periods and three correction periods for the X-axis, Y-axis, Z-axis, A-axis, and C-axis. The four rapid-feed positioning periods are periods in which the tool attitude should not be corrected, and the three correction periods are periods in which the attitude can be corrected.
[0028] The tool attitude correction unit 22 corrects the tool attitude for each correction interval shown in FIG. 7 using the following method. First, the tool attitude correction unit 22 calculates the evaluation value E1 of the tool path before correction for the extracted correction interval using the calculation method described below. Next, the coordinate values of the rotation axes of each command point in the correction interval are changed. Here, if a limit is set on the amount of change in the attitude, the coordinates of the rotation angles after the change are determined so that the attitude change does not exceed the limit. For example, in FIG. 8, if a limit is set that the A-axis machine coordinate at time t1 must not exceed A1, the coordinates of the rotation axes after the change are determined so that the A-axis coordinate at time t1 does not exceed A1. Once the coordinates of the rotation axes are determined, the coordinate values of the linear axes are determined based on the condition that "the ball center coordinate in the workpiece coordinate system does not change." It is desirable not to change the tool attitude at the first and last command points of the correction interval to prevent a sudden change in the tool attitude at the boundaries between the previous and next intervals. Furthermore, a sudden change in speed at the boundaries between the intervals may be prevented by not changing the speed of each axis at the first and last points of the correction interval.
[0029] The tool attitude correction unit 22 calculates an evaluation value E2 for the tool path after the tool attitude change, and if the evaluation is better than the evaluation value E1, it is adopted as the modified machine coordinate information. It is not necessary to calculate the modified machine coordinate information in a single change. For example, a correction amount is added to the rotation axis coordinates to change the tool path, and if the evaluation of the modified tool path is better than before the change, it is adopted. If the evaluation after the change is poor, the change is discarded, and a correction amount different from the previous one is added to change the tool path. Next, the tool path with the best index value may be obtained by repeating the process of adding a further correction amount to the adopted tool path and changing it. The tool path correction process is a multivariable optimization problem in which the coordinates of the rotation axes of each command point are used as variables and the values of the variables with the best evaluation value are found. Therefore, the tool attitude with the best evaluation value may be found using a method commonly used in multivariable optimization problems. Examples of such methods include the steepest descent method or the Nelder-Mead algorithm.
[0030] (Calculation example of evaluation value) The evaluation value can use at least one of the movement amount of the drive axis, the acceleration of the drive axis, the energy consumption, and the machining time. Below, an example of calculating the evaluation value will be explained. (1) When the evaluation value is the total movement amount of the axis The tool attitude correction unit 22 can use the sum of the movement amounts of the axes as the evaluation value of the tool path. If the total movement amount is small, it can be expected that the time and energy required for movement will be small, so the tool attitude correction unit 22 determines that the smaller this evaluation value is, the better the tool path. The calculation formula for the total movement amount is shown in Equation 1 (Equation 1 below). In Equation 1, axis indicates the drive axis of the machine tool (for example, linear axes X, Y, Z and rotational axes A, C), ΔLaxis(pi) indicates the amount of change of the axis axis from the first command point to the (i+1)th command point, and Waxis indicates a weighting coefficient. The coefficient Waxis is set large for axes with large inertia or axes with a low maximum acceleration setting. Figure 9 is a characteristic diagram showing ΔLaxis(pi). ΔL in Figure 9 A (pi) indicates ΔLaxis(pi).
[0031] (2) When the evaluation value is the total acceleration, the tool attitude correction unit 22 can use the sum of the accelerations of the axes as the evaluation value of the tool path. If the acceleration is small, it can be expected that the time or energy required for acceleration / deceleration will be small, so the tool attitude correction unit 22 determines that the smaller this evaluation value is, the better the tool path. The formula for calculating the total acceleration is shown in Equation 2 (Equation 2 below). In Equation 2, Accaxis(pi) represents the acceleration of the i-th axis, and Waxis represents the weighting coefficient. The weighting coefficient Waxis is set to a large value for an axis with large inertia or an axis with a low maximum acceleration setting.
[0032] (3) When the evaluation value is the total energy consumption, the tool attitude correction unit 22 predicts the energy consumption of the machine by simulation and uses the predicted energy consumption as the evaluation value, and determines that the smaller the predicted energy consumption is, the better the tool path. Existing techniques can be used to predict the energy consumption of the machine. For example, techniques described in Japanese Patent No. 4571225, Japanese Patent No. 4805329, etc. can be used.
[0033] (4) When the evaluation value is the machining time, the tool attitude correcting unit 22 can use the machining time as the evaluation value. Regarding the evaluation value of the machining time, a method of predicting the machining time from an NC program is an existing technique (for example, Japanese Patent No. 06871207). B By performing inverse kinematic transformation, machining commands such as NC commands that describe the position and posture of the tool in the workpiece coordinate system can be obtained, making it possible to predict the machining time. The tool posture correction unit 22 determines that the shorter the predicted machining time, the better the tool path.
[0034] First machine coordinate information M A Although an example has been described in which a period in which the tool posture should not be corrected and a period in which the tool posture can be corrected are included, the present invention is also applicable to a case in which no period in which the tool posture should not be corrected is included.
[0035] (Interference Calculation Unit) The interference calculation unit 23 calculates the second machine coordinate information M B , the interference between the tool and the workpiece is calculated based on the machine configuration information, the tool shape information, and the workpiece shape information. B The position and orientation of the tool described in the workpiece coordinate system are calculated by inverse kinematic transformation of each point based on the machine situation information. The interference calculation unit 23 then performs coordinate transformation on the tool shape information to obtain the calculated tool position and tool orientation, and calculates the interference between the coordinate-transformed tool shape and the workpiece shape. Calculation of interference between shape data is a well-known technique that is often used in CAM devices, etc.
[0036] The interference calculation unit 23 calculates interference between the tool and the workpiece, and if interference occurs, ends the processing, but if no interference occurs, outputs the corrected tool attitude to the machining command generation unit 24.
[0037] The machine configuration information is used for inverse kinematic transformation. Examples of tool shape information include any of the following information. However, if necessary for interference detection, the tool shape may include not only the tool tip but also the shape of the tooling or spindle. Tool shape information is, for example, CAD data of the tool shape, parameter information such as each height of the tool and the radius at that height, and information capable of expressing the tool shape such as ISO standards (ISO 13399, etc.).
[0038] 10 is a diagram showing an example of parameter information for each height of a tool and the radius at that height. In FIG. 10, h1 to h4 indicate the heights, and r1 to r4 indicate the radii at each height h1 to h4.
[0039] The workpiece shape information may be CAD data of the workpiece shape after machining. Fig. 11 is a diagram showing CAD data as an example of workpiece shape information.
[0040] (Machining command generation unit) When the interference calculation unit 23 determines that there is no interference, the machining command generation unit 24 generates a machining command P B The generated machining command P B The format of the command may be different from the format of the input machining command, but it is reasonable to use the format of the input machining command.
[0041] Hereinafter, the operation of the machining command correcting device 20 (machining correction method) will be described with reference to Fig. 12. Fig. 12 is a flowchart showing the operation of the machining command correcting device. In step S11, the machining command analyzing unit 21 calculates the first machining command P A and machine configuration information, first machine coordinate information M regarding the machine coordinates of each control axis of the machine tool. A Generate.
[0042] In step S12, the tool attitude correcting unit 22 calculates the first machine coordinate information M generated by the machining command analyzing unit 21. A The tool attitude is corrected based on the second machine coordinate information M B Generate.
[0043] In step S13, the interference calculation unit 23 calculates the second machine coordinate information M B The interference between the tool and the workpiece is calculated based on the machine configuration information, tool shape information, and workpiece shape information.
[0044] In step S14, the interference calculation unit 23 calculates the interference between the tool and the workpiece, and if interference occurs, the process is terminated, and if no interference occurs, the second machining command P B The process then proceeds to step S15.
[0045] In step S15, the machining command generating unit 24 generates a second machining command P B Generate.
[0046] As described above, in this embodiment, the tool path after the tool attitude change does not deteriorate compared to the tool path before the tool attitude change, and the tool attitude can be optimized within a range where no interference occurs.
[0047] (First Modification) In the above-described embodiment, if interference is detected in the corrected tool attitude, the tool attitude is not modified. In this modification, if interference is detected in the corrected tool attitude, the tool attitude is modified to an optimal tool attitude within a range in which no interference occurs.
[0048] Fig. 13 is a block diagram showing the configuration of a machining command modifying device according to a first modified example of the first embodiment of the present disclosure. The machining command modifying device 20A shown in Fig. 13 is obtained by adding a constraint condition setting unit 25 and a modification completion determination unit 26 to the machining command modifying device 20 shown in Fig. 3. The machining command modifying device 20A is the same as the machining command modifying device 20 except for the operations related to the constraint condition setting unit 25 and the modification completion determination unit 26, and therefore description thereof will be omitted.
[0049] The interference calculation unit 23 calculates interference between the tool and the workpiece, and if interference occurs, outputs a corrected tool attitude to the constraint condition setting unit 25. If interference does not occur, the interference calculation unit 23 outputs the corrected tool attitude to the correction completion determination unit 26, and the correction completion determination unit 26 outputs the corrected tool attitude to the machining command generation unit 24. There are, for example, the following three cases (1) to (3) as a method for correcting the tool attitude to an optimal one within a range in which no interference occurs using the constraint condition setting unit 25 and the correction completion determination unit 26.
[0050] (1) A method of gradually correcting the tool attitude so as to improve the evaluation value If interference occurs at a tool position somewhere on the tool path, the following processes (a) and (b) are performed. (a) The constraint condition setting unit 25 returns the tool attitude at the tool position to the attitude before the interference occurred, and sets a limit (constraint condition) so that the tool attitude at that tool position is not changed any further. Changes that bring the tool attitude closer to the attitude before correction may be allowed because they do not cause interference. The correction completion determination unit 26 sends an incomplete notification including the constraint condition to the tool attitude correction unit 22. The tool attitude correction unit 22 attempts to correct the tool attitude under the constraint condition, and continues the correction if the evaluation value improves further.
[0051] (b) The correction completion determination unit 26 determines that the correction of the tool path is complete after repeating the correction a predetermined number of times or when determining that the evaluation value will not improve beyond the current evaluation value even if the tool attitude is changed, and outputs the corrected tool attitude to the machining command generation unit 24. The determination that the evaluation value will not improve beyond the current evaluation value can be made by acquiring the evaluation value from the tool attitude correction unit 22. When interference occurs frequently and the tool attitude cannot be changed significantly, method (1) is suitable.
[0052] (2) A method of calculating an optimal tool path without considering interference and returning the location where interference occurred: First, the tool attitude that provides the best evaluation value is calculated without considering interference. If interference is detected at the tool position on the best tool path, the following processes (a) and (b) are performed. (a) The constraint condition setting unit 25 calculates a tool attitude that is midway between the tool attitude before correction and the best tool attitude and that does not cause interference with the tool, and returns the tool attitude to that attitude. A limit (constraint condition) is set to prevent further change in the tool attitude at that tool position. A change approaching the attitude before correction may be allowed. The correction completion determination unit 26 sends an incomplete notification including the constraint condition to the tool attitude correction unit 22. The tool attitude correction unit 22 attempts to correct the tool attitude under the constraint condition, and continues the correction if the evaluation value improves further.
[0053] (b) The correction completion determination unit 26 determines that the correction of the tool attitude is complete when the correction is repeated a predetermined number of times or when interference is no longer detected in the tool path with the best current evaluation value, and outputs the corrected tool attitude to the machining command generation unit 24. Method (2) is suitable when interference hardly occurs even when the tool attitude is changed significantly.
[0054] (3) A method combining the above methods (1) and (2) As an example, first, the optimal tool posture is calculated in the same way as in method (2), and if interference is detected, the tool posture at the tool position where interference occurred is returned to a posture where interference does not occur. Also, a limit (constraint condition) is set so that the tool posture at that position does not change any further. There is also a method in which the tool posture is then corrected little by little so as to improve the evaluation value, as in the above method (1). In this case, too, the correction completion determination unit 26 determines that the correction of the tool path is complete when it has repeated the correction a predetermined number of times or when it has determined that the evaluation value does not improve beyond the current evaluation value even if the tool posture is changed.
[0055] In this modified example, in addition to the effects of the above-described embodiment, when there are a mixture of locations with a lot of interference and locations with little interference in the tool path, this method has the effect of making optimization calculations more efficient.
[0056] (Second Modification) In the first modification, when interference is detected in the tool posture determined by the tool posture correction unit 22, the tool posture is changed so that the interference does not occur. However, the changed tool posture may have a worse evaluation value of the tool path than the tool posture determined by the tool posture correction unit 22. In this modification, instead of changing the tool posture so that interference does not occur, the tool shape is changed so that interference does not occur in the tool posture determined by the tool posture correction unit 22, making it possible to use a tool posture with a good evaluation.
[0057] Fig. 14 is a block diagram showing the configuration of a machining command correcting device according to a second modified example of the first embodiment of the present disclosure. The machining command correcting device 20B shown in Fig. 14 is configured by adding a tool shape generating unit 27 and an avoidance method selecting unit 28 to the machining command correcting device 20A shown in Fig. 13. In the machining command correcting device 20B, the same components as those in the machining command correcting device 20A are denoted by the same reference numerals, and description thereof will be omitted.
[0058] In the second modified example, the interference calculation unit 23 has a function of calculating not only whether or not interference occurs, but also the area on the tool shape where interference occurs with the workpiece. Fig. 15 is a diagram showing the area where the tool shape interferes with the workpiece, calculated by the interference calculation unit.
[0059] The tool shape generation unit 27 generates new tool shape information by removing at least the interference region from the tool shape and outputs the generated information to the avoidance method selection unit 28. The avoidance method selection unit 28 selects whether to avoid the interference by changing the tool path or by changing the tool to a new tool shape. When the avoidance method selection unit 28 selects to avoid the interference by changing the tool shape, the tool shape information output by the interference calculation unit 23 is changed to the new tool shape information generated by the tool shape generation unit 27, and the optimization process is continued. When the avoidance method selection unit 28 selects to avoid the interference by changing the tool path, the operation using the constraint condition setting unit 25 and the correction completion determination unit 26 is performed, as in the first modified example. Note that the tool shape generation unit 27 may be provided after the avoidance method selection unit 28, and when the avoidance method selection unit 28 selects to avoid the interference by changing the tool shape, the tool shape generation unit 27 may generate new tool shape information.
[0060] Methods for generating a new tool shape include generating a tool shape with a larger tool protrusion amount based on the input tool shape information, or generating a new tool shape by replacing the tooling portion of the tool shape information with a tooling shape with a smaller diameter.
[0061] Fig. 16A shows an example of generating new tool shape information by increasing the tool protrusion amount, while Fig. 16B shows an example of generating new tool shape information by replacing the tooling portion of the tool shape information with a tooling shape having a smaller diameter.
[0062] The selection in the avoidance method selection unit 28 may be made by an operator who instructs the avoidance method selection unit 28, or may be made automatically by the avoidance method selection unit 28. When the avoidance method selection unit 28 makes an automatic selection, for example, it automatically determines whether or not a new tool shape is appropriate as a tool shape, and if appropriate, selects interference avoidance by changing the tool shape. Figure 17 shows a state in which the interference area is eliminated and interference is no longer present by replacing the tooling portion of the tool shape information with a tooling shape with a smaller diameter.
[0063] Whether the new tool shape information is appropriate as a tool shape may be determined separately. There are methods for determining whether the new tool shape information is appropriate as a tool shape, such as determining based on the tool diameter and protrusion length, or calculating the rigidity using FEM or the like.
[0064] In this modification, in addition to the effects of the first modification described above, if the tool shape is changed, it is possible to use a tool attitude that has a good evaluation.
[0065] (Third Modification) In the above-described embodiment, first modification, and second modification, CAD data of the workpiece shape after machining is input as workpiece shape information, but there are cases where CAD data is not available. For example, even if CAD data of the final shape of the product is available, CAD data of the intermediate shape during rough machining is not usually created. Therefore, in order to correct machining programs other than final finishing machining using the proposed method, it is necessary to create CAD data of the intermediate shape for interference detection.
[0066] A machining simulation can be used as a method for creating such CAD data. In this modification, a machining simulation is performed, and the resulting shape is used as CAD data.
[0067] Fig. 18 is a block diagram showing the configuration of a machining command correcting device according to a third modified example of the first embodiment of the present disclosure. The machining command correcting device 20C shown in Fig. 18 is configured by adding a machining simulation unit 29 to the machining command correcting device 20A shown in Fig. 13. In the machining command correcting device 20C, the same components as those in the machining command correcting device 20A are denoted by the same reference numerals, and description thereof will be omitted.
[0068] In the present modified example 3, the machining simulation unit 29 performs a machining simulation using the machining command PA before correction and the tool shape information, and outputs CAD data of the obtained shape as workpiece shape information to the interference calculation unit 23. Note that this modified example is not limited to the machining command correcting device 20A of the first modified example, but can be applied to the machining command correcting device 20 of the present embodiment and the machining command correcting device 20B of the second modified example.
[0069] In addition to the effect of the first modification described above, this modification has the effect of making it possible to correct the tool attitude even when post-machining CAD data is not available.
[0070] Second Embodiment In the first embodiment and the first to third modified examples, the interference calculation unit 23 calculates interference in a specific tool attitude corrected by the tool attitude correction unit 22 .
[0071] In this embodiment, the interference calculation unit calculates a range of the tool attitude in which interference does not occur, and the tool attitude correction unit corrects the tool attitude within the calculated range. Fig. 19 is a block diagram showing the configuration of a machining command correction device according to a second embodiment of the present disclosure. In the machining command correction device 30 shown in Fig. 19, the tool attitude correction unit 22 and the interference calculation unit 23 of the machining command correction device 20 shown in Fig. 3 are replaced with a tool attitude correction unit 31 and an interference calculation unit 32. In the machining command correction device 30, the same components as those in the machining command correction device 20 are assigned the same reference numerals, and description thereof will be omitted.
[0072] The interference calculation unit 32 calculates the machine coordinate information M AAn interference check is performed based on the machine configuration information, the tool shape, and the workpiece shape, and a range is calculated for each tool position where no interference occurs even if the tool attitude is changed from the tool attitude before correction. FIG. 20 is a diagram showing the range in which the tool attitude can be changed so that no interference occurs. The tool attitude correction unit 31 changes the tool attitude only within the calculated range in which no interference occurs, and corrects the tool attitude, and outputs the corrected tool attitude to the machining command generation unit 24.
[0073] In this embodiment, a machining simulation unit 29 may be added to the machining command correction device 20C of the third modified example to perform machining simulation, and the CAD data of the obtained shape may be output to the interference calculation unit 32 as work shape information.
[0074] In this embodiment, in addition to the effects of the first embodiment described above, the tool attitude correction unit only needs to correct the tool attitude within a range where no interference occurs, which has the effect of reducing the amount of calculation.
[0075] In order to realize the components included in the machining command modifying device in each of the above-described embodiments and modifications, the machining command modifying device can be realized by hardware, software, or a combination of these. Here, being realized by software means being realized by a computer reading and executing a program.
[0076] In each embodiment and each modified example, the components included in the machining command correcting device are implemented by software or a combination thereof. Specifically, the machining command correcting device includes a central processing unit (CPU) or other such arithmetic processing device. The arithmetic processing device functions as an execution unit. The machining command correcting device also includes an auxiliary storage device such as a hard disk drive (HDD) that stores various control programs such as application software or an operating system (OS), and a main storage device such as a random access memory (RAM) that stores data temporarily required for the arithmetic processing device to execute the programs. The main storage device includes at least one of a memory area and a synchronous memory area.
[0077] In the machining command modifying device, the arithmetic processing unit reads the application software or OS from the auxiliary storage device, and while loading the read application software or OS into the main storage device, performs arithmetic processing based on the application software or OS. Also, based on the results of this calculation, various hardware components of the machining command modifying device are controlled. In this way, the components of each embodiment and each modified example are realized.
[0078] Each component included in the machining command correcting device can be realized by hardware including electronic circuits, etc. When the machining command correcting device is configured by hardware, some or all of the functions of each component included in the machining command correcting device can be configured by an integrated circuit (IC), such as an ASIC (Application Specific Integrated Circuit), a gate array, an FPGA (Field Programmable Gate Array), or a CPLD (Complex Programmable Logic Device).
[0079] The program can be stored and supplied to a computer using various types of non-transitory computer-readable media. Non-transitory computer-readable media include various types of tangible storage media. Examples of non-transitory computer-readable media include magnetic recording media (e.g., hard disk drives), magneto-optical recording media (e.g., magneto-optical disks), CD-ROMs (Read Only Memory), CD-Rs, CD-R / Ws, and semiconductor memories (e.g., mask ROMs, programmable ROMs (PROMs), erasable PROMs (EPROMs), flash ROMs, and random access memories (RAMs)). The program may also be supplied to a computer by various types of transitory computer-readable media.
[0080] At least one effect of at least one of the embodiments and modified examples described above is that the tool path after the tool posture change does not deteriorate compared to the tool path before the tool posture change, and the tool posture can be optimized within a range where no interference occurs.
[0081] Although the present disclosure has been described above, the present disclosure is not limited to the individual embodiments and modifications described above. Various additions, substitutions, changes, partial deletions, etc. are possible to these embodiments and modifications within the scope of the gist of the present disclosure, or within the scope of the gist of the present disclosure derived from the content of the claims and their equivalents. Furthermore, these embodiments and modifications can also be implemented in combination. For example, in the above-described embodiments and modifications, the order of each operation and the order of each process are shown as examples and are not limited to these.
[0082] The following additional notes are provided regarding the above-described embodiments and modifications. (Supplementary Note 1) A machining command correction device (20, 20A, 20B, 20C) comprises: a machining command analysis unit (21) that generates first machine coordinate information that is a time-series change in the coordinates of each axis of the machine tool, based on a first machining command describing a time-series change in the position and attitude of the tool, and machine configuration information for performing coordinate conversion between a coordinate system based on a workpiece and a coordinate system based on a machine tool; a tool attitude correction unit (22) that corrects the attitude of the tool based on the first machine coordinate information and generates second machine coordinate information; an interference calculation unit (23) that calculates interference between the tool and the workpiece when the machine tool operates in accordance with the second machine coordinate information, based on the second machine coordinate information, the machine configuration information, tool shape information related to the shape of the tool used in machining the first machining command, and workpiece shape information related to the shape of the workpiece obtained when the first machining command is executed; and a machining command generation unit (24) that generates a second machining command based on the second machine coordinate information when there is no interference. The tool attitude correcting unit determines the attitude of the tool after correction using an evaluation value that evaluates the quality of the tool path.
[0083] (Supplementary Note 2) The machining command correction device according to Supplementary Note 1, wherein at least one of a movement amount of a drive axis, an acceleration of a drive axis, energy consumption, and machining time when the tool performs machining according to the tool path is used as the evaluation value.
[0084] (Supplementary Note 3) A machining command correction device according to Supplementary Note 1, comprising: a constraint condition setting unit (25) that sets constraint conditions relating to a range of an allowable amount of change in the tool attitude when interference is detected by the interference calculation unit; and a correction completion determination unit (26) that determines whether or not correction of the tool path under the constraint conditions has been completed, wherein the tool attitude correction unit corrects the first machine coordinate information within the range of the constraints of the constraint conditions to generate the second machine coordinate information.
[0085] (Supplementary Note 4) The machining command correcting device according to Supplementary Note 3, wherein the interference calculation unit calculates an interference area where the tool having the shape of the tool shape information interferes with the workpiece, and comprises: an avoidance method selection unit (28) which, when interference is detected by the interference calculation unit, selects a method of avoiding the interference; and a tool shape generation unit (27) which, when interference is detected by the interference calculation unit, generates new tool shape information from which the interference area has been removed, wherein the avoidance method selection unit has at least two options, namely, changing a tool path and generating the new tool shape information, for avoiding interference between the tool having the shape of the tool shape information and the workpiece, and when the avoidance method selection unit selects generating the new tool shape information, the tool attitude correction unit corrects the attitude of the tool using a tool having new tool shape information based on the first machine coordinate information, and generates the second machine coordinate information.
[0086] (Supplementary Note 5) The machining command correcting device according to Supplementary Note 1, further comprising a machining simulation unit (29) that generates the workpiece shape information based on the first machining command and the tool shape information.
[0087] (Supplementary Note 6) A machining command analysis unit (21) that generates first machine coordinate information, which is a time-series change in the coordinates of each axis of the machine tool, based on a first machining command describing a time-series change in the position and attitude of the tool, and machine configuration information for performing coordinate conversion between a coordinate system based on a workpiece and a coordinate system based on the machine tool; an interference calculation unit (32) that calculates interference between the tool and the workpiece when the machine tool operates in accordance with the first machine coordinate information, based on the first machine coordinate information, the machine configuration information, tool shape information related to the shape of the tool used in machining the first machining command, and workpiece shape information related to the shape of the workpiece obtained when the first machining command is executed; a tool attitude correction unit (31) that corrects the attitude of the tool based on the first machine coordinate information and generates second machine coordinate information; and a machining command generation unit (24) that generates a second machining command based on the second machine coordinate information when there is no interference, wherein the interference calculation unit calculates a range of tool attitude in which no interference occurs, The tool attitude correction unit corrects the tool attitude within the range of the calculated tool attitude, and determines the corrected attitude of the tool using an evaluation value that evaluates the quality of the tool path.
[0088] (Supplementary Note 7) A machining command correction method in which a computer serving as a machining command correction device (20, 20A, 20B, 20C) executes the following steps: generating first machine coordinate information which is a time-series change in the coordinates of each axis of the machine tool, based on a first machining command describing time-series changes in the position and attitude of the tool, and machine configuration information for performing coordinate conversion between a coordinate system based on a workpiece and a coordinate system based on the machine tool; correcting the attitude of the tool based on the first machine coordinate information and generating second machine coordinate information; calculating interference between the tool and a workpiece when the machine tool operates in accordance with the second machine coordinate information, based on the second machine coordinate information, the machine configuration information, tool shape information relating to the shape of the tool used in machining the first machining command, and workpiece shape information relating to the shape of the workpiece obtained when the first machining command is executed; and generating a second machining command based on the second machine coordinate information when there is no interference.
[0089] 10 Data generation system 11 CAM device 12 CNC device 12 20, 20A, 20B, 20C, 30 Machining command correction device 21 Machining command analysis unit 22, 31 Tool attitude correction unit 23, 32 Interference calculation unit 24 Machining command generation unit 25 Constraint condition setting unit 26 Correction completion determination unit 27 Tool shape generation unit 28 Avoidance method selection unit 29 Machining simulation unit
Claims
1. a machining command analysis unit that generates first machine coordinate information, which is a time-series change in the coordinates of each axis of the machine tool, based on a first machining command describing a time-series change in the position and attitude of a tool and machine configuration information for performing coordinate conversion between a coordinate system based on a workpiece and a coordinate system based on the machine tool; a tool attitude correcting unit that corrects the attitude of the tool based on the first machine coordinate information and generates second machine coordinate information; an interference calculation unit that calculates interference between the tool and the workpiece when the machine tool operates in accordance with the second machine coordinate information, based on the second machine coordinate information, the machine configuration information, tool shape information related to the shape of the tool used in machining the first machining command, and workpiece shape information related to the shape of the workpiece obtained when the first machining command is executed; a machining command generating unit that generates a second machining command based on the second machine coordinate information when the interference does not occur; Equipped with A machining command correcting device, wherein the tool attitude correcting unit determines the corrected attitude of the tool using an evaluation value that evaluates the quality of a tool path.
2. 2. The machining command correcting device according to claim 1, wherein at least one of a movement amount of a drive axis, an acceleration of a drive axis, energy consumption, and a machining time when the tool performs machining according to the tool path is used as the evaluation value.
3. a constraint condition setting unit that sets a constraint condition regarding a range of an allowable change amount of the tool posture when the interference is detected by the interference calculation unit; a correction completion determination unit that determines whether or not the correction of the tool path under the constraint condition has been completed; 2. The machining command correcting device according to claim 1, wherein the tool attitude correcting unit corrects the first machine coordinate information within a range of constraints of the constraint conditions to generate the second machine coordinate information.
4. The interference calculation unit calculates an interference area where the tool having the shape of the tool shape information interferes with the workpiece, an avoidance method selection unit that selects a method of avoiding the interference when the interference calculation unit detects the interference; a tool shape generating unit that generates new tool shape information regarding a new tool shape from which the interference area has been removed when interference is detected by the interference calculation unit, the avoidance method selection unit has at least two options, namely, changing a tool path and generating new tool shape information, for avoiding interference between the tool having the shape of the tool shape information and the workpiece, 4. The machining command correcting device according to claim 3, wherein, when the generation of the new tool shape information is selected by the avoidance method selecting unit, the tool attitude correcting unit corrects the attitude of a tool using a tool having new tool shape information based on the first machine coordinate information, and generates the second machine coordinate information.
5. 2. The machining command correcting device according to claim 1, further comprising a machining simulation unit that generates the workpiece shape information based on the first machining command and the tool shape information.
6. a machining command analysis unit that generates first machine coordinate information, which is a time-series change in the coordinates of each axis of the machine tool, based on a first machining command describing a time-series change in the position and attitude of a tool and machine configuration information for performing coordinate conversion between a coordinate system based on a workpiece and a coordinate system based on the machine tool; an interference calculation unit that calculates interference between the tool and the workpiece when the machine tool operates according to the first machine coordinate information, based on the first machine coordinate information, the machine configuration information, tool shape information related to a shape of a tool used in machining the first machining command, and workpiece shape information related to a shape of a workpiece obtained when the first machining command is executed; a tool attitude correcting unit that corrects the attitude of the tool based on the first machine coordinate information and generates second machine coordinate information; a machining command generating unit that generates a second machining command based on the second machine coordinate information when the interference does not occur; Equipped with The interference calculation unit calculates a range of a tool attitude in which no interference occurs, The tool attitude correction unit corrects the tool attitude within the range of the calculated tool attitude, and determines the corrected attitude of the tool using an evaluation value that evaluates the quality of the tool path.
7. A computer as a processing command correction device, A process of generating first machine coordinate information, which is a time series change in the coordinates of each axis of the machine tool, based on a first machining command describing a time series change in the position and attitude of a tool and machine configuration information for performing coordinate conversion between a coordinate system based on a workpiece and a coordinate system based on the machine tool; a process of correcting an attitude of the tool based on the first machine coordinate information and generating second machine coordinate information; a process of calculating interference between a tool and a workpiece when the machine tool operates according to the second machine coordinate information, based on the second machine coordinate information, the machine configuration information, tool shape information relating to the shape of the tool used in machining the first machining command, and workpiece shape information relating to the shape of the workpiece obtained when the first machining command is executed; a process of generating a second machining command based on the second machine coordinate information when the interference does not occur; A machining command correction method for performing the above.