Program optimization device and storage medium
The program optimization device optimizes machining programs by classifying and reordering commands to reduce spindle speed waiting times and power consumption, enhancing control efficiency and machining accuracy.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-06-27
- Publication Date
- 2026-03-17
AI Technical Summary
Existing numerical control devices face inefficiencies in controlling spindle rotation speed changes, leading to increased waiting times and power consumption without maintaining machining accuracy.
A program optimization device that classifies machining program commands into executable, non-executable, and rotational speed commands, and inserts rotational speed commands before executable blocks to allow simultaneous acceleration or deceleration, reducing waiting times and optimizing spindle speed transitions.
The solution enhances control efficiency by minimizing spindle speed waiting times and reducing power consumption while maintaining machining accuracy, allowing for smoother spindle speed transitions and improved processing efficiency.
Smart Images

Figure 0007832327000001 
Figure 0007832327000002 
Figure 0007832327000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to a program optimization device and a storage medium. [Background Art]
[0002] A numerical control device has a function of controlling the spindle rotation speed of a machine tool according to a machining program. In the control of the spindle rotation speed of a conventional numerical control device, there is a technique for shortening the machining time without creating a complex ladder and without affecting the machining accuracy and the machine. When there is a problem command when the spindle rotation speed changes, this numerical control device outputs the command after the spindle rotation speed reaches the commanded rotation speed. When there is no problem command when the spindle rotation speed changes, this numerical control device outputs the command even if the spindle rotation speed has not reached the commanded rotation speed. For example, see Patent Document 1. [Prior Art Documents] [Patent Documents]
[0003] [Patent Document 1] International Publication No. 2013 / 171850 [Summary of the Invention] [Problems to be Solved by the Invention]
[0004] In Patent Document 1, during the execution of a machining process, a machining program is stored in a buffer. During a change in the spindle rotation speed, if no problem occurs when executing the commands stored in the buffer, the commands stored in the buffer are executed while changing the spindle rotation speed. As a result, the next command can be started without waiting for the commanded speed to be reached, and the waiting time can be reduced.
[0005] In the field of numerical control devices, techniques for improving control efficiency are desired. [Means for Solving the Problems]
[0006] A program optimization device according to one aspect of this disclosure includes: a machining program acquisition unit that acquires a machining program; a classification information storage unit that stores classification information classifying commands included in the machining program into executable commands, non-executable commands, and rotational speed commands, wherein executable commands are commands that can be executed simultaneously with acceleration or deceleration of the spindle rotational speed, non-executable commands are commands that cannot be executed simultaneously with acceleration or deceleration of the spindle rotational speed, and rotational speed commands are commands that accelerate or decelerate the spindle to a target rotational speed; a machining program classification unit that classifies blocks of the machining program into executable blocks containing executable commands, non-executable blocks containing non-executable commands, and rotational speed command blocks containing rotational speed commands based on the classification information; an insertion position determination unit that determines the position before the executable block as the insertion position of the rotational speed command block if an executable block exists before the rotational speed command block in the machining program; and the insertion position where the rotational speed command block is inserted. Then, create a new processing program. It includes a processing program modification unit. A storage medium in one aspect of this disclosure stores classification information that classifies commands included in the machining program of a numerical control device into executable commands, non-executable commands, and rotational speed commands. Executable commands are commands that can be executed simultaneously with acceleration or deceleration of the spindle rotational speed, non-executable commands are commands that cannot be executed simultaneously with acceleration or deceleration of the spindle rotational speed, and rotational speed commands are commands that accelerate or decelerate the spindle to a target rotational speed. One or more processors execute to acquire the machining program and, based on the classification information, classify blocks of the machining program into executable blocks containing executable commands, non-executable blocks containing non-executable commands, and rotational speed command blocks containing rotational speed commands. If an executable block exists before a rotational speed command block in the machining program, the area before the executable block is determined to be the insertion position for the rotational speed command block, and the rotational speed command block is inserted at the insertion position to modify the machining program. Then, create a new processing program. The processor stores instructions that it can read. [Effects of the Invention]
[0007] According to one aspect of the present invention, control can be made more efficient. [Brief explanation of the drawing]
[0008] [Figure 1] This is a block diagram of the program optimization device of the first disclosure. [Figure 2] This figure shows an example of a method for classifying machining programs and determining their insertion positions. [Figure 3] This figure shows an example of the processing in the machining program modification section. [Figure 4] This is a flowchart explaining the operation of the program optimization device. [Figure 5] This is a block diagram of the program optimization device of the second disclosure. [Figure 6] This diagram shows an example of a rapid traverse machining program and the speed changes of the X and Z axes. [Figure 7] This figure shows an example of an acceleration command. [Figure 8A] This diagram shows the change in the rotational speed of the main spindle. [Figure 8B] This figure shows the change in the rotational speed of the main shaft due to a change in acceleration. [Figure 9] This is a block diagram of the program optimization device of the third disclosure. [Figure 10] This is a block diagram of the program optimization device of the fourth disclosure. [Figure 11] This figure shows the hardware configuration of the program optimization device. [Modes for carrying out the invention]
[0009] [First Disclosure] The program optimization device 100 of the first disclosure will be described below. The program optimization device 100 modifies the machining program of the numerical control device and reduces the waiting time for the spindle rotation speed to reach. The program optimization device 100 is applied to an information processing device such as a PC (personal computer), a server, or a mobile terminal. Further, the program optimization device 100 may be applied to a control device such as a numerical control device or a PLC (Programmable Logic Controller).
[0010] FIG. 1 is a block diagram of the program optimization device 100. The program optimization device 100 includes a machining program acquisition unit 1, a classification information storage unit 2, a machining program classification unit 3, an insertion position determination unit 4, and a machining program modification unit 5.
[0011] The machining program acquisition unit 1 acquires the machining program of the numerical control device from a storage device built in the program optimization device 100 or an external storage device connected to the program optimization device 100 via a network.
[0012] The classification information storage unit 2 stores classification information for classifying the commands included in the machining program into executable commands, non-executable commands, and rotation speed commands. An executable command is a command that can be executed simultaneously with the acceleration or deceleration of the spindle rotation speed. A non-executable command is a command that cannot be executed simultaneously with the acceleration or deceleration of the spindle rotation speed. A rotation speed command is a command for setting the target value of the spindle rotation speed.
[0013] Examples of executable commands include rapid traverse and coolant discharge. There is no problem in executing the acceleration or deceleration of the spindle rotation speed and rapid traverse or coolant discharge simultaneously. Examples of non-executable commands include cutting feed and tool change. For cutting feed, it is necessary to wait until the spindle rotation speed reaches the target speed. For tool change, it is necessary to wait until the spindle rotation stops. The acceleration or deceleration of the spindle rotation speed and cutting feed or tool change cannot be executed simultaneously. Note that commands are not necessarily simply classifiable. Tool change is a non-executable command and also a rotation speed command.
[0014] The machining program classification unit 3 refers to the classification information storage unit 2 and classifies the blocks of the machining program into executable blocks, non-executable blocks, and rotational speed command blocks for each command (executable command, non-executable command, rotational speed command). An example of classification is shown in FIG. 2. The machining program in FIG. 2 is a 7-line machining program from sequence number "N01" to "N07". Block "N01" includes the command "M03: spindle forward rotation", block "N02" includes the command "G01: cutting feed", block "N06" includes the command "M03: spindle forward rotation", blocks "N03" to "N05" include the command "G00: rapid feed", and block "N07" includes the command "G01: cutting feed". The machining program classification unit 3 refers to the classification information storage unit 2 and classifies block "N01" as a rotational speed command block, block "N02" as a non-executable block, blocks "N03" to "N05" as executable blocks, block "N06" as a rotational speed command block, and block "N07" as a non-executable block.
[0015] The insertion position determination unit 4 determines the insertion position of the rotational speed command block based on the classification of the blocks of the machining program. The method for determining the insertion position will be explained with reference to Figure 2. Here, we will determine the insertion position of the rotation speed command block with sequence number "N06". The insertion position determination unit 4 checks the classification of block "N05", which is one step prior to the rotation speed command block "N06", which is the target of the insertion position determination. In the example in Figure 2, block "N05", which is one step prior to block "N06", is an executable block. If block "N05" is an executable block, the insertion position determination unit 4 reads the classification of the block "N04", which is one step prior to it. The classification of "N04" is an executable block. If block "N04" is an executable block, the classification of the block "N03", which is one step prior to it, is read. The classification of block "N03" is an executable block. If "N03" is an executable block, the classification of the block "N02", which is one step prior to it, is read. The classification of block "N02" is an unexecutable block. The insertion position determination unit determines that the position after the non-executable block and before the executable block is the insertion position of the rotation speed command block "N06".
[0016] The machining program modification unit 5 inserts a rotation speed command block at the insertion position determined by the insertion position determination unit 4. Figure 3 shows an example of the processing by the machining program modification unit. The rotation speed command block "N06" is inserted between the block with sequence number "N02" and the block with sequence number "N03". Note that the sequence number changes from "N06" to "N03" when the line changes, but the original sequence number is used in Figure 3 for explanatory purposes. The user can refer to the machining program modified by the machining program modification unit 5 to confirm the modifications and make further modifications.
[0017] The operation of the program optimization device 100 will be explained with reference to Figure 4. First, the insertion position determination unit 4 reads one block of the machining program (step S1). The insertion position determination unit 4 determines whether the read block contains a rotation speed command. If a rotation speed command exists in the read block (step S2; Yes), the insertion position determination unit 4 checks the classification of the block immediately preceding the block read in step S1 (step S3). If the block classification in step S3 is an executable block (step S4; Yes), the process proceeds to step S3. In step S3, the classification of the block immediately preceding is checked. If the block read in step S3 is not classified as an executable block (step S4; No), the insertion position determination unit 4 determines that the insertion position for the rotation speed command block is behind the block that is not an executable block and before the executable block (step S5).
[0018] If the block read in step S1 is not the last block (step S6; No), the process from step S1 to step S5 is repeated. If the block read in step S1 is the last block (step S6; Yes), the rotation speed command block is moved to the insertion position determined by the insertion position determination unit 4, and the machining program is modified (step S7).
[0019] As described above, the program optimization device 100 of the first disclosure reduces the waiting time for the spindle rotation speed to be reached by moving the block containing the rotation speed command to a point before the executable block in which no problems occur even if the spindle rotation speed is accelerated or decelerated, thereby simultaneously accelerating or decelerating the spindle rotation speed and processing the executable block.
[0020] [Second Disclosure] Figure 5 is a block diagram of the program optimization device 100 of the second disclosure. The program optimization device 100 of the second disclosure comprises a prediction time calculation unit 6 and an acceleration calculation unit 7.
[0021] Referring to Figures 6 and 7, the predicted time calculation unit 6 and the acceleration calculation unit 7 will be described. The predicted time calculation unit 6 predicts the time required for each executable block. For example, in the processing program shown in Figure 6, the executable blocks are blocks "N03" to "N05". The predicted time calculation unit 6 calculates the predicted time for blocks "N03" to "N05". In the example shown in Figure 6, the rapid traverse speeds for the X and Z axes are set to "15000 mm / min," and the acceleration / deceleration time constants after linear interpolation for the X and Z axes are set to "60 msec." In block "N03," the spindle is moved "+15 mm" in the X-axis direction, in block "N04," the spindle is moved "+35 mm" in the Z-axis direction, and in block "N05," the spindle is moved "-15 mm" in the X-axis direction. At this time, the speeds of the X and Z axes from block "N03" to "N05" change as shown in the graph in Figure 6, and the predicted time required to execute blocks "N03" to "N05" is "0.44 sec." Note that known techniques are used to calculate the predicted execution time for each block.
[0022] The acceleration calculation unit 7 calculates the new acceleration using the predicted time of the executable block. For example, if the spindle is linearly accelerating or decelerating, (acceleration) = (increment of rotational speed command) / (predicted value of spindle speed changeable time) = 1000 min -1 0.44sec = 2273min -1 This will be / sec.
[0023] The machining program modification unit 5 inserts commands to change the acceleration of the rotation speed command block. Figure 7 shows an example of commands to change the acceleration. The commands to change the acceleration are the three blocks "G10 L52", "N4030 P1 R2273", and "G11". Command "G10" is a data setting command. The blocks to change the acceleration are inserted before the insertion position of the rotation speed command block. The first block, "G10," is a command to start data setting. The second block sets the value of the first axis "P1" with parameter number "N4030" to "R2273." The third block, "G11," is a command to end data setting.
[0024] Figures 8A and 8B are compared to explain the change in spindle rotation speed due to a change in acceleration. Figure 8A shows the change in rotation speed when the acceleration is not changed. When the acceleration is not changed, the spindle accelerates at the maximum acceleration according to the command of rotation speed command block "N06". Figure 8B shows the change in rotation speed when the acceleration is changed. When the acceleration is changed, the spindle rotation speed accelerates gradually and reaches the target speed before the cutting feed of block "N07".
[0025] As explained above, the program optimization device 100 of the second disclosure can keep the acceleration low and accelerate the spindle rotation speed gradually. This eliminates the waiting period for the spindle rotation speed to reach its target and reduces power consumption.
[0026] In addition, although the acceleration calculation unit 7 in the second disclosure calculated the predicted time of the executable block from the machining program, the predicted time may also be obtained through simulation or actual machining.
[0027] [Third Disclosure] Figure 9 is a block diagram of the program optimization apparatus 100 of the third disclosure. The program optimization apparatus 100 of the third disclosure comprises a simulation unit 8 and a time comparison unit 9. The simulation unit 8 reads machining programs and CAD (Computer Aided Design) and calculates the spindle path. The simulation uses existing technology.
[0028] The time comparison unit 9 compares the spindle speed waiting time of the original machining program and the modified machining program. The spindle speed waiting time is the waiting time until the spindle rotation speed reaches a specified value. The time comparison unit 9 displays the spindle speed waiting time of the original machining program, the spindle speed waiting time of the modified machining program, etc., on the display unit. The user decides whether or not to modify the machining program based on the difference in spindle speed waiting time, etc. At this time, the original machining program and the modified machining program may be displayed, and the user may be allowed to modify the machining program.
[0029] Furthermore, while the third disclosure states that the spindle speed waiting time is calculated by simulation, actual machining or idle operation may also be performed. In addition, instead of displaying information about the spindle speed waiting time, a machining program with a short spindle speed waiting time may be automatically selected.
[0030] [Fourth Disclosure] Figure 10 is a block diagram of the program optimization device 100 of the fourth disclosure. The program optimization device 100 of the fourth disclosure includes a program comparison unit 10. The program comparison unit 10 compares the original machining program with the modified machining program and extracts the modified parts. The program comparison unit 10 displays the modified parts and other information on a display unit. The user decides whether or not to modify the machining program based on the modified parts. At this time, the original machining program and the modified machining program may be displayed, and the user may be allowed to modify the machining program.
[0031] Furthermore, the spindle speed waiting time (disclosure in the third disclosure) and the modifications to the machining program (disclosure in the fourth disclosure) may be displayed simultaneously. The user can then decide whether or not to modify the machining program while checking the spindle speed waiting time and the modifications to the machining program.
[0032] As described above, the program optimization device 100 of this disclosure reduces or eliminates the spindle speed waiting time by moving the rotation speed command block in front of the executable block, thereby accelerating or decelerating the rotation speed and executing the executable block simultaneously.
[0033] Furthermore, the execution time of executable blocks is predicted, and a new acceleration is calculated. With this new acceleration, the rotation speed of the main spindle is gradually increased to reach the target rotation speed before the start of the non-executable block. By keeping the acceleration low, power consumption is reduced.
[0034] Furthermore, by comparing the spindle speed waiting time between the modified machining program and the original machining program, users can confirm the effectiveness of the modification. The system also displays the modified areas, allowing users to verify the changes made to the machining program. Users can revert the modified machining program back to the original, or further modify the modified machining program. Additionally, users can modify the machining program while observing the spindle movement through simulation.
[0035] The program optimization device 100 of this disclosure analyzes the original machining program and creates a new machining program. The new machining program can be created using an information processing device such as a PC or server. The movement of the machine can be confirmed by simulation using the new machining program. Furthermore, since the machining program is portable, even a numerical control device that does not have a function to modify the machining program can shorten the waiting time to reach the spindle speed simply by executing the modified machining program. The numerical control device may also be equipped with the functions of the program optimization device 100 and perform modifications to the machining program.
[0036] The hardware configuration of the program optimization device 100 to which this disclosure is applied will be described below. Figure 11 is a hardware configuration diagram of the program optimization device 100. As shown in Figure 11, the program optimization device 100 includes a CPU 111 that controls the program optimization device 100 as a whole, a ROM 112 that stores programs and data, and a RAM 113 for temporarily expanding data. The CPU 111 reads the system program stored in the ROM 112 via a bus and controls the entire program optimization device 100 according to the system program.
[0037] The non-volatile memory 114 is backed up, for example by a battery (not shown), so that its stored state is maintained even when the power to the program optimization device 100 is turned off. The non-volatile memory 114 stores various data, such as programs read from the external device 120 via interfaces 115, 118, and 119, and user operations entered via the input unit 30. The display unit 70 displays various data.
[0038] Interface 115 is an interface for connecting the program optimization device 100 to an external device 120 such as an adapter. Programs and various parameters are read from the external device 120. [Explanation of Symbols]
[0039] 100 Program Optimization Devices 1. Processing program acquisition unit 2 Classification information storage section 3. Processing Program Classification Unit 4. Insertion position determination unit 5. Machining Program Modification Section 6. Prediction Time Calculation Unit 7. Acceleration calculation unit 8. Simulation Section 9. Time Comparison Section 10. Program Comparison Section 111 CPU 112 ROM 113 RAM 114 Non-volatile memory
Claims
1. A program optimization device for streamlining the machining program of a numerical control device, A processing program acquisition unit that acquires a processing program, A classification information storage unit stores classification information that classifies the commands included in the machining program into executable commands, inexecutable commands, and rotational speed commands, wherein the executable commands are commands that can be executed simultaneously with acceleration or deceleration of the spindle rotational speed, the inexecutable commands are commands that cannot be executed simultaneously with acceleration or deceleration of the spindle rotational speed, and the rotational speed commands are commands that accelerate or decelerate the spindle to a target rotational speed. A machining program classification unit classifies the blocks of the machining program into executable blocks containing executable commands, non-executable blocks containing non-executable commands, and rotational speed command blocks containing rotational speed commands, based on the classification information. In the machining program, if an executable block exists prior to the rotation speed command block, an insertion position determination unit determines that the position prior to the executable block is the insertion position of the rotation speed command block. A machining program modification unit that inserts the rotation speed command block into the aforementioned insertion position and creates a new machining program, A program optimization device equipped with the following features.
2. The program optimization device according to claim 1, wherein the insertion position determination unit determines the position behind the non-executable block as the insertion position of the rotation speed command block when the non-executable block is located before the executable block.
3. A prediction time calculation unit that calculates the predicted time of the executable block, The system includes an acceleration calculation unit that calculates a new acceleration to bring the main shaft to a target rotational speed during the predicted time, The program optimization device according to claim 1, wherein the processing program modification unit modifies the acceleration of the rotational speed command inserted into the insertion position to the new acceleration.
4. A simulation unit that performs simulation of the aforementioned machining program, A time comparison unit compares the spindle speed waiting time in the simulation of the machining program before modification with the spindle speed waiting time in the simulation of the machining program after modification. A program optimization device according to claim 1, comprising:
5. The numerical control device stores classification information that classifies commands included in the machining program into executable commands, inexecutable commands, and rotational speed commands. Executable commands are commands that can be executed simultaneously with acceleration or deceleration of the spindle rotational speed; inexecutable commands are commands that cannot be executed simultaneously with acceleration or deceleration of the spindle rotational speed; and rotational speed commands are commands that accelerate or decelerate the spindle to a target rotational speed. One or more processors execute, The processing program is acquired, Based on the classification information, the blocks of the machining program are classified into executable blocks containing executable commands, non-executable blocks containing non-executable commands, and rotational speed command blocks containing rotational speed commands. In the machining program, if an executable block exists before the rotation speed command block, the position before the executable block is determined to be the insertion position of the rotation speed command block. The rotation speed command block is inserted into the aforementioned insertion position to modify the machining program and create a new machining program. A storage medium for storing instructions that the processor can read.
Citation Information
Patent Citations
Executing order deciding method for auxiliary function of nc program
JP1993053627A
Mumerically controlled machine tool
JP1994282318A
Control device for nc working machine
JP1995040187A
Information display method and information extraction and display method
JP2004227028A
Numerical controller of machine tool
JP2007233624A