The present invention relates to a control device.
Conventionally, insufficient machining may occur in automatic operation of a machine tool. In such a case, there is a function of eliminating insufficient machining occurring in automatic operation by giving a movement amount externally and shifting the path of automatic operation (for example, refer to Patent Documents 1 and 2).
For example, when the machining point is changed by manual intervention, the apparatus described in Patent Document 1 maintains the coordinate value indicating the position of the machining point by reflecting the movement amount by manual intervention in the shift amount of the coordinate system. With such a configuration, the apparatus described in Patent Document 1 behaves as if there were no manual intervention and shifts the path of automatic operation.
However, the technology described in Patent Document 1 cannot deal with, for example, rotation of a table rotary shaft of a five-axis milling machine. Furthermore, the apparatus described in Patent Document 2 performs mounting error compensation of a workpiece. By performing similar processing as in Patent Document 2, it is conceivable to cause the shift direction in which the movement path of the automatic operation is shifted to follow the table rotation shaft according to the angle of the table rotation shaft.
However, in the conventional technology, the movement amount can be simply reflected externally only by a machine coordinate system as described in Patent Document 1 or a program coordinate system as described in Patent Document 2. That is, in the conventional technology, the movement amount cannot be reflected externally by another coordinate system. Furthermore, in the technology described in Patent Document 2, it is necessary to perform calculation for shifting the path of automatic operation in the interpolation processing.
Generally, in order to continuously control the machine tool, it is necessary for the numerical controller to continuously generate without interruption pulses generated by the interpolation process. For this reason, the interpolation processing is required to be completed within a certain period. Therefore, there is a demand for a control device capable of shifting a movement path of automatic operation with respect to any coordinate system in a machine configuration without increasing the calculation load of interpolation processing.
An aspect of the present disclosure relates to a control device including: a command analysis unit that analyzes a command including a machining program for machining a workpiece and outputs an analysis result including a program coordinate value; an interpolation unit that performs interpolation processing on the analysis result analyzed by the command analysis unit and generates a movement command of respective axes of a machine tool and/or a robot; a pulse generation unit that generates a drive pulse for driving the respective axes based on the movement command; a graph generation unit that generates a graph indicating a machine configuration of the machine tool and/or the robot; a shift addition node designation unit that designates any node of the graph, in order to add, to a node of the graph, shift information including an external movement amount externally inputted; a shift information setting unit that sets the shift information for a position offset and/or posture offset of the designated node based on the shift information; and a kinematics conversion unit that converts a program coordinate value included in the movement command to a motor coordinate value based on the position offset and/or the posture offset set in the node.
According to an aspect of the present invention, it is possible to shift the movement path of the automatic operation with respect to any coordinate system in the machine configuration without increasing the calculation load of the interpolation processing.
The control device 10 is communicably connected to the machine tool 20 and the robot 30, and controls the machine tool 20 and the robot 30. The control device 10 may be communicably connected to one of the machine tool 20 and the robot 30, and may control only one of the machine tool 20 and the robot 30.
That is, the control device 10 may be a control device that controls both the machine tool 20 and the robot 30. The control device 10 may function as a numerical control device for controlling the machine tool 20 or a robot control device for controlling the robot 30.
As shown in
Further, the control unit 100 includes a command analysis unit 101, an interpolation unit 102, a pulse generation unit 103, a servo control unit 104, a graph generation unit 105, a control point coordinate system insertion unit 106, a shift addition node designation unit 107, a shift information setting unit 108, and a kinematics conversion unit 109.
The storage unit 12 is a storage device such as a ROM (Read Only Memory) for storing an OS (Operating System), application programs, and the like, RAM (Random Access Memory), a hard disk drive for storing various other information, or a SSD (Solid State Drive). The storage unit 150 stores, for example, a system program, an application program, information related to a machine configuration tree generated by the graph generation unit 105, which will be described later, and the like.
The command analysis unit 101 analyzes a command including a machining program for machining a workpiece, and converts the command into an execution format. The command analysis unit 101 outputs the analysis result converted into the execution format to the interpolation unit 102. Here, the machining program is a program for automatically operating the machine tool 20 and/or the robot 30. The analysis result includes program coordinate values. The program coordinate value indicates one or more command values commanded in the program, and the program coordinate system indicates a coordinate system of one or more command values commanded in the program.
The interpolation unit 102 performs interpolation processing on the analysis result analyzed by the command analysis unit 101, and generates movement commands for each axis of the machine tool 20 and/or the robot 30. The generated movement command includes error compensation for each axis. The interpolation unit 102 outputs the generated movement command to the pulse generation unit 103.
Specifically, the interpolation unit 102 outputs the program coordinate values (i.e., the starting point and the ending point in the program coordinate system) included in the analysis result to the kinematics conversion unit 109, and receives the motor coordinate values (i.e., the starting point and the ending point in the motor coordinate system) converted by the kinematics conversion unit 109. Then, the interpolation unit 102 calculates a difference between the starting point and the ending point of the motor coordinate value, and outputs a movement command including the difference to the pulse generation unit 103.
The pulse generation unit 103 generates drive pulses for driving each axis of the machine tool 20 and/or the robot 30 based on the movement command generated by the interpolation unit 102. The pulse generation unit 103 outputs the generated drive pulse to the servo control unit 104.
The servo control unit 104 rotates the motors (not shown) of the respective axes in accordance with the drive pulses sent from the pulse generation unit 103. The servo control unit 104 indicates a servo control unit for each axis of the machine tool 20 and/or the robot 30. That is, as shown in
The graph generation unit 105 generates a graph indicating the machine configuration of the machine tool 20 and/or the robot 30. Specifically, the graph generation unit 105 generates a machine configuration tree 121 indicating the machine configuration of the machine tool 20 and/or the robot 30. Further, the graph generation unit 105 adds a node to the generated graph. Specifically, the graph generation unit 105 adds a node to the generated machine configuration tree 121. The detailed operation thereof will be described later in detail with reference to “3. Generation of Machine Configuration Tree”.
The control point coordinate system insertion unit 106 inserts a control point and a coordinate system into the graph of the machine configuration. The detailed operation will be described in the following “4. Automatic Insertion of Control Point and Coordinate Value”.
The shift addition node designation unit 107 designates any node in the graph in order to add shift information including an external movement amount externally inputted to the node of the graph generated by the graph generation unit 105. Here, the external movement amount indicates a movement amount externally inputted. For example, the external movement amount may be a movement amount between a starting point and an ending point of the tool position when the tool position of the machine tool 20 is moved by a handwheel. Alternatively, the shift information may be a movement amount generated by an operation other than the automatic operation by the machining program. For example, the shift information may be a value in which, when the tool position of the machine tool 20 is moved by the manual handle, an external movement amount moved by the handwheel is stored as a movement value of a certain coordinate system.
The shift information setting unit 108 sets the shift information for the position offset and/or the posture offset of the node designated by the shift addition node designation unit 107 based on the shift information.
The kinematics conversion unit 109 converts the program coordinate value included in the movement command into the motor coordinate value based on the position offset and/or the posture offset set in the node. With such a configuration, the kinematics conversion unit 109 can shift the motor coordinate value by the external movement amount by the shift information set in the position offset and/or the posture offset.
The graph generation unit 105 according to the embodiment of the present invention first generates the graph showing the machine configuration. A method of generating a machine configuration tree as an example of the graph will be described in detail with reference to
As the example, the method of generating the machine configuration tree indicating the configuration of a machine shown in
First, as shown in
Then, the axis names (axis types) of the individual axes, the names of the individual tools, the names of the individual workpieces, the names of the individual zero points and the physical axis numbers (axis types) of the individual axes are set. Then, the parent nodes (axis types) of the individual axes, the parent nodes of the individual tools and the parent nodes of the individual workpieces are set. Finally, the cross-offsets (axis types) of the individual axes, the cross-offsets of the individual tools and the cross-offsets of the individual workpieces are set. Consequently, the machine configuration tree shown in
Each node of the machine configuration tree is not limited to the pieces of information described above, and it may or may not have information related to, for example, an identifier (name), the identifier of the parent node of itself, the identifiers of all child nodes whose parents are itself, a relative offset (cross-offset) with respect to the parent node, a relative coordinate value with respect to the parent node, a relative movement direction (unit vector) with respect to the parent node, node types (linear axis/rotary axis/unit (which will be described later)/control point/coordinate system/zero point and the like), the physical axis number and the transformation formulas of an orthogonal coordinate system and a physical coordinate system.
As described above, values are set to the individual nodes, such that the graph generation unit 105 generates data which has a data structure in the shape of a machine configuration tree. Furthermore, even when another machine (or robot) is added, a zero point is added, and thus it is possible to further add nodes.
A flowchart obtained by generalizing the method of generating the machine configuration tree described above, in particular, the method of setting the values to the individual nodes is shown in
In Step S11, the graph generation unit 105 receives the value of a parameter set to the node. When in Step S12, the item of the set parameter is “parent node of itself” (yes in S12), the processing is transferred to Step S13. When the item of the set parameter is not “parent node of itself” (no in S12), the processing is transferred to Step S17.
When in Step S13, a parent node has already been set to the node to which the parameter is set (yes in S13), the processing is transferred to Step S14. When a parent node has not been set (no in S13), the processing is transferred to Step S15.
In Step S14, the graph generation unit 105 deletes the identifier of itself from the item of “child node” possessed by the current parent node of the node to which the parameter is set so as to update the machine configuration tree.
In Step S15, the graph generation unit 105 sets the value to the corresponding item of the node to which the parameter is set.
In Step S16, the graph generation unit 105 adds the identifier of itself to the item of “child node” in the parent node so as to update the machine configuration tree, and thereafter the flow is completed.
In Step S17, the graph generation unit 105 sets the value to the corresponding item of the node to which the parameter is set, and thereafter the flow is completed.
The method of generating the data having the data structure in the shape of the machine configuration tree described above is used, and thus it is possible to set a parent-child relationship of the constituent elements of the machine. Here, the parent-child relationship refers to a relationship in which, for example, when as shown in
As described above, a mechanism in which a variation in a certain node affects the other node is regarded as one unit in terms of convenience, this unit is inserted into the machine configuration tree and thus the entire machine configuration tree is generated. As shown in
The unit indicating this machine configuration has a homogeneous transformation matrix such as T in the mathematical formula of [Formula 1] described above. The homogeneous matrix refers to a 4×4 matrix which can collectively represent the position and the posture as in the mathematical formula of [Formula 2] below.
Even when the parent-child relationship is not mutual, in order for calculation processing or a setting to be simplified, a unit in which a plurality of nodes are previously integrated into one may be defined and configured into the machine configuration tree.
As described above, in the present embodiment, the graph of the machine configuration can include, as a constituent element, a unit in which a plurality of axes are integrated into one.
In order to specify, as the control points, various positions on the machine configuration and set coordinate systems in various places on the machine configuration, the following method is performed by use of the machine configuration tree generated in “3. Generation of machine configuration tree” described above.
For example, in a rotary index machine 350 shown in FIG. 11A, an X1 axis is set perpendicular to a Z1 axis, and a tool 1 is installed in the X1 axis. An X2 axis is set perpendicular to a Z2 axis, and a tool 2 is installed on the X2 axis. Furthermore, it is assumed that in a table, on a C axis, a C1 axis and a C2 axis are set in parallel, and in the C1 axis and the C2 axis, a workpiece 1 and a workpiece 2 are respectively installed. When this machine configuration is represented by a machine configuration tree, the machine configuration tree shown in
In an example of a series of nodes leading from individual workpieces to the machine zero point, as shown in
As shown in
A flowchart obtained by generalizing the method of automatically inserting the control point described above is shown in
The chart A will first be described. In Step S21, the graph generation unit 105 sets a machine configuration tree. In Step S22, the chart B is performed, and the flow of the chart A is completed.
The chart B will then be described. In Step S31 of the chart B, when the control point and the coordinate system have been inserted into the node (yes in S31), the flow is completed. When the control point and the coordinate system have not been inserted into the node (no in S31), the processing is transferred to Step S32.
In Step S32, the control point coordinate system insertion unit 106 inserts the control point and the coordinate system into the node, and stacks a variable n by 1. A setting is made such that n=1.
In Step S33, when the nth child node is present in the node (yes in S33), the processing is transferred to Step S34. When the nth child node is not present in the node (no in S33), the processing is transferred to Step S36.
In Step S34, on the nth child node, the chart B itself is performed in a recursive manner.
In Step S35, n is incremented by 1. In other words, the increment is performed such that n=n+1, and the processing is returned to Step S33.
In Step S36, the variable n is popped by 1, and the flow of the chart B is completed.
By the method described above, the control point coordinate system insertion unit 106 inserts, as nodes, the control points and the coordinate systems into the individual nodes of the graph in the machine configuration. Although in the above description, the example where the control points and the coordinate systems are added as nodes is described, an embodiment is also possible in which as shown in
In Step S42, the command analysis unit 101 analyzes a command including a machining program for machining a workpiece, and converts the command into an execution format. The command analysis unit 101 outputs the analysis result including the program coordinate value to the interpolation unit 102.
In Step S43, the shift addition node designation unit 107 designates any node in the graph in order to add the shift information including the externally inputted external movement amount to the node of the graph generated by the graph generation unit 105.
In Step S44, the shift information setting unit 108 sets the shift information for the position offset and/or the posture offset of the node designated by the shift addition node designation unit 107 based on the shift information.
In Step S45, the interpolation unit 102 performs interpolation processing on the analysis result analyzed by the command analysis unit 101. Further, the interpolation unit 102 outputs program coordinate values included in the analysis result to the kinematics conversion unit 109.
In Step S46, the kinematics conversion unit 109 converts the program coordinate value into a motor coordinate value based on the program coordinate value outputted from the interpolation unit 102 and the position offset and/or posture offset set in the node. Further, the kinematics conversion unit 109 outputs the converted motor coordinate value to the interpolation unit 102.
In Step S47, the interpolation unit 102 receives the motor coordinate value outputted from the kinematics conversion unit 109, and calculates a difference between the starting point and the ending point of the motor coordinate value.
In Step S48, the interpolation unit 102 transmits a movement command including the calculated difference to the pulse generation unit 103.
In Step S49, the pulse generation unit 103 generates drive pulses for operating each axis of the machine tool 20 and/or the robot 30 based on the movement command generated by the interpolation unit 102. Thereafter, the servo control unit 104 rotates the motors of the respective axes in accordance with the drive pulses sent from the pulse generation unit 103. With such a configuration, it is possible for the control device 10 to rotate the motors of the respective axes of the machine tool 20 and/or the robot 30 in a state where the external movement amount is added.
According to the present embodiment, the control device 10 includes: the command analysis unit 101 that analyzes a command including a machining program for machining a workpiece and outputs an analysis result including a program coordinate value; the interpolation unit 102 that performs interpolation processing on the analysis result analyzed by the command analysis unit 101 and generates a movement command of each axis of the machine tool 20 and/or the robot 30; the pulse generation unit 103 that generates a drive pulse for driving the each axis based on the movement command; the graph generation unit 105 that generates a graph indicating a machine configuration of the machine tool 20 and/or the robot 30; the shift addition node designation unit 107 that designates any node of the graphs, in order to add, to a node of the graph, shift information including an external movement amount externally inputted; the shift information setting unit 108 that sets the shift information for a position offset and/or posture offset of the designated node based on the shift information; and the kinematics conversion unit 109 that converts a program coordinate value included in the movement command to a motor coordinate value based on the position offset and/or the posture offset set in the node.
Thus, the control device 10 can shift the path of automatic operation (for example, the tool movement path) with respect to any coordinate system on the machine configuration of the machine tool 20 and/or the robot 30 without increasing the calculation load of the interpolation processing.
The five-axis milling machine 20a includes a bed 21, a pair of column portions 22, 22 erected on the bed 21, and a rail portion 23 which connects upper end portions of the column portions 22, 22 to each other and extends in the lateral direction. A tool head 24 is attached to the rail portion 23.
The five-axis milling machine 20a has, as linear axes, an X-axis along the surface direction of the bed 21 and along the length direction of the rail portion 23, a Y-axis along the surface direction of the bed 21 and orthogonal to the length direction of the rail portion 23, and a Z-axis perpendicular to the surface direction of the bed 21. The tool head 24 is provided so as to be linearly movable along the three axes of the X-axis, the Y-axis, and the Z-axis. At the lower end of the tool head 24, a tool 25 serving as a moving shaft member projects downward along the Z-axis direction.
On the bed 21 of the five-axis milling machine 20a, a mounting portion 26 for mounting a workpiece W to be machined and rotating the workpiece W around the C-axis, and a turntable 27 for rotating the mounting portion 26 around the A-axis along the X-axis direction are provided. The C-axis is disposed parallel to the Z-axis direction when the mounting portion 26 is disposed perpendicular to the Z-axis (when the rotation angle of the turntable 27 is 0°). The two axes of the A-axis and the C-axis in the five-axis milling machine 20a are disposed adjacent to the workpiece W, and are rotary axes that determine tool directions, which are relative directions of the tool 25 with respect to the workpiece W by rotation.
The machine configuration tree G indicating the configuration of the machine of the five-axis milling machine 20a is generated by the graph generation unit 105 as a graph as shown in
The shift information setting unit 108 of the control device 10 according to the present embodiment sets the shift information with the position P1 for the node C in such a machine configuration tree G. With such a configuration, it is possible for the control device 10 to reflect the external movement amount of the turntable 27 on the table coordinate system, thereby allowing the external movement amount to follow the rotation of the turntable 27.
Further, the shift information setting unit 108 sets the shift information with the position P2 for the node R in such a machine configuration tree G. With such a configuration, it is possible for the control device 10 to reflect the external movement amount of the five-axis milling machine 20a on the machine coordinate system, thereby preventing the external movement amount from following the rotation of the turntable 27.
As described above, it is possible for the control device 10 according to the present embodiment to switch which coordinate system of the machine tool 20 the external movement amount is made to follow depending on which node the position belongs that the shift information is set to. With such a configuration, it is possible for the control device 10 to realize a desired external movement amount in the machine tool 20, i.e., a desired tool tip point path.
Hereinafter, application examples 1 to 3 to which the control device 10 according to the present embodiment is applied to the machine tool 20 and/or the robot 30 will be described. In application example 1, the control device 10 controls the five-axis milling machine 20a shown in
As in
The shift information calculation unit 110 calculates shift information including an external movement amount in the program coordinate system. For example, the shift information calculation unit 110 calculates the shift information based on the motor coordinate value of the five-axis machining machine 20a. For example, the shift information calculation unit 110 holds the accumulated value of the interpolation pulses in the motor coordinate system outputted from the interpolation unit 102 to the pulse generation unit 103. Here, the interpolation pulse corresponds to an external movement. Further, the shift information calculation unit 110 converts the accumulated value of the interpolation pulses into a program coordinate system and sets the program coordinate system as shift information.
Then, as shown in
In order to consider such a difference between workpiece positions, the control device 10 according to the present embodiment sets the shift information for the position offset and/or the posture offset of the node WS as described above, and calculates the difference between the program coordinate value and the motor coordinate value. With such a configuration, it is possible for the control device 10 to perform a desired machining in the five-axis milling machine 20a by externally moving the workpiece by the difference between the desired workpiece position and the actual workpiece position.
In application example 2, the shift information refers to an external movement amount from the outside in the motor coordinate system. The shift addition node designation unit 107 designates a plurality of the motor coordinate system nodes A, Z, Y, X, and C indicating the motor coordinate system of each axis in the machine configuration tree G2. The shift information setting unit 108 sets the shift information for the plurality of position offsets and/or posture offsets of a root node AS of the node A, a root node ZS of the node Z, a root node YS of the node Y, a root node XS of the node X, and a root node CS of the node C in the motor coordinate system.
In order to consider the difference between the angles of the A-axis, the control device 10 according to the present embodiment sets the shift information for the position offset and/or the posture offset of the root node AS of the motor coordinate system node A as described above, and calculates the difference between the program coordinate value and the motor coordinate value. With such a configuration, it is possible for the control device 10 to execute the machining program using a desired tool direction in the five-axis milling machine 20a by externally moving the difference between the desired angle of the A-axis and the actual angle of the A-axis.
As shown in
In this way, when the external movement amount is given based on the measurement result of the external measuring device 50, it can be easily determined that the external movement amount should be maintained in the world coordinate system. In such a case, it is not necessary for an operator to consciously designate the additional shift node.
Although the embodiments of the present invention have been described above, the above-described control device 10 can be implemented by hardware, software, or a combination thereof. The control method performed by the control device 10 can also be implemented by hardware, software, or a combination thereof. Here, “implemented by software” means that it is realized by a computer reading and executing a program.
The program may be stored and provided to a computer using various types of non-transitory computer-readable media (non-transitory computer readable medium). Non-transitory computer-readable media includes 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-ROM (Read Only Memory), CD-Rs, CD-R/W, semiconductor memory (for example, mask ROM, PROM (Programmable ROM), EPROM (Erasable PROM), flash ROM, and RAM (random access memory)).
Although the above-described embodiments are preferred embodiments of the present invention, the scope of the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the gist of the present invention.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2021/020357 | 5/28/2021 | WO |