The present disclosure relates to a control device and a computer readable storage medium.
When a corner part of a workpiece is machined by a machine tool, the moving direction of the tool is changed discontinuously. In such a case, large inertia force occurs on respective control axes of the machine tool. Occurrence of large inertia force on respective control axes may cause vibration on respective control axes. To prevent occurrence of vibration, control to continuously change the moving direction of a tool is performed at a corner part. For example, respective control axes are controlled so that a tool moves along a Non-Uniform Rational B-Spline (NURMS) curve. Furthermore, respective control axes are controlled so that a tool moves at a smaller feed rate at a corner part (for example, Patent Literature 1).
Even when a tool is controlled so as to move at a low rate, however, the inertia force applied to respective control axes increases in a portion around a corner part where the curvature of a curve is larger, and this may adversely affect a machined surface and reduce the quality of the machined surface.
Accordingly, it is desired to improve the quality of the machined surface in machining on a corner part.
A control device includes: a corner detection unit that detects, from a machining program, an instruction on a corner part where a direction of machining performed by a tool is changed discontinuously; a first rate-planning unit that, based on the instruction, generates a deceleration plan defining a feed rate of a control axis when the tool moves toward the corner part and an acceleration plan defining a feed rate of the control axis when the tool moves away from the corner part; an instruction generation unit that overlaps a deceleration period specified by the deceleration plan and an acceleration period specified by the acceleration plan to generate a curve instruction path representing a motion path of the tool and first instruction rate information indicating a first provisional feed rate of the tool on the curve instruction path; a second rate-planning unit that generates second instruction rate information indicating a second provisional feed rate of the tool on the curve instruction path so that an acceleration on the curve instruction path generated by the instruction generation unit is less than or equal to a predetermined allowable acceleration; and an instruction rate generation unit that, based on the first instruction rate information and the second instruction rate information, generates third instruction rate information indicating an actual feed rate when the tool actually moves on the curve instruction path.
A computer readable storage medium stores an instruction that causes a computer to perform: detecting, from a machining program, an instruction on a corner part where a direction of machining performed by a tool is changed discontinuously; based on the instruction, generating a deceleration plan defining a feed rate of a control axis when the tool moves toward the corner part and an acceleration plan defining a feed rate of the control axis when the tool moves away from the corner part; overlapping a deceleration period specified by the deceleration plan and an acceleration period specified by the acceleration plan to generate a curve instruction path representing a motion path of the tool and first instruction rate information indicating a first provisional feed rate of the tool on the curve instruction path; generating second instruction rate information indicating a second provisional feed rate of the tool on the curve instruction path so that an acceleration on the generated curve instruction path is less than or equal to a predetermined allowable acceleration; and based on the first instruction rate information and the second instruction rate information, generating third instruction rate information indicating an actual feed rate when the tool actually moves on the curve instruction path.
According to one aspect of the present disclosure, the quality of the machined surface can be improved in machining on a corner part.
A control device according to an embodiment of the present disclosure will be described below with reference to the drawings. Note that not all combinations of features described in the following embodiment are necessarily required for achieving the object. Further, more detailed description than is needed may be omitted. Further, the following description of the embodiment and the drawings are provided for those skilled in the art to fully understand the present disclosure and are not intended to limit the scope of the claims.
The control device is a numerical control device that controls a machine tool. The machine tool includes a lathe, a machining center, a drilling center, a multi-tasking machine, a laser beam machine, and a wire electrical discharge machine. In the following, a numerical control device will be described as an example of the control device.
A machine tool 1 includes a numerical control device 2, an input/output device 3, a servo amplifier 4, a servo motor 5, a spindle amplifier 6, a spindle motor 7, and an auxiliary device 8.
The numerical control device 2 is a device that controls the entire machine tool 1. The numerical control device 2 includes a hardware processor 201, a bus 202, a read only memory (ROM) 203, a random access memory (RAM) 204, and a nonvolatile memory 205.
The hardware processor 201 is a processor that controls the entire numerical control device 2 in accordance with a system program. The hardware processor 201 reads a system program stored in the ROM 203 via the bus 202 and performs various processes based on the system program. The hardware processor 201 controls the servo motor 5 and the spindle motor 7 based on a machining program. The hardware processor 201 is, for example, a central processing unit (CPU) or an electronic circuit.
The hardware processor 201 performs analysis of a machining program and output of control instructions to the servo motor 5 and the spindle motor 7, for example, at each control cycle.
The bus 202 is a communication path for connecting respective hardware components in the numerical control device 2 to each other. These hardware components in the numerical control device 2 transfer data to each other via the bus 202.
The ROM 203 is a storage device storing a system program for controlling the entire numerical control device 2 or the like. The ROM 203 is a computer readable storage medium.
The RAM 204 is a storage device temporarily storing various data. The RAM 204 functions as a work area for the hardware processor 201 to process various data.
The nonvolatile memory 205 is a storage device that holds data even when the machine tool 1 is powered off and the numerical control device 2 is thus not supplied with power. For example, the nonvolatile memory 205 stores a machining program and various parameters. The nonvolatile memory 205 is a computer readable storage medium. For example, the nonvolatile memory 205 is formed of a memory backed up by a battery or a solid state drive (SSD).
The numerical control device 2 further includes an interface 206, an axis control circuit 207, a spindle control circuit 208, and a programmable logic controller (PLC) 209, and an I/O unit 210.
The interface 206 connects the bus 202 and the input/output device 3 to each other. For example, the interface 206 transmits various data processed by the hardware processor 201 to the input/output device 3.
The input/output device 3 is a device that receives various data via the interface 206 and displays the various data. Further, the input/output device 3 accepts entry of various data and transmits the various data to the hardware processor 201, for example, via the interface 206.
The input/output device 3 is a touch panel, for example. When the input/output device 3 is a touch panel, the input/output device 3 is a capacitive touch panel, for example. Note that the touch panel may be other types of touch panels without being limited to the capacitive type. The input/output device 3 is installed to an operating panel (not illustrated) in which the numerical control device 2 is stored.
The axis control circuit 207 is a circuit that controls the servo motor 5. In response to receiving a control instruction from the hardware processor 201, the axis control circuit 207 outputs an instruction for driving the servo motor 5 to the servo amplifier 4. For example, the axis control circuit 207 transmits a torque command for controlling the torque of the servo motor 5 to the servo amplifier 4.
In response to receiving an instruction from the axis control circuit 207, the servo amplifier 4 supplies current to the servo motor 5.
The servo motor 5 is driven in response to being supplied with current from the servo amplifier 4. The servo motor 5 is connected to a ball screw that drives a tool rest, for example. In response to the servo motor 5 being driven, the structure of the machine tool 1 such as a tool rest moves in each control axis direction. The servo motor 5 has a built-in encoder (not illustrated) that determines the position of the control axis and the feed rate. Position feedback information and rate feedback information indicating the position of the control axis and the feed rate of the control axis, respectively, which are determined by the encoder, are fed back to the axis control circuit 207. Accordingly, the axis control circuit 207 performs feedback control of the control axis.
The spindle control circuit 208 is a circuit for controlling the spindle motor 7. In response to receiving a control instruction from the hardware processor 201, the spindle control circuit 208 transmits an instruction for driving the spindle motor 7 to the spindle amplifier 6. For example, the spindle control circuit 208 transmits a spindle rate command for controlling a rotational rate of the spindle motor 7 to the spindle amplifier 6.
In response to receiving an instruction from the spindle control circuit 208, the spindle amplifier 6 supplies current to the spindle motor 7.
The spindle motor 7 is driven in response to being supplied with current from the spindle amplifier 6. The spindle motor 7 is connected to the spindle and rotates the spindle.
The PLC 209 is a device that executes a ladder program to control the auxiliary device 8. The PLC 209 transmits an instruction to the auxiliary device 8 via the I/O unit 210.
The I/O unit 210 is an interface that connects the PLC 209 and the auxiliary device 8 to each other. The I/O unit 210 transmits an instruction received from the PLC 209 to the auxiliary device 8.
The auxiliary device 8 is a device installed to the machine tool 1 and configured to perform an auxiliary operation in the machine tool 1. The auxiliary device 8 operates based on an instruction received from the I/O unit 210. The auxiliary device 8 may be a device installed in the periphery of the machine tool 1. The auxiliary device 8 is, for example, a tool exchanger, a cutting liquid injector, or an open/closure door drive device.
Next, functions of the numerical control device 2 will be described. The numerical control device 2 controls respective control axes of the machine tool 1 to move at least one of a tool and a workpiece. A workpiece is machined by relative motion of the tool and the workpiece.
For example, the storage unit 21 is implemented by various data being stored in the RAM 204 or the nonvolatile memory 205. For example, the corner detection unit 22, the first rate-planning unit 23, the instruction generation unit 24, the second rate-planning unit 25, the instruction rate generation unit 26, and the control unit 27 are implemented when the hardware processor 201 performs computation processing by using a system program stored in the ROM 203 and a machining program and various data stored in the nonvolatile memory 205.
The storage unit 21 stores a machining program. The machining program includes a turning program and a milling program. The machining program includes an instruction used for machining a corner part.
On the line of sequence No. N11, “G01 X150.0 Y100.0 F100.0;” is written. The part “G01” is a linear interpolation instruction. The part “F100.0” is a feed rate instruction. That is, the instruction written on the line of sequence No. N11 is an instruction to move the tool from the position of X100.0, Y100.0 to the position of X150.0, Y100.0 at a feed rate of 100.0 (mm/min) by cutting feed with linear interpolation. Note that “G01” is a modal instruction. The modal instruction refers to an instruction that is valid until another code included in the same group, such as G00, G02, and G03, is designated.
On the line of sequence No. N12, “X150.0 Y150.0” is written. Since “G01” is the modal instruction, “G01” is a valid instruction on the line of sequence No. N12. Therefore, the instruction written on the line of sequence No. N12 is an instruction to move a tool from the position of X150.0, Y100.0 to the position of X150.0, Y150.0 at a feed rate of 100.0 (mm/min) by cutting feed with linear interpolation.
The corner detection unit 22 detects, from a machining program, an instruction on a corner part where the direction of machining performed by a tool is changed discontinuously. The term “discontinuously” means that, when a function representing a motion path is differentiated, differential values are discontinuous, for example. The corner part is a portion where straight or curved motion paths intersect at a right angle, an acute angle, or an obtuse angle, for example. Once the machining program illustrated in
Based on an instruction on a corner part, the first rate-planning unit 23 generates a deceleration plan, which defines a feed rate of a control axis when the tool moves toward the corner part, and an acceleration plan, which defines a feed rate of the control axis when the tool moves away from the corner part.
The first rate-planning unit 23 generates a deceleration plan defining the feed rate on the X-axis. For example, the first rate-planning unit 23 generates a deceleration plan defining the feed rate on the X-axis based on values of a predetermined parameter representing the minimum acceleration and a predetermined parameter representing the minimum jerk. That is, the first rate-planning unit 23 generates a deceleration plan so that the acceleration and the jerk on the X-axis are not smaller than the minimum acceleration and the minimum jerk. Herein, the minimum acceleration and the minimum jerk are negative values.
The first rate-planning unit 23 generates an acceleration plan defining the feed rate on the Y-axis. For example, the first rate-planning unit 23 generates an acceleration plan defining the feed rate on the Y-axis based on values of a predetermined parameter representing the maximum acceleration and a predetermined parameter representing the maximum jerk. That is, the first rate-planning unit 23 generates an acceleration plan so that the acceleration and the jerk on the Y-axis are not larger than the maximum acceleration and the maximum jerk. Herein, the maximum acceleration and the maximum jerk are positive values.
Note that, when the tool moves at an angle relative to the X-axis direction and the Y-axis direction when moving toward a corner part and moving away from the corner part, the first rate-planning unit 23 generates deceleration plans defining feed rates on the X-axis and the Y-axis, respectively, and acceleration plans defining feed rates on the X-axis and the Y-axis, respectively. That is, a deceleration plan defining a feed rate in the X-axis direction, a deceleration plan defining a feed rate in the Y-axis direction, an acceleration plan defining a feed rate in the X-axis direction, and an acceleration plan defining a feed rate in the Y-axis direction are generated.
The instruction generation unit 24 overlaps a deceleration period specified by a deceleration plan and an acceleration period specified by an acceleration plan and thereby generates a curve instruction path representing a motion path of a tool and a first instruction rate information representing a first provisional feed rate of the tool on the curve instruction path.
Further, the instruction generation unit 24 combines a feed rate indicated by a deceleration plan and a feed rate indicated by an acceleration plan in the overlap section and thereby generates first instruction rate information indicating the first provisional feed rate. The first provisional feed rate is a rate in a tangential direction when a tool moves on a curve instruction path. Combining refers to adding. As described later, the first provisional feed rate will be a candidate of an actual feed rate when a tool actually moves and will not necessarily be used as the actual feed rate of the tool. Thus, the expression of “provisional” is used herein.
The instruction generation unit 24 overlaps the deceleration period and the acceleration period so that the difference between a path indicated by an instruction for a corner part designated by the machining program and the curve instruction path is within a predetermined range. Herein, the predetermined range is an allowable path error. The allowable path error is set in a parameter in advance.
The second rate-planning unit 25 generates second instruction rate information indicating a second provisional feed rate of a tool on a curve instruction path so that an acceleration on the curve instruction path generated by the instruction generation unit 24 is less than or equal to a predetermined allowable acceleration.
As described later, the second provisional feed rate will be a candidate of an actual feed rate when a tool actually moves and will not necessarily be used as the actual feed rate of the tool. Thus, the expression of “provisional” is used herein.
The acceleration on a curve instruction path is an acceleration occurring on a tool when the tool is moved on the curve instruction path, which is an acceleration occurring in the normal direction of the curve instruction path.
For example, when the curve instruction path is expressed by x=x(t), y=y(t), the radius of curvature of the curve instruction path is expressed by Equation 1 below.
Further, Equation 2 below is met, where the allowable acceleration is denoted as “a”.
Herein, v(t) is a rate in the tangential direction of the curve instruction path, that is, the second provisional feed rate. Further, Equation 3 below is found from Equation 2.
Accordingly, the second provisional feed rate is found.
For example, the allowable acceleration is an acceleration at a level that does not affect the quality of a machined surface. For example, the allowable acceleration is determined based on experiments performed in advance. The allowable acceleration may be set in a parameter in advance.
The instruction rate generation unit 26 generates third instruction rate information indicating an actual feed rate when a tool actually moves on a curve instruction path based on the first instruction rate information and the second instruction rate information. For example, the instruction rate generation unit 26 generates the third instruction rate information based on the smaller one of the first provisional feed rate and the second provisional feed rate.
Further, in other periods than the period from t1 to t2, the first provisional feed rate is less than the second provisional feed rate. Therefore, the instruction rate generation unit 26 generates the third instruction rate information so that the actual feed rate in other periods than the period from t1 to t2 is the first provisional feed rate (see
The instruction rate generation unit 26 may set the actual feed rate to the first provisional feed rate when the first provisional feed rate is less than or equal to the second provisional feed rate and may set the actual feed rate to a rate that is less than the first provisional feed rate and greater than or equal to the second provisional feed rate when the first provisional feed rate is greater than the second provisional feed rate.
Further, the instruction rate generation unit 26 may determine an actual feed rate indicated by the third instruction rate information based on Equation 4 below when the first provisional feed rate is greater than the second provisional feed rate.
Note that V3 is the actual feed rate, K is the interior division ratio, V1 is the first provisional feed rate, V2 is the second provisional feed rate, and 0≤K≤1. In such a case, when the interior division ratio is 0, the actual feed rate is the rate indicated by the second provisional feed rate. Further, when the first provisional feed rate and the second provisional feed rate match, the interior division ratio may be 1.
The instruction rate generation unit 26 may reduce the interior division ratio as being closer to the intermediate position on the curve instruction path and may increase the interior division ratio as being more distant from the intermediate position.
Note that the interior division ratio in Equation 4 above may be expressed by a predetermined polynomial. Further, the interior division ratio may be a predetermined constant.
The control unit 27 moves a tool along the curve instruction path based on an actual feed rate generated by the instruction rate generation unit 26.
Next, a flow of processes performed by the numerical control device 2 will be described.
In the numerical control device 2, first the corner detection unit 22 detects an instruction on a corner part from a machining program (step S1).
Next, the first rate-planning unit 23 generates a deceleration plan defining a feed rate of the control axis when a tool moves toward the corner part (step S2).
Next, the first rate-planning unit 23 generates an acceleration plan defining a feed rate of the control axis when the tool moves away from the corner part (step S3).
Next, the instruction generation unit 24 generates a curve instruction path representing a motion path of the tool (step S4).
Next, the instruction generation unit 24 generates the first instruction rate information indicating the first provisional feed rate of the tool on the curve instruction path (step S5).
Next, the second rate-planning unit 25 generates the second instruction rate information indicating the second provisional feed rate of the tool on the curve instruction path (step S6).
Next, the instruction rate generation unit 26 generates the third instruction rate information indicating an actual feed rate when the tool actually moves on the curve instruction path (step S7).
Next, the control unit 27 controls the control axes based on the machining program (step S8) and ends the process. The control unit 27 moves the tool along the curve instruction path based on the actual feed rate when controlling the control axes based on the machining program.
As described above, the control device includes: the corner detection unit 22 that detects, from a machining program, an instruction on a corner part where a direction of machining performed by a tool is changed discontinuously; the first rate-planning unit 23 that, based on the instruction, generates a deceleration plan defining a feed rate of a control axis when the tool moves toward the corner part and an acceleration plan defining a feed rate of the control axis when the tool moves away from the corner part; the instruction generation unit 24 that overlaps a deceleration period specified by the deceleration plan and an acceleration period specified by the acceleration plan to generate a curve instruction path, which represents a motion path of the tool, and first instruction rate information, which indicates a first provisional feed rate of the tool on the curve instruction path; the second rate-planning unit 25 that generates second instruction rate information indicating a second provisional feed rate of the tool on the curve instruction path so that an acceleration on the curve instruction path generated by the instruction generation unit 24 is less than or equal to a predetermined allowable acceleration; and the instruction rate generation unit 26 that, based on the first instruction rate information and the second instruction rate information, generates third instruction rate information indicating an actual feed rate when the tool actually moves on the curve instruction path. Further, the instruction rate generation unit 26 generates the third instruction rate information based on the smaller one of the first provisional feed rate and the second provisional feed rate. Therefore, the control device can suppress vibration from occurring near the corner part and stabilize the motion of respective control axes. As a result, the quality of the machined surface near the corner part is improved.
Further, the instruction rate generation unit 26 sets the actual feed rate to be the first provisional feed rate when the first provisional feed rate is less than or equal to the second provisional feed rate, and the instruction rate generation unit 26 sets the actual feed rate to be a rate that is less than the first provisional feed rate and greater than or equal to the second provisional feed rate when the first provisional feed rate is greater than the second provisional feed rate. In such a case, for example, the operator is able to determine the actual feed rate in accordance with the material of a workpiece or the like. Accordingly, the optimal machining conditions in accordance with the workpiece are selected, and the quality of the machined surface near the corner part is thus improved.
Further, when the first provisional feed rate is greater than the second provisional feed rate, the instruction rate generation unit 26 determines the actual feed rate based on Equation 4 described above. Also in such a case, the interior division ratio can be determined in accordance with the material of the workpiece or the like. As a result, machining conditions in accordance with the workpiece are selected, and the quality of the machined surface is thus improved.
Further, the interior division ratio may be reduced as being closer to an intermediate position on the curve instruction path and may be increased as being more distant from the intermediate position. In such a case, the actual feed rate can be made relatively larger in a portion having a relatively larger radius of curvature of the curve instruction path, and the actual feed rate can be made smaller in a portion having a relatively smaller radius of curvature of the curve instruction path. Thus, the actual feed rate can be set in accordance with the inertia force occurring on each control axis. As a result, the quality of the machined surface near the corner part is thus improved.
Further, the interior division ratio may be a predetermined constant. In such a case, the calculation equation for finding an actual feed rate is simplified, and the control device can relatively easily generate the third instruction rate information.
Further, the instruction generation unit 24 overlaps the deceleration period and the acceleration period so that the difference between a path indicated by the instruction on the corner part designated by the machining program and the curve instruction path is within a predetermined range. Thus, the control device can reduce the path error between a path designated by a machining program and an actual motion path of the tool.
In the embodiment described above, the example of machining a corner part formed such that the motion path along the X-axis and the motion path along the Y-axis intersect at a right angle has been described. However, the corner part may be of an acute angle or may be of an obtuse angle. Further, motion paths forming a corner part is not necessarily required to be paths along the X-axis and the Y-axis, respectively.
In the following, an example of a corner part formed such that motion paths intersect at an acute angle will be described.
The instruction generation unit 24 overlaps the feed rate in a direction along a control axis in the deceleration period and the feed rate in the direction along the control axis in the acceleration period. Herein, the direction along the control axis is the X-axis direction, for example. When the direction along the control axis is the X-axis direction, the instruction generation unit 24 overlaps the feed rate in the X-axis direction in the deceleration period and the feed rate in the X-axis direction in the acceleration period.
Furthermore, the instruction generation unit 24 generates a combined feed rate in the direction along a control axis in the overlap section. The combined feed rate refers to the sum of respective feed rates in the overlap section.
The instruction generation unit 24 further calculates an acceleration in the deceleration period and an acceleration in the acceleration period based on the feed rate in the deceleration period and the feed rate in the acceleration period, respectively.
The instruction generation unit 24 further estimates whether or not the combined acceleration exceeds a predetermined reference acceleration. The reference acceleration refers to an acceleration tolerated in the direction along a control axis. The reference acceleration is set to a value around which the machined surface of a workpiece is not adversely affected when the tool is moved at the reference acceleration. The reference acceleration is determined for each control axis.
If the combined acceleration obtained when the tool is moved in the direction along a control axis at the combined feed rate exceeds the reference acceleration, the instruction generation unit 24 adjusts a start timing of the acceleration period relative to the deceleration period so that the acceleration in the direction along the control axis does not exceed the reference acceleration.
A method of adjusting the start timing of the acceleration period relative to the deceleration period will now be described.
The instruction generation unit 24 calculates a feed rate in the deceleration period and a feed rate in the acceleration period based on the changed acceleration in the deceleration period and the changed acceleration in the acceleration period. When the acceleration in the deceleration period and the acceleration in the acceleration period have been changed to be smaller, the feed rate in the deceleration period and the feed rate in the acceleration period calculated by the instruction generation unit 24 will be as indicated by the diagram illustrated in
The instruction generation unit 24 may further calculate a jerk in the deceleration period and a jerk in the acceleration period based on the acceleration in the deceleration period and the acceleration in the acceleration period, respectively.
The instruction generation unit 24 further estimates whether or not the combined jerk exceeds a predetermined reference jerk. The reference jerk refers to a jerk tolerated in the direction along a control axis. The reference jerk is set to a value around which the machined surface of a workpiece is not adversely affected when the tool is moved at the reference jerk. The reference jerk is determined for each control axis.
If it is estimated that the combined jerk obtained when the tool is moved in the direction along the control axis based on the combined feed rate exceeds the reference jerk, the instruction generation unit 24 adjusts a start timing of the acceleration period relative to the deceleration period so that the jerk in the direction along the control axis does not exceed the reference jerk.
As illustrated in
The instruction generation unit 24 calculates a feed rate in the deceleration period and a feed rate in the acceleration period based on the changed jerk in the deceleration period and the changed jerk in the acceleration period. When the jerk in the deceleration period and the jerk in the acceleration period have been changed to be smaller, the feed rate in the deceleration period and the feed rate in the acceleration period calculated by the instruction generation unit 24 will be as indicated by the diagram illustrated in
The instruction generation unit 24 then overlaps the combined feed rate in the X-axis direction and the feed rate in the Y-axis direction to generate a curve instruction path representing the motion path of the tool and the first instruction rate information indicating the first provisional feed rate of the tool on the curve instruction path. The subsequent processes are the same as those in the embodiment described above.
Note that it is sufficient that the instruction generation unit 24 estimates at least any one of whether or not the combined acceleration exceeds the reference acceleration and whether or not the combined jerk exceeds the reference jerk.
The present disclosure is not limited to the embodiment described above and can be changed as appropriate within the scope not departing from the spirit. In the present disclosure, modification of any component of the embodiment or omission of any component of the embodiment is possible.
This is the U. S. National Phase application of PCT/JP2022/004766, filed Feb. 7, 2022, the disclosure of this application being incorporated herein by reference in its entirety for all purposes.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2022/004766 | 2/7/2022 | WO |