Control device, control method, and computer program product
By using a control device to judge and update the reference value in a timely manner, the problem of balancing productivity and machining accuracy in machine tools is solved, and the simultaneous improvement of productivity and accuracy is achieved.
Patent Information
- Application Number
- CN202511195147.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-08-27
- Filing Date
- 2025-08-26
- Publication Date
- 2026-03-06
AI Technical Summary
Existing technologies make it difficult to simultaneously improve productivity and machining accuracy in machine tools. Too high a measurement frequency leads to low productivity, while too low a frequency fails to improve machining accuracy.
The control device determines whether to perform position measurement, and the measurement frequency is determined based on the reference value stored in the reference value storage unit. The reference value is updated in a timely manner to reflect the actual condition of the machine tool, reduce invalid measurements, and improve productivity and machining accuracy.
It achieves improved machining accuracy without reducing productivity. By switching between updating and not updating the reference value, it avoids measurement frequency misalignment caused by the reference value being too small or too large, thus improving the overall performance of the machine tool.
Smart Images

Figure CN121607971A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to control devices, control methods, and computer program products. Background Technology
[0002] A machine tool may include a spindle, a support section, and a drive section. The spindle has a tool mounted on it in a detachable manner. The support section supports the workpiece. The drive section moves the support section relative to the spindle by driving either the spindle or the support section. The tool mounted on the spindle processes the workpiece supported by the support section.
[0003] Components constituting a machine tool may experience thermal displacement. To eliminate the adverse effects of thermal displacement and improve machining accuracy, it is necessary to periodically adjust the drive quantity of the drive unit. The control unit performs position measurements of the spindle or support unit and calculates a correction value for the drive quantity of the drive unit based on the measurement results. For example, Patent Document 1 mentions such a control device.
[0004] Patent Document 1: Japanese Patent Application Publication No. 2021-160004 Summary of the Invention
[0005] To calculate correction values, the position of the spindle or support needs to be measured. However, the measurement itself does not directly contribute to the machining of the workpiece; therefore, the higher the measurement frequency, the lower the productivity. To improve productivity, the measurement frequency can be reduced. However, if the measurement frequency is too low, it will be impossible to improve machining accuracy.
[0006] The purpose of this invention is to provide a control device, control method, and computer program product that can simultaneously improve productivity and processing accuracy.
[0007] To achieve the above objectives, the present invention provides a control device for controlling the movement of a machine tool. The machine tool includes a spindle capable of mounting and detaching tools for machining workpieces and a support for supporting the workpieces. The control device includes: a reference value storage unit for storing reference values; and a control unit that uses the reference values stored in the reference value storage unit to determine whether to perform a measurement of the position of the spindle or the support. When it is determined that the measurement should be performed, the control unit performs the measurement, calculates variables used in the movement control of the machine tool based on the measurement results, and determines whether to update the reference values after the measurement is performed. When it is determined that an update should be performed, the control unit calculates the reference values and stores the calculation results in the reference value storage unit.
[0008] The machine tool of the present invention includes a spindle and a support. The spindle is capable of mounting and removing a tool for machining a workpiece. The support supports the workpiece. The machine tool performs machining on the workpiece supported by the support using the tool mounted on the spindle.
[0009] The control device has a reference value storage unit and a control unit for controlling the operation of the machine tool.
[0010] The baseline value storage unit stores the baseline value.
[0011] The measurement of the position of the spindle or support will be referred to as "position measurement".
[0012] The control unit uses the reference values stored in the reference value storage unit to determine whether to perform a position measurement.
[0013] When it is determined that position measurement should not be performed, the control unit does not perform position measurement. Therefore, the execution frequency of position measurement is reduced, and productivity is increased.
[0014] When a position measurement is determined to be required, the control unit performs the measurement and calculates variables used in the machine tool's motion control based on the measurement results. By calculating variables based on the position measurement results, the actual condition of the machine tool (e.g., thermal displacement) can be reflected in the calculated variables. The control unit uses the calculated variables to control the machine tool's movements, thereby improving machining accuracy.
[0015] After the position measurement is performed, the control unit determines whether to update the reference value.
[0016] When it is determined that the reference value needs to be updated, the control unit calculates the reference value and stores the calculation result in the reference value storage unit. Because the control unit updates the reference value in a timely manner, the reference value used as the basis for determining whether to perform a position measurement is not fixed.
[0017] On the other hand, when it is determined that the reference value does not need to be updated, the control unit does not update the reference value. This avoids unnecessary updates of the reference value by the control unit and reduces the load on the control unit.
[0018] By switching between updating and not updating the reference value, it is possible to suppress the excessively high execution frequency of position measurement due to an excessively small reference value, and the excessively low execution frequency of position measurement due to an excessively large reference value. This allows for a balance between improving productivity and increasing machining accuracy.
[0019] In the control device of the present invention, when the control unit determines whether to update the reference value, it determines whether to update the reference value based on a comparison result between the time elapsed since the last time the reference value was updated and a predetermined value.
[0020] In this invention, when determining whether to update the reference value, the control unit makes the decision based on a comparison between the elapsed time and a predetermined value. The elapsed time is the time elapsed since the last update of the reference value.
[0021] It is easy to time (or calculate) the elapsed time. Comparing the elapsed time with a reference value is also easy. Therefore, the load on the control unit can be reduced.
[0022] When a long period of time has elapsed since the baseline value was updated, significant changes may occur, such as in the thermal displacement of a machine tool. Therefore, updating the baseline value is of practical significance.
[0023] When the time interval is short, updating the baseline value again is meaningless because it has just been updated. Furthermore, in cases where the baseline value is calculated based on historical information of measurements of physical quantities related to the machine tool, if the measurement interval is too short, the negative impact of measurement errors contained in each measurement may lead to inappropriate calculation results for the baseline value.
[0024] In the control device of the present invention, the control unit calculates the reference value based on the measurement result when the reference value was last updated and the measurement result of the current time.
[0025] In this invention, in order to update the reference value, the control unit calculates the reference value based on the results of two position measurements. By calculating the reference value based on the results of two position measurements, the calculation result can reflect the actual condition of the machine tool (e.g., thermal displacement condition). The results of the two position measurements refer to the result of the position measurement at the time of the last reference value update and the result of the current position measurement.
[0026] In the control device of the present invention, when the machine tool starts or a predetermined time has elapsed from the machine tool stopping to restarting, and a measurement command to perform the measurement is received, the control unit performs the measurement without determining whether to perform the measurement, initializes the reference value stored in the reference value storage unit without determining whether to update the reference value, and when a new measurement command is received after the reference value is initialized, the control unit determines whether to perform the measurement. When it is determined that the measurement should be performed, the control unit performs the measurement. After the measurement is performed, it determines whether to update the reference value based on the comparison result between the time elapsed since the initialization of the reference value and the predetermined value. When it is determined that an update should be performed, the reference value is calculated based on the result of the measurement when the reference value was initialized and the result of the current measurement.
[0027] In this invention, the control unit receives measurement instructions for performing position measurements. For example, the control unit controls the machine tool's operation based on a machining program containing the measurement instructions, and receives the measurement instructions by reading the measurement instructions contained in the machining program.
[0028] When the machine tool is started, there is no reference value that reflects the actual condition of the machine tool.
[0029] Therefore, after the machine tool starts, when the control unit receives a measurement command, it directly performs the position measurement without determining whether to do so. Furthermore, the control unit does not determine whether to update the reference value, but directly initializes the reference value stored in the reference value storage unit. The initialized reference value is preferably one that ensures the control unit will definitely determine whether to perform the position measurement.
[0030] Upon receiving a new measurement command after initializing the reference value, the control unit determines whether to perform a position measurement. If the determination is to perform a position measurement, the control unit performs the measurement. After the position measurement is performed, the control unit determines whether to update the reference value based on a comparison between the time elapsed since the reference value was initialized and a predetermined value.
[0031] When it is determined that the reference value needs to be updated, the control unit calculates the reference value based on the position measurement results at the time of reference value initialization and the current position measurement results.
[0032] That is, the reference value is calculated based on the results of two position measurements after the machine tool is started, thus enabling the calculation results to reflect the actual condition of the machine tool.
[0033] On the other hand, if a specified time has elapsed between the machine tool's shutdown and restart, the actual condition (e.g., temperature) of the machine tool before and after shutdown may differ significantly due to the extended period. In such cases, the baseline values calculated before shutdown may not accurately reflect the actual condition of the machine tool after restarting.
[0034] Therefore, after a specified period of time has elapsed since the machine tool stopped operating, similar to when the machine tool is started, the control unit, upon receiving the measurement command, does not determine whether to perform position measurement but directly performs the position measurement. Furthermore, the control unit does not determine whether to update the reference value but directly initializes the reference value stored in the reference value storage unit.
[0035] After the reference value is initialized, the control unit calculates the reference value based on the results of two position measurements performed after the machine tool restarts. The results of position measurements performed before the machine tool stopped are not used when calculating the reference value; therefore, the calculation results reflect the actual condition of the machine tool.
[0036] To achieve the above objectives, the present invention also provides a control method for controlling the movement of a machine tool, the machine tool having a spindle capable of mounting and detaching tools for machining workpieces and a support for supporting the workpieces, the control method comprising: using a reference value to determine whether to perform a measurement of the position of the spindle or the support; when it is determined that the measurement should be performed, performing the measurement; calculating variables used in the movement control of the machine tool based on the measurement result; and after the measurement is performed, determining whether to update the reference value; when it is determined that an update should be performed, updating the reference value.
[0037] In this invention, by switching between updating and not updating the reference value used when determining whether to perform position measurement, it is possible to suppress the excessively high execution frequency of position measurement due to an excessively small reference value, and the excessively low execution frequency of position measurement due to an excessively large reference value. Thus, both increased productivity and improved machining accuracy can be achieved.
[0038] To achieve the above objectives, the present invention also provides a computer program product for controlling the movement of a machine tool, the machine tool having a spindle capable of mounting and detaching tools for machining workpieces and a support for supporting the workpieces, the computer program product being configured to cause a computer to perform the following processing: using the reference values stored in a reference value storage unit for storing reference values to determine whether to perform a measurement of the position of the spindle or the support; when it is determined that the measurement should be performed, performing the measurement; calculating variables used in the movement control of the machine tool based on the measurement results; after the measurement is performed, determining whether to update the reference values; when it is determined that an update should be performed, calculating the reference values and storing the calculation results in the reference value storage unit.
[0039] In this invention, the control method can be implemented in software using computer hardware.
[0040] Computer-readable recording media storing the aforementioned computer program (program product) are also included in this invention.
[0041] The control device, control method, and computer program product of the present invention can achieve both increased productivity and improved processing accuracy. Attached Figure Description
[0042] Figure 1 This is a schematic perspective view of a machine tool equipped with the control device according to an embodiment of the present invention.
[0043] Figure 2 This is a block diagram showing the main components of the control device.
[0044] Figure 3 This is a schematic diagram of the X-axis moving mechanism.
[0045] Figure 4 This is a schematic diagram illustrating the measurement of the location of the object being measured.
[0046] Figure 5 It is a flowchart illustrating the process of executing a processing procedure by the control device.
[0047] Figure 6 It is a flowchart illustrating the process of executing a processing procedure by the control device.
[0048] Figure 7 This is a flowchart illustrating the process of the control device performing a measurement and determination procedure.
[0049] Figure 8 This is a flowchart illustrating the reference value update process performed by the control device.
[0050] Figure 9 This is a flowchart illustrating the reference value update process performed by the control device. Detailed Implementation
[0051] The embodiments of the present invention will be described below. In the following description, the directions of up / down, front / back, and left / right as indicated by the arrows in the figures are used. The directions shown in the figures are for illustrative purposes only and are not limited to these.
[0052] Figure 1 This is a schematic perspective view of a machine tool 1 equipped with the control device 3 of this embodiment.
[0053] Machine tool 1 includes a base 11, a column 12, and a worktable 13. The base 11 is placed on the ground. The column 12 extends upward from the rear side of the upper part of the base 11. The worktable 13 is located on the front side of the upper part of the base 11 and is a support for supporting the workpiece 22.
[0054] Machine tool 1 includes a Y-axis moving mechanism 14 and an X-axis moving mechanism 15. A base 11 supports the Y-axis moving mechanism 14. The Y-axis moving mechanism 14 supports the X-axis moving mechanism 15 in such a way that the X-axis moving mechanism 15 can move in the Y-axis direction (front-back direction). The X-axis moving mechanism 15 supports the worktable 13 in such a way that the worktable 13 can move in the X-axis direction (left-right direction). Through the Y-axis moving mechanism 14 and the X-axis moving mechanism 15, the worktable 13 can move in both the Y-axis and X-axis directions. The worktable 13 does not move in the Z-axis direction.
[0055] Machine tool 1 includes a spindle head 16 and a Z-axis moving mechanism 17. The spindle head 16 is located in front of the column 12 and above the worktable 13. The column 12 supports the Z-axis moving mechanism 17. The Z-axis moving mechanism 17 supports the spindle head 16 in such a way that the spindle head 16 can move in the Z-axis direction (vertical direction). The spindle head 16 can move in the Z-axis direction via the Z-axis moving mechanism 17. The spindle head 16 does not move in the Y-axis or X-axis directions.
[0056] The present invention is not limited to the above structure. For example, the worktable 13 can be moved in the X-axis direction, and the spindle head 16 can be moved in the Y-axis direction and the Z-axis direction.
[0057] The machine tool 1 includes a control device 3. The control device 3 is located on the back of the column 12.
[0058] Figure 2 This is a block diagram showing the main components of the control device 3.
[0059] The control device 3 is a computer, including a main storage unit 31, an auxiliary storage unit 32, a control unit 33, a first timer 34 and a second timer 35, and a clock 36.
[0060] The main storage unit 31 is a volatile memory, such as RAM (Random Access Memory).
[0061] The auxiliary storage unit 32 is a non-volatile memory, including ROM (Read Only Memory), flash memory, hard disk or SSD (Solid State Drive), etc.
[0062] The auxiliary storage unit 32 stores the program 37 (computer program) and various data (variables and constants, etc.) required for executing the program 37. The program 37 stored in the main storage unit 31 can be installed from a recording medium 20 such as an optical disc, flash memory, or hard disk, or it can be installed from a server via a network. The program 37 includes the control program for the machine tool 1 created by the manufacturer of the machine tool 1, and the machining program 371 for the workpiece 22 created by the user of the machine tool 1. The control program for the machine tool 1 includes a program for implementing the control method of the present invention. In the machining program 371, multiple instructions to the control device 3 are arranged in execution order.
[0063] The constants stored in the auxiliary storage unit 32 include the constants Ta, Tb, Tc, and Td, which will be described later. The auxiliary storage unit 32 can store the default constants Ta, Tb, Tc, and Td, or it can store the constants Ta, Tb, Tc, and Td that are determined by the user.
[0064] The control unit 33 includes one or more processors, such as a CPU (Central Processing Unit) or an MPU (Microprocessor). The control unit 33 uses the main memory 31 as its working area and performs various arithmetic and control operations based on the program 37 stored in the auxiliary memory 32. The control unit 33 may also include logic circuitry (e.g., an FPGA).
[0065] Multiple processes can be executed by a single processor of the control unit 33, or they can be executed in a distributed manner by multiple processors of the control unit 33. The processor executing a certain process can exist independently of the processors executing other processes.
[0066] The first timer 34 and the second timer 35 keep track of the time from start to stop, respectively. The control unit 33 controls the start and stop of the first timer 34 and the second timer 35.
[0067] Clock 36 outputs the current time.
[0068] The Y-axis moving mechanism 14 has a Y-axis motor 141. The worktable 13 moves in the Y-axis direction by rotating the Y-axis motor 141 forward or backward.
[0069] The X-axis moving mechanism 15 has an X-axis motor 151. The worktable 13 moves in the X-axis direction by rotating the X-axis motor 151 forward or backward.
[0070] The Z-axis moving mechanism 17 has a Z-axis motor 171. The spindle head 16 moves in the Z-axis direction by rotating the Z-axis motor 171 forward or backward.
[0071] The spindle head 16 and the worktable 13 move relative to each other in the Y-axis, X-axis, and Z-axis directions, respectively, driven by the Y-axis motor 141, X-axis motor 151, and Z-axis motor 171. Hereinafter, without distinguishing between the Y-axis motor 141, X-axis motor 151, and Z-axis motor 171, they will be collectively referred to as the drive unit. The control unit 33 controls the operation of each drive unit.
[0072] The spindle head 16 includes a spindle 161 and a spindle motor 162. The spindle 161 is located at the lower part of the spindle head 16. The spindle motor 162 is located at the upper part of the spindle head 16 (see reference). Figure 1 As the spindle head 16 moves, the spindle 161 and the spindle motor 162 also move accordingly.
[0073] The spindle 161 extends axially in the vertical direction. The tool 21 is mounted on the spindle 161 in a removable manner. The spindle 161 rotates about its axis by being driven by the spindle motor 162. The tool 21 mounted on the spindle 161 rotates together with the spindle 161. The control unit 33 controls the operation of the spindle motor 162.
[0074] The tool 21 includes milling tools, drilling tools, and measuring tools. When the spindle 161 is equipped with the machining tool 21, the rotating tool 21 performs machining on the workpiece 22 supported by the worktable 13.
[0075] The control unit 33 receives each instruction by sequentially reading the instructions contained in the machining program 371. When the control unit 33 executes an instruction, the machine tool 1 performs the action corresponding to the instruction. On the other hand, when the control unit 33 omits an instruction, the machine tool 1 does not perform the action corresponding to the instruction.
[0076] The machining program 371 includes machining instructions, start instructions, end instructions, movement instructions, and measurement instructions. The control unit 33, which executes the machining instructions, controls the movement of the machine tool 1 to machine the workpiece 22. The start instruction indicates the start of the execution of the machining program 371, and the end instruction indicates the end of the execution of the machining program 371.
[0077] Machine tool 1 includes a tool changing device 4. The tool changing device 4 includes a tool magazine motor 41 and a tool magazine 42, used to change the tool 21 mounted on the spindle 161. The control unit 33 controls the operation of the tool magazine motor 41, and the tool magazine 42 rotates as driven by the tool magazine motor 41.
[0078] like Figure 1 As shown, the tool magazine 42 is located in front of the column 12 and above the worktable 13 to avoid interference with the spindle head 16. Support plates 121 extend forward from the upper left and right sides of the column 12. A pedestal 122, located at the front end of the two support plates 121, rotatably supports the tool magazine 42. Multiple tools 21 are detachably mounted on the tool magazine 42. The multiple tools 21 in the tool magazine 42 are arranged in the direction of rotation of the tool magazine 42. A tool magazine motor 41 is located near the tool magazine 42.
[0079] When the spindle 161, on which the tool 21 is mounted, rises away from the worktable 13 due to the movement of the spindle head 16, the tool magazine 42 receives the tool 21 mounted on the spindle 161 at the tool changing position. The tool magazine motor 41 delivers the desired tool 21 to the tool changing position by rotating and moving the multiple tools 21 held in the tool magazine 42. When the spindle 161, on which the tool 21 is mounted, descends and approaches the worktable 13 due to the movement of the spindle head 16, the tool magazine 42 mounts the tool 21 located at the tool changing position onto the spindle 161. Hereinafter, when distinguishing the measuring tool 21 from other types of tools 21, the measuring tool will be referred to as measuring tool 211.
[0080] Figure 3 This is a schematic diagram of the X-axis moving mechanism 15. Figure 3 In the diagram, the worktable 13 and the Y-axis moving mechanism 14 are shown in a simplified manner.
[0081] In addition to the X-axis motor 151, the X-axis moving mechanism 15 also includes two bearings 152, a screw shaft 153, a nut 154, and a support platform 155.
[0082] Bearing 152 is mounted on the upper part of the support body 156, which stands upright above the Y-axis moving mechanism 14. Two bearings 152 are adjacent in the left-right direction. Each bearing 152 is located at the middle of the screw shaft 153 in the length direction, supporting the screw shaft 153 in a circumferentially rotatable manner. An X-axis motor 151 is connected to one end of the screw shaft 153. A nut 154 is fitted onto the middle of the screw shaft 153 and is movable along the screw shaft 153 in the left-right direction. As the X-axis motor 151 rotates, the screw shaft 153 rotates circumferentially. As the screw shaft 153 rotates circumferentially, the nut 154 moves along the screw shaft 153 in the left-right direction.
[0083] A support platform 155 supports the worktable 13. The upper part of the Y-axis moving mechanism 14 is provided with a track (not shown) extending in the left-right direction. Guided by the track, the support platform 155 can move together with the worktable 13 in the left-right direction. A nut 154 is connected to the support platform 155. The nut 154, moving in the left-right direction, applies an external force in the left-right direction to the support platform 155. Due to the external force received from the nut 154, the support platform 155 and the worktable 13 move in the left-right direction.
[0084] The screw shaft 153 and nut 154 preferably adopt a ball screw structure.
[0085] The structure of the Y-axis moving mechanism 14 is largely the same as that of the X-axis moving mechanism 15. However, in the Y-axis moving mechanism 14, the component corresponding to the support 156 rises from the top of the base 11. Furthermore, in the Y-axis moving mechanism 14, the component corresponding to the screw shaft 153 extends in the front-rear direction.
[0086] The structure of the Z-axis moving mechanism 17 is largely the same as that of the X-axis moving mechanism 15. However, in the Z-axis moving mechanism 17, the member corresponding to the support 156 protrudes forward from the front of the column 12. Furthermore, in the Z-axis moving mechanism 17, the member corresponding to the screw shaft 153 extends in the vertical direction.
[0087] like Figure 2 As shown, the X-axis motor 151 has an encoder 15a. The encoder 15a detects the drive amount (rotation angle) of the X-axis motor 151. The drive amount of the X-axis motor 151 corresponds to the movement distance of the worktable 13 in the X-axis direction. The movement distance of the worktable 13 in the X-axis direction starting from a specified position (X-axis origin) is the position of the worktable 13 in the X-axis direction.
[0088] The control unit 33 calculates the movement distance or position of the worktable 13 in the X-axis direction based on the detection result of the encoder 15a. Based on the movement distance or position of the worktable 13 in the X-axis direction, the control unit 33 calculates the drive amount of the X-axis motor 151 required to move the worktable 13 from one position to another in the X-axis direction. Based on the calculated drive amount, the control unit 33 controls the operation of the X-axis motor 151, thereby moving the worktable 13 from one position to another in the X-axis direction.
[0089] Similarly, the Y-axis motor 141 has an encoder corresponding to the encoder 15a of the X-axis motor 151. Based on the detection result of the encoder of the Y-axis motor 141, the control unit 33 calculates the moving distance or position of the worktable 13 in the Y-axis direction, calculates the driving amount of the Y-axis motor 141, and controls the operation of the Y-axis motor 141.
[0090] Similarly, based on the detection results of the encoder of the Z-axis motor 171, the control unit 33 calculates the moving distance or position of the spindle 161 of the spindle head 16 in the Z-axis direction, calculates the driving amount of the Z-axis motor 171, and controls the operation of the Z-axis motor 171.
[0091] Due to thermal displacement of the components constituting machine tool 1 (especially the X-axis direction moving mechanism 15), the driving amount of the X-axis motor 151 may not correspond to the moving distance of the worktable 13 in the X-axis direction. Since the X-axis direction moving mechanism 15 frequently generates thermal displacement, in order to control the position of the worktable 13 in the X-axis direction with high precision, it is necessary to determine the correction value r of the driving amount of the X-axis motor 151 at appropriate times.
[0092] For the same reason, in order to control the position of the worktable 13 in the Y-axis direction with high precision, it is necessary to determine the correction value r of the drive amount of the Y-axis motor 141, and in order to control the position of the spindle 161 in the Z-axis direction with high precision, it is necessary to determine the correction value r of the drive amount of the Z-axis motor 171.
[0093] A portion of the storage area of the auxiliary storage unit 32 is a correction value storage unit 321. The correction value storage unit 321 stores correction values *r* for the drive amounts of each drive unit. The control unit 33 controls the operation of each drive unit based on the correction values *r* stored in the correction value storage unit 321. For example, when the control unit 33 receives an instruction to move the worktable 13 to a predetermined position, it adds the correction value *r* to the feed amount of the worktable 13 from its current position to the predetermined position, or subtracts the correction value *r* from the feed amount. The worktable 13 moves by the corrected feed amount. As a result, machining accuracy can be improved.
[0094] The correction value r is an example of a variable used when controlling the movement of machine tool 1.
[0095] Another part of the storage area of the auxiliary storage unit 32 is the reference value storage unit 322. The reference value storage unit 322 stores the reference value td, which will be described later.
[0096] When determining the correction value r of the drive quantity of the X-axis motor 151 and the Y-axis motor 141, the worktable 13 needs to be used as the measurement object. When determining the correction value r of the drive quantity of the Z-axis motor 171, the spindle 161 needs to be used as the measurement object.
[0097] Although the following explanation describes the correction of the drive amount of the X-axis motor 151, the correction of the drive amount of the Y-axis motor 141 and the Z-axis motor 171 is roughly the same.
[0098] Figure 4 It is a schematic diagram used to illustrate the position of the object being measured.
[0099] The worktable 13, which is the object of measurement, has two targets 131. The two targets 131 are arranged in the left-right direction, for example, at the left and right ends of the worktable 13. The workpiece 22 supported by the worktable 13 does not interfere with the targets 131. The targets 131 are, for example, column-shaped, and stand upright from a fixture (not shown) fixed to the worktable 13. The position of the targets 131 is the position of a representative point of the worktable 13.
[0100] The measuring tool 211 is, for example, a contact probe. When the measuring tool 211, mounted on the spindle 161, comes into contact with the target 131, it outputs a detection signal to the control device 3 indicating that the target 131 has been detected. The measuring tool 211 can also be a non-contact sensor (e.g., an optical or acoustic proximity sensor).
[0101] The timing for receiving a measurement command is as follows: before the start of machining of workpiece 22, or between one machining operation and another on the same workpiece 22. When a measurement command is received, the control unit 33 executing the measurement command uses the measuring tool 211 to measure the position of the target 131. At this time, the control unit 33 controls the operation of each drive unit to move the measuring tool 211 relative to the target 131 and bring it into contact with the target 131.
[0102] After receiving the detection signal, the control unit 33 calculates the position of the target 131 in the X-axis direction based on the detection result of the encoder 15a.
[0103] The auxiliary storage unit 32 stores the reference positions of the two targets 131 respectively. The reference position of the target 131 is the position of the target 131 measured when the thermal displacement of the machine tool 1 is stable (for example, after the machine tool 1 has naturally cooled down or completed preheating operation).
[0104] You can also set three or more targets 131 arranged in the left and right directions, or set only a single target 131.
[0105] After executing the measurement command, the control unit 33 calculates a correction value r for the drive amount of the X-axis motor 151 based on the measurement result. The control unit 33 calculates the correction value r for the drive amount of the X-axis motor 151 based on the difference between the position (current position) of the target 131 measured by executing the measurement command and the reference position of the target 131 stored in the auxiliary storage unit 32. Since there are two targets 131, the correction value r at any position in the X-axis direction can be calculated using linear interpolation. The control unit 33 writes the calculated correction value r into the correction value storage unit 321.
[0106] Although calculating the correction value r requires executing a measurement command (i.e., measuring the position of the object), the measurement of the object's position itself does not directly contribute to the machining of workpiece 22. Therefore, the higher the execution frequency of the measurement, the lower the productivity. To improve productivity, the execution frequency of the measurement command can be reduced. However, if the execution frequency of the measurement command is too low, it will be impossible to improve machining accuracy.
[0107] Control device 3 achieves a balance between improving productivity and improving machining accuracy by appropriately omitting the execution of measurement commands.
[0108] Figure 5 and Figure 6 This is a flowchart illustrating the process of executing the machining program by the control unit 3. The control unit 33 begins executing the machining program when the machine tool 1 is started (i.e., when the power to the machine tool 1 is turned on).
[0109] First, the control unit 33 initializes the variables stored in the auxiliary storage unit 32 (S11), and resets the timing results of the first timer 34 and the second timer 35 to "0" (S12). During the processing in S12, neither the first timer 34 nor the second timer 35 starts timing.
[0110] The variables stored in the auxiliary storage unit 32 include the running stop time ta, measurement flag, number of measurements n, measurement interval tb, number of updates i, time t[i], calculation variable k[i], and elapsed time tc, which will be described later. Some or all of the variables may also be stored in the main storage unit 31.
[0111] Next, the control unit 33 determines whether to start the execution of the processing program 371 (S13). If it determines that it should not start (S13: No), the processing of S13 is executed again.
[0112] For example, when the user inputs a start command by operating the operation unit (not shown in the figure), the control unit 33 determines that the execution of machining program 371 has begun. In the process of S13, if it is determined that machining program 371 has begun (S13: Yes), the control unit 33 substitutes the count result t1 of the first timer 34 into the run stop time ta (S14). The run stop time ta represents the time elapsed from when the machine tool 1 stops running until it resumes running. In this embodiment, the run stop time ta represents the time from the end time of the previous machining program 371 execution to the start time of the current machining program 371 execution.
[0113] When the machine tool 1 is started, if the control unit 33 executes the process of S14, the operation stop time ta is "0". If the control unit 33 executes the process of S14 after executing the process of S19 (described later), the operation stop time ta is the time elapsed since the first timer 34 started counting in the process of S21 (described later).
[0114] Next, the control unit 33 reads the instruction that has not been executed and should be executed earliest from the multiple instructions contained in the machining program 371 (S15), and determines whether the read instruction is a measurement instruction (S16).
[0115] When the instruction read is not a measurement instruction (S16: No), the control unit 33 determines whether the instruction read in the processing of S15 is an end instruction (S17).
[0116] When the read instruction is not an end instruction (S17: No), that is, when the instruction read in the processing of S15 is neither a measurement instruction nor an end instruction, the control unit 33 executes the read instruction (S18).
[0117] After the processing in S18 is completed, the control unit 33 moves the processing to S15 and reads the next instruction of the machining program 371.
[0118] In the process of S17, when the instruction read in the process of S15 is an end instruction (S17: Yes), the control unit 33 ends the execution of the machining program 371 (S19). Next, the control unit 33 resets the timing result of the first timer 34 to "0" (S20) and starts timing the elapsed time by the first timer 34 (S21). The first timer 34 times the elapsed time starting from the end time of the execution of this machining program 371.
[0119] Next, the control unit 33 determines whether the power supply to the machine tool 1 is disconnected (S22). If the power supply is not disconnected (S22: No), the control unit 33 returns the process to S13. If the power supply is disconnected (S22: Yes), the control unit 33 ends the machining program execution. The control unit 33 can also move the process to S22 if it determines "No" in the process of S13.
[0120] When the instruction read in the S15 processing is a measurement instruction (S16: Yes), such as Figure 6 As shown, the control unit 33 performs a measurement determination process (S 31). In this process, the control unit 33 determines whether to execute a measurement command (see below). Figure 7 When it is determined that a measurement command is to be executed, the control unit 33 sets the measurement flag to valid; when it is determined that a measurement command is not to be executed, the control unit 33 sets the measurement flag to invalid.
[0121] Next, the control unit 33 determines whether the measurement mark is valid (S 32).
[0122] When the measurement flag is valid (S 32: Yes), the position of the object to be measured needs to be measured. Therefore, the control unit 33 measures the position of the object to be measured (S 33).
[0123] Furthermore, the control unit 33 increments the measurement count n by "1" (S 34). The measurement count n represents the number of times the control unit 33 executes the measurement command after determining "yes" in the processing of S 51 described later.
[0124] Furthermore, the control unit 33 begins timing the measurement interval tb (S 35). In S 35, the control unit 33 resets the timing result of the second timer 35 to "0", and then starts timing the elapsed time by the second timer 35. The measurement interval tb is the elapsed time from the current measurement moment. The timing result of the second timer 35 is used as the measurement interval tb.
[0125] Next, the control unit 33 calculates a correction value r based on the measurement results obtained from the processing in S 33 (S 36), and uses the calculation results from the processing in S 36 to overwrite the correction value r stored in the auxiliary storage unit 32, thereby updating the correction value r (S 37). As a result, machining accuracy can be improved.
[0126] Next, the control unit 33 performs a reference value update process (S 38). In this process, the control unit 33 determines whether to update the reference value td stored in the reference value storage unit 322. If an update is determined, the control unit 33 calculates the reference value td and uses the calculation result to overwrite the reference value td stored in the reference value storage unit 322. The reference value td is a variable compared with the measurement interval tb during the measurement determination process. From the time the control unit 33 determines "yes" in the measurement determination process (S 51 described later) until the execution of the reference value update process (S 96 described later), the control unit 33 sets td = 0 through the process described later in S 76.
[0127] After the processing in S 38 is completed, the control unit 33 transfers the processing to... Figure 5 As shown in S15, the next instruction of machining program 371 is read.
[0128] exist Figure 6 In the processing of S 32 shown, when the measurement flag is invalid (S 32: No), the control unit 33 transfers the processing to... Figure 5 As shown in S15, the next instruction of machining program 371 is read.
[0129] When the measurement flag is invalid, it indicates that there is no need to measure the position of the measurement object. Therefore, the control unit 33 neither calculates nor updates the correction value r. Since the measurement of the measurement object based on the measurement instruction does not directly contribute to the machining of the workpiece 22, the productivity can be improved by omitting the measurement instruction.
[0130] Figure 7 It is a flowchart showing the process of the measurement determination process executed by the control device 3. The control unit 33 starts the execution of the measurement determination process at S 31 shown in Figure 6 Execute the measurement determination process.
[0131] The control unit 33 determines whether the operation stop time ta is "0", or whether the operation stop time ta is equal to or greater than the constant Ta (S 51). The case of ta = 0 is when the machine tool 1 is started. The temperature of the machine tool 1 at startup is sufficiently low. The case of ta ≥ Ta is when a predetermined time has elapsed from the stop of the machine tool 1 to its restart. Here, the constant Ta represents the shortest time required for the temperature of the machine tool 1 to sufficiently decrease due to the stop of the machine tool 1.
[0132] When ta = 0 or ta ≥ Ta (S 51: Yes), the current thermal displacement state of the machine tool 1 may be significantly different from the thermal displacement state of the machine tool 1 when the correction value r stored in the calculation auxiliary storage unit 32 was calculated. Therefore, it is necessary to update the correction value r, and the execution of the measurement instruction cannot be omitted.
[0133] The control unit 33 substitutes "0" into the measurement count n (S 52), substitutes "0" into the update count i (S 53), sets the measurement flag to valid (S 54), and ends the measurement determination process. After that, the control unit 33 executes the process of S 32 (refer to Figure 6 ). That is, in the case of ta = 0 or ta ≥ Ta, when a measurement instruction is received, the control unit 33 directly measures the position of the measurement object without determining whether to execute the measurement instruction.
[0134] The update count i represents the number of times the reference value td stored in the reference value storage unit 322 is updated after the control unit 33 determines "Yes" in the process of S 51.
[0135] When 0 < ta < Ta (S 51: No), the control unit 33 determines whether the measurement count n is less than "2" (S 55). When n < 2 (S55: Yes), the control unit 33 transfers the process to S 54 and sets the measurement flag to valid.
[0136] When machining of workpiece 22 begins when the temperature of machine tool 1 has sufficiently decreased, the thermal displacement of machine tool 1 is relatively large for a period of time after machining begins. In this embodiment, the measurement flag is valid when the number of measurements n is "0" or "1". That is, when machining of workpiece 22 begins when the temperature of machine tool 1 has sufficiently decreased, the operation of updating the correction value r by measuring the position of the object at least twice consecutively can be performed. Therefore, machining accuracy can be improved. In S55, the control unit 33 can also determine whether the number of updates i is less than "2".
[0137] When n≥2 (S 55: No), the control unit 33 obtains the timing result of the second timer 35, i.e. the measurement interval tb (S 56), and determines whether the measurement interval tb is greater than or equal to a constant Tb (S 57).
[0138] If tb ≥ Tb (S 57: Yes), then the elapsed time since the last measurement has reached the manufacturer's preset time (or the user's expected time). In other words, the manufacturer or user needs to update the correction value r (and thus needs to measure the position of the object being measured). Therefore, the control unit 33 transfers the processing to S 54 to make the measurement mark valid. The control unit 33 may also omit the processing in S 57 (and directly execute the subsequent processing in S 58 after the processing in S 56 is completed).
[0139] If tb < Tb (S 57: No), then the control unit 33 determines whether the measurement interval tb obtained in S 56 is above the reference value td (S 58). Since td = 0 before the reference value td is updated, the control unit 33 must determine "Yes" in S 58.
[0140] If tb ≥ td (S 58: Yes), then machine tool 1 is in a state where the correction value r needs to be updated (and thus the position of the object to be measured needs to be measured). Therefore, control unit 33 transfers the processing to S 54 to make the measurement mark valid.
[0141] If tb < td (S 58: No), then the control unit 33 sets the measurement flag to invalid (S 59) and ends the measurement determination process. Afterwards, the control unit 33 executes the process in S 32 (see...). Figure 6 ).
[0142] Figure 8 and Figure 9 This is a flowchart illustrating the reference value update process performed by the control unit 3. The control unit 33... Figure 6 The execution of the baseline value update process begins in S 38, as shown.
[0143] like Figure 8 As shown, the control unit 33 obtains the current time t output by the clock 36 (S 71).
[0144] Next, the control unit 33 determines whether the update count i is "0" (S 72).
[0145] If i = 0 (S 72: Yes), then the number of measurements n is "1". That is, after the control unit 33 determines "Yes" in the processing of S 51, it only performs one measurement of the position of the object being measured. As will be described later, in this embodiment, the control unit 33 calculates the reference value td based on the results of the two measurements. By calculating the reference value td based on the results of the two position measurements, the reference value td, as the calculation result, can reflect the current thermal deformation of the machine tool 1.
[0146] Control unit 33 substitutes the value of the current time t obtained in S 71 into time t[i] (S 73). The "i" in time t[i] is equal to the update number i. When i = 0, time t[i] is used as the time for initializing the reference value td.
[0147] In addition, the control unit 33 writes the current measurement result (the latest measurement result) and the update number i into the auxiliary storage unit 32 (S 74).
[0148] Furthermore, the control unit 33 substitutes "0" into the calculation variable k[i] used to calculate the reference value td (S 75), and substitutes "0" into the reference value td (S 76). That is, when ta = 0 or ta ≥ Ta, if a measurement command is received, the control unit 33 does not determine whether to update the reference value td, but directly initializes the reference value td stored in the reference value storage unit 322.
[0149] After the processing in S76 is completed, the control unit 33 increments the update count i by "1" (S77) and ends the baseline value update process. Afterwards, the control unit 33 executes the processing in S15 (see...). Figure 5 ).
[0150] In S 72, the case where i ≥ 1 corresponds to the state where n ≥ 2, that is, the case where a new measurement command is received after the initialization of the reference value td. If i ≥ 1 (S 72: No), then the control unit 33 calculates the elapsed time tc since the last update of the reference value td (S 78). In S 78, the control unit 33 substitutes the result of subtracting time t[i-1] from the current time t into the elapsed time tc.
[0151] Next, the control unit 33 determines whether the elapsed time tc is less than or equal to the constant Tc (S 79). The processing in S 79 is based on a comparison between the elapsed time tc since the last update of the reference value td and a predetermined value (constant Tc) to determine whether to update the reference value td. The constant Tc is a value set to stabilize the accuracy of the reference value td.
[0152] If the elapsed time tc since the last update of the reference value td is too short, the thermal deformation of machine tool 1 will be small, and recalculating the reference value td may result in waste. In addition, if the elapsed time tc since the last update of the reference value td is too short, the measurement interval tb will also be too short. In this case, the negative impact of the measurement errors contained in each measurement result may lead to an inappropriate calculation result of the reference value td.
[0153] If tc ≤ Tc in S 79 (S 79: Yes), then the elapsed time tc since the last update of the reference value td is too short. Therefore, the control unit 33 does not perform operations such as substituting the current time t into time t[i], writing the current measurement result, calculating and updating the reference value td, and incrementing the update count i, but instead ends the reference value update process. Afterwards, the control unit 33 executes the process in S15 (see...). Figure 5 Since the control unit 33 does not need to update the reference value td unnecessarily, the load on the control unit is relatively light.
[0154] If tc > Tc in S 79 (S 79: No), then the elapsed time tc since the last update of the reference value td is long enough. In this case, the thermal deformation of machine tool 1 is large, and updating the reference value td is meaningful. Therefore, the control unit 33 substitutes the value of the current time t obtained in S 71 into time t[i] (S 91), and writes the current measurement result (the latest measurement result) in association with the update number i into the auxiliary storage unit 32 (S 92). When i ≥ 1, time t[i] is used as the time to update the reference value td.
[0155] Next, the control unit 33 calculates the calculation variable k[i] based on the measurement result corresponding to time t[i] (the current measurement result) and the measurement result corresponding to time t[i-1] (the measurement result at the last update) (S 93), and writes it to the auxiliary storage unit 32 (S 94). There are no restrictions on the calculation method of the calculation variable k[i]. For example, the calculation variable k[i] can be the absolute value of the difference between the current measurement result and the measurement result at the last update divided by the value obtained after time tc (i.e., the slope of the change in the position of the measured object). The control unit 33 calculates the calculation variable k[i] for the X-axis, Y-axis and Z-axis respectively.
[0156] Next, the control unit 33 calculates the baseline value td based on the calculation variables k[i] and k[i-1] (S 95). There are no restrictions on the method for calculating the baseline value td. For example, before calculating the baseline value td, the control unit 33 first calculates the baseline candidate value te. The baseline candidate value te is the value obtained by dividing the constant Td by the larger of the calculation variables k[i] and k[i-1]. The constant Td represents the tolerance error. The control unit 33 calculates the baseline candidate value te for the X-axis, Y-axis, and Z-axis respectively. The baseline value td is the minimum value among the three baseline candidate value te.
[0157] After the processing in S 95 is completed, the control unit 33 uses the calculation result obtained by executing the processing in S 95 to overwrite the reference value td stored in the reference value storage unit 322, thereby updating the reference value td (S 96). Then, the control unit 33 transfers the processing to... Figure 8 As shown in S 77, the number of updates is incremented by i.
[0158] When i = 1, the processing in S 93 to S 96 calculates and updates the reference value td based on the measurement result when initializing the reference value td and the current measurement result. When i ≥ 2, the processing in S 93 to S 96 calculates and updates the reference value td based on the measurement result when the reference value td was last updated and the current measurement result. Since the control unit 33 updates the reference value td in a timely manner, the reference value td, which serves as the basis for determining whether to execute a measurement command, is not fixed.
[0159] According to the aforementioned control device 3, by switching between updating and not updating the reference value td, the problems of excessively high execution frequency of position measurement commands due to an excessively small reference value td, and excessively low execution frequency of measurement commands due to an excessively large reference value td, can be avoided. Thus, both increased productivity and improved machining accuracy can be achieved.
[0160] In S15, the control unit 33 receives instructions not only by reading the instructions contained in the machining program 371. For example, the control unit 33 may also receive instructions input to the control device 3 from an operation unit (keyboard, button, touch panel, etc., not shown in the user operation diagram).
[0161] The auxiliary storage unit 32 is not limited to being included in the control device 3; for example, it may also be installed in a server separate from the control device 3.
[0162] The control device 3 can be set separately from the machine tool 1.
[0163] The embodiments of the present invention are illustrative in all respects and should not be construed as limiting. The scope of the invention is not limited to the foregoing, but should cover the scope equivalent to that of the claims and all modifications within the scope of the claims.
[0164] The independent and dependent claims described in the claims statement can be combined with each other in any way, regardless of their referencing relationship. Furthermore, each claim can refer to two or more claims to form multiple dependent claims, and each of these multiple dependent claims can form the basis for other multiple dependent claims.
Claims
1. A control device for controlling an operation of a machine tool having a spindle to which a tool for machining a workpiece is attachable and detachable and a support portion for supporting the workpiece, the control device comprising: a reference value storage portion for storing a reference value; and a control portion, the control portion judging whether or not to perform a measurement of a position of the spindle or the support portion using the reference value stored in the reference value storage portion, the control portion performing the measurement when judged to perform the measurement, calculating a variable used in operation control of the machine tool based on a result of the measurement, judging whether or not to update the reference value after the measurement is performed, the control portion calculating the reference value when judged to update, and storing the calculation result in the reference value storage portion. The control portion judges whether or not to update the reference value based on a comparison result of an elapsed time from a time when the reference value was last updated and a predetermined value when judging whether or not to update the reference value. The control portion calculates the reference value based on a result of the measurement when the reference value was last updated and a result of the measurement this time when calculating the reference value. The control portion performs the measurement without judging whether or not to perform the measurement, initializes the reference value stored in the reference value storage portion without judging whether or not to update the reference value, in a case where a measurement instruction to perform the measurement is received after a predetermined time has elapsed since the machine tool is started or since the machine tool is stopped and then restarted. The control portion judges whether or not to perform the measurement in a case where the measurement instruction is newly received after the reference value is initialized. The control portion performs the measurement when judged to perform the measurement, judges whether or not to update the reference value based on a comparison result of an elapsed time from a time when the reference value was initialized and the predetermined value after the measurement is performed, and calculates the reference value based on a result of the measurement when the reference value was initialized and a result of the measurement this time when judged to update.
5. A control method for controlling an operation of a machine tool having a spindle to which a tool for machining a workpiece is attachable and detachable and a support portion for supporting the workpiece, the control method comprising: judging whether or not to perform a measurement of a position of the spindle or the support portion using a reference value, performing the measurement when judged to perform the measurement, calculating a variable used in operation control of the machine tool based on a result of the measurement, judging whether or not to update the reference value after the measurement is performed, and updating the reference value when judged to update.
2. The control device according to claim 1, characterized by 6. A computer program product for controlling an operation of a machine tool having a spindle to which a tool for machining a workpiece is attachable and detachable and a support portion for supporting the workpiece, the computer program product causing a computer to execute the following processing: judging whether or not to perform a measurement of a position of the spindle or the support portion using a reference value stored in a reference value storage portion for storing the reference value, 3. The control device of claim 1, wherein 4. The control device of claim 2, wherein when it is determined to perform the measurement, performing the measurement, calculating a variable used in motion control of the machine tool based on a result of the measurement, determining whether to update the reference value after the measurement is performed, when it is determined to perform the measurement, performing the measurement, calculating a variable used in motion control of the machine tool based on a result of the measurement, determining whether to update the reference value after the measurement is performed,
Citation Information
Patent Citations
Derivation method of correction coefficient and machine tool
JP2021160004A