Program optimization device and storage medium
The program optimization device improves numerical control efficiency by classifying machining commands and modifying spindle acceleration to align with executable block execution, reducing power consumption and machining time inefficiencies.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- FANUC LTD
- Filing Date
- 2022-06-27
- Publication Date
- 2026-05-11
AI Technical Summary
Existing numerical control devices extend spindle acceleration/deceleration times to reduce power consumption, leading to inefficiencies in machining time control.
A program optimization device that classifies machining program commands into executable and non-executable blocks, calculates predicted times, and modifies spindle acceleration to align with executable block execution, allowing simultaneous spindle speed changes during processing.
Reduces power consumption by eliminating waiting periods for spindle speed to reach targets and enhances control efficiency by optimizing spindle rotation speed adjustments.
Smart Images

Figure 0007856764000001 
Figure 0007856764000002 
Figure 0007856764000003
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 suppressing power consumption. When there is a margin in the time until the spindle reaches a specified rotation speed, this numerical control device increases the acceleration time and deceleration time of the spindle. For example, refer to Patent Document 1.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] In Patent Document 1, when the time from when a spindle rotation command is issued until a cutting command is issued is longer than the spindle acceleration / deceleration time, the spindle acceleration / deceleration time is extended so as to be in time for the cutting command. Thereby, power consumption is reduced without changing the machining time.
[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 the present disclosure is a program optimization device for improving the efficiency of a machining program of a numerical control device, comprising: 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 including executable commands, non-executable blocks including non-executable commands, and rotational speed command blocks including rotational speed commands based on the classification information; a prediction time calculation unit that calculates the prediction time of an executable block when an executable block exists after a rotational speed command block in the machining program; an acceleration calculation unit that calculates a new acceleration of the spindle rotational speed based on the prediction time; and a machining program modification unit that modifies the acceleration of the rotational speed command to the new acceleration and creates a new machining program. 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 blocks containing executable commands that can be executed simultaneously with acceleration or deceleration of the spindle rotation speed, and non-executable blocks containing non-executable commands that cannot be executed simultaneously with acceleration or deceleration of the spindle rotation speed. One or more processors execute the classification information to acquire the machining program of the numerical control device, and based on the classification information, classify the blocks of the machining program into executable blocks containing the executable commands and non-executable blocks containing the non-executable commands. Rotation speed command The rotation speed command block is classified to include the rotation speed command block, and in the machining program, if the executable block is located after the rotation speed command block, the predicted time of the executable block is calculated, and based on the predicted time main shaft The system calculates a new acceleration for the rotational speed, modifies the acceleration of the rotational speed command to the new acceleration, and stores a processor-readable instruction to create a new machining program. [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 how to classify processing programs. [Figure 3] This diagram shows an example of a rapid traverse machining program and the speed changes of the X and Z axes. [Figure 4] This figure shows an example of an acceleration command. [Figure 5A] This diagram shows the change in the rotational speed of the main spindle. [Figure 5B] This figure shows the change in the rotational speed of the main shaft due to a change in acceleration. [Figure 6] This is a flowchart explaining the operation of the program optimization device. [Figure 7] This is a block diagram of the program optimization device of the second disclosure. [Figure 8] This figure shows an example of a method for determining the insertion position of a machining program. [Figure 9] This figure shows an example of the processing in the machining program modification section. [Figure 10] This figure shows an example of the processing in the machining program modification section. [Figure 11] This is a block diagram of the program optimization device of the third disclosure. [Figure 12] This is a block diagram of the program optimization device of the fourth disclosure. [Figure 13] This figure shows the hardware configuration of the program optimization device. [Modes for carrying out the invention]
[0009] [First Disclosure] Hereinafter, the program optimization device 100 of the first disclosure will be described. The program optimization device 100 improves the efficiency of the machining program of the numerical control device. 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.
[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, a predicted time calculation unit 4, an acceleration calculation unit 5, and a machining program correction unit 6.
[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 that classifies the commands included in the machining program into executable commands, non-executable commands, and rotational speed commands. An executable command is a command that can be executed simultaneously with the acceleration or deceleration of the spindle rotational speed. A non-executable command is a command that cannot be executed simultaneously with the acceleration or deceleration of the spindle rotational speed. A rotational speed command is a command that sets the target value of the spindle rotational speed.
[0013] Examples of executable commands include rapid traverse and coolant discharge. There is no problem in simultaneously executing the acceleration or deceleration of the spindle rotational speed and rapid traverse or coolant discharge. Examples of non-executable commands include cutting feed and tool change. For cutting feed, it is necessary to wait until the spindle rotational 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 rotational 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 rotational speed command.
[0014] The machining program classification unit 3 refers to the classification information storage unit 2 and classifies each block of the machining program into executable blocks, executable blocks, and rotation speed command blocks according to the commands (executable commands, non-executable commands, and rotation speed commands) of each block. Figure 2 shows an example of classification. The machining program in Figure 2 is a seven-line machining program with sequence numbers "N01" to "N07". Block "N01" includes the command "M03: spindle forward rotation", block "N02" includes the command "G01: cutting feed", blocks "N04" to "N06" include the command "G00: rapid traverse", block "N03" includes the command "M03: spindle forward rotation", 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 rotation speed command block, block "N02" as an unexecutable block, blocks "N04" to "N06" as executable blocks, block "N03" as a rotation speed command block, and block "N07" as an unexecutable block.
[0015] The predicted time calculation unit 4 calculates the time required to process the executable block (predicted time), and the acceleration calculation unit 5 calculates a new acceleration based on the predicted time. Referring to Figures 3 and 4, the predicted time calculation unit 4 and the acceleration calculation unit 5 will be described. The predicted time calculation unit 4 predicts the time required for each executable block. For example, in the machining program shown in Figure 3, the executable blocks are blocks "N04" through "N06". The acceleration calculation unit 5 predicts the time required for blocks "N04" through "N06". In the example shown in Figure 3, 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 "N04," the spindle is moved "+15 mm" in the X-axis direction, in block "N05," the spindle is moved "+35 mm" in the Z-axis direction, and in block "N06," the spindle is moved "-15 mm" in the X-axis direction. At this time, the speeds of the X and Z axes from block "N04" to "N06" change as shown in the graph in Figure 3, and the predicted time required to execute from block "N04" to "N06" is "0.44 sec." Note that known techniques are used to calculate the predicted time.
[0016] The acceleration calculation unit 5 calculates the new acceleration using the predicted time of the executable block. For example, if the spindle is linearly accelerating and 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.
[0017] The machining program modification unit 6 inserts commands to change the acceleration of the rotation speed command block. Figure 4 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". 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. The block that modifies acceleration should be inserted before the rotation speed command block.
[0018] Figures 5A and 5B are compared to explain the change in spindle rotation speed due to a change in acceleration. Figure 5A 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 "N03". Figure 5B shows the change in rotation speed when the acceleration is changed. When the acceleration is changed, the spindle rotation speed gradually accelerates during the execution of executable blocks "N04", "N05", and "N06", and reaches the target speed before the cutting feed of the non-executable block "N07".
[0019] The operation of the program optimization device 100 will be explained with reference to Figure 6. First, the program optimization device 100 determines whether it has read the entire machining program. If the entire machining program has not been read and there is a next block (Step S1; Yes), the program optimization device 100 reads one block from the machining program (Step S2). The program optimization device 100 determines whether the read block contains a rotation speed command. If the read block contains the rotation speed of the spindle (it is a rotation speed command block) (Step S3), the acceleration calculation unit 5 calculates the increment of the rotation speed of the spindle commanded by the rotation speed command (Step S4). If the read block is not a rotation speed command block (step S3; No) but an executable block (step S5), the prediction time calculation unit 4 calculates the prediction time for the executable block (step S6). Once the prediction time for the read block is calculated, the process proceeds to step S1.
[0020] If the read block is not an executable block (Step S5; No) but an unexecutable block (Step S7; Yes), the acceleration calculation unit 5 calculates the acceleration based on the predicted time of the executable block (Step S8). Once the new acceleration for the rotation speed command block is calculated, the process proceeds to Step S1. Once all blocks have been read (Step S1; No), the machining program modification unit 6 modifies the machining program by changing the acceleration of the rotation speed command block to the acceleration calculated in Step S8 (Step S9).
[0021] As explained above, the program optimization device 100 of the first disclosure determines whether or not a rotation speed command block exists in the machining program. If a rotation speed command block exists, it reads the block immediately following the rotation speed command block. If the read block is an executable block, it calculates the predicted time for executing this block. If the block immediately following this block is also an executable block, it calculates the predicted time for executing this block. This process is repeated until the sum of the predicted times for executing the executable blocks is obtained. The program optimization device 100 changes the acceleration of the rotation speed command block based on the predicted times of the executable blocks. The program optimization device 100 of the first disclosure gradually accelerates the rotation speed of the spindle while executing the commands of the executable blocks. According to the program optimization device 100 of the first disclosure, there is no waiting period for the spindle rotation speed to reach its target, and power consumption can be reduced.
[0022] In addition, although the acceleration calculation unit 5 in the first 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.
[0023] [Second Disclosure] Figure 7 is a block diagram of the program optimization device 100 of the second disclosure. The program optimization device 100 of the second disclosure includes an insertion position determination unit 7. The insertion position determination unit 7 determines the insertion position of the rotation speed command block based on the classification of the blocks in the machining program. The method for determining the insertion position will be explained with reference to Figure 8. Here, we will determine the insertion position of the rotation speed command block with sequence number "N06". The insertion position determination unit 7 reads the classification of block "N05", which is one step prior to the rotation speed command block "N06". In the example in Figure 8, block "N05", which is one step prior to "N06", is an executable block. If "N05" is an executable block, the classification of the block "N04", which is one step prior to it, is read. The classification of "N04" is an executable block. If "N04" is an executable block, the classification of the block "N03", which is one step prior to it, is read. The classification of "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 7 determines that the space between the non-executable block and the executable block is the insertion position for the rotation speed command block "N06".
[0024] The predicted time calculation unit 4 predicts the time required for the executable block that will be executed after the rotation speed command block has been inserted. The acceleration calculation unit 5 calculates a new acceleration using the predicted time of the executable block that is executed after the rotation speed command block after insertion.
[0025] The machining program modification unit 6 inserts a rotation speed command block at the insertion position determined by the insertion position determination unit 7. Figure 9 shows an example of the processing by the machining program modification unit 6. Block "N06" is inserted between the block with sequence number "N02" and the block with sequence number "N03". Then, as shown in Figure 10, a command to change the acceleration is inserted before the inserted block "N06". Note that the sequence number changes from "N06" to "N03" when the block is inserted, but in Figure 9, the original sequence number is used for explanation purposes.
[0026] Figure 10 shows an example of the modified machining program. The machining program modification unit 6 inserts the rotation speed command block "N06" one step before the executable block "N03", and inserts a command to change the acceleration one step before the rotation speed command block "N06".
[0027] As explained above, in the program optimization device 100 of the second disclosure, the rotational speed command block is moved before the executable block. The acceleration or deceleration of the spindle rotational speed and the executable block are executed simultaneously, reducing the waiting time to reach the spindle rotational speed. Furthermore, by changing the acceleration based on the predicted time of the executable block, the acceleration of the spindle rotation speed can be kept low. This eliminates the waiting period for the spindle rotation speed to reach its target and reduces power consumption.
[0028] [Third Disclosure] Figure 11 is a block diagram of the program optimization device 100 of the third disclosure. The program optimization device 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.
[0029] 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 the target 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 modification of the machining program may be accepted.
[0030] Furthermore, while the third disclosure states that the spindle speed waiting time is calculated by simulation, it may also be calculated by actual machining. Alternatively, it may be calculated by idle operation. In addition, the program optimization device 100 may automatically select a machining program with a short spindle speed waiting time.
[0031] [Fourth Disclosure] Figure 12 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 of the machining program on a display unit. The user decides whether or not to modify the machining program based on the modified parts.
[0032] Furthermore, the program optimization device 100 may simultaneously display the spindle speed waiting time as disclosed in the third disclosure and the parts of the machining program that need to be modified as disclosed in the fourth disclosure. The user can then decide whether or not to modify the machining program while checking the spindle speed waiting time and the parts of the machining program that need to be modified.
[0033] As described above, the program optimization device 100 of this disclosure predicts the execution time of executable blocks and calculates a new acceleration. With the new acceleration, the program can be gradually accelerated during the execution time of the executable blocks. By keeping the acceleration low, power consumption is reduced.
[0034] The program optimization device 100 of this disclosure moves the rotational speed command block to the preceding execution block, and simultaneously performs acceleration or deceleration of the rotational speed and processing of the execution block, thereby reducing or eliminating the waiting time to reach the spindle speed.
[0035] 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.
[0036] 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.
[0037] The hardware configuration of the program optimization device 100 to which this disclosure is applied will be described below. Figure 13 is a hardware configuration diagram of the program optimization device 100. As shown in Figure 13, 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.
[0038] The non-volatile memory 114 is backed up, for example by a battery (not shown), so that its memory 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. Various data is also displayed on the display unit 70.
[0039] 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]
[0040] 100 Program Optimization Devices 1. Processing program acquisition unit 2 Classification information storage section 3. Processing Program Classification Unit 4. Prediction Time Calculation Unit 5. Acceleration calculation unit 6. Machining Program Modification Unit 7 Insertion position determination 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 rotation speed command blocks containing rotation speed commands, based on the classification information. In the machining program, if the executable block is located after the rotation speed command block, a prediction time calculation unit calculates the predicted time for the executable block. An acceleration calculation unit calculates a new acceleration of the rotational speed of the main shaft based on the predicted time, A machining program modification unit that modifies the acceleration of the rotational speed command to the new acceleration and creates a new machining program, A program optimization device equipped with the following features.
2. In the machining program, if the executable block is located before the rotation speed command block, the program includes an insertion position determination unit that determines the location before the executable block as the insertion position of the rotation speed command block. The program optimization apparatus according to claim 1, wherein the processing program modification unit inserts the rotation speed command block into the insertion position and modifies the acceleration of the rotation speed command to the new acceleration.
3. The program optimization apparatus according to claim 2, wherein the insertion position determination unit determines, if the non-executable block is located before the executable block, the position behind the non-executable block as the insertion position of the block including the rotation speed command.
4. 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 based on the aforementioned predicted time, The program optimization device according to claim 1, wherein the processing program modification unit modifies the acceleration of the rotational speed command to the new acceleration.
5. A simulation unit that performs simulation of the aforementioned machining program, A time comparison unit that 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:
6. The numerical control device stores classification information that classifies the commands included in the machining program into executable blocks containing executable commands that can be executed simultaneously with acceleration or deceleration of the spindle rotation speed, and non-executable blocks containing non-executable commands that cannot be executed simultaneously with acceleration or deceleration of the spindle rotation speed. One or more processors execute, The machining program of the numerical control device 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 the executable block is located after the rotation speed command block, the predicted time for the executable block is calculated. Based on the aforementioned predicted time, a new acceleration of the spindle's rotational speed is calculated. The acceleration of the aforementioned rotational speed command is modified to the new acceleration to create a new machining program. A storage medium for storing instructions that the processor can read.