Optimizing treatment equipment
By analyzing and processing the NC instruction code in the machining program through the optimization processing device, the problems of slowing down the machine tool movement and prolonging the cycle time in the prior art are solved, and the effect of speeding up the machine tool movement speed and shortening the cycle time is achieved.
Patent Information
- Application Number
- CN202011128941.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-10-23
- Filing Date
- 2020-10-20
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2040-10-20
Smart Images

Figure CN112698624B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an optimization processing device. Background Art
[0002] The machining program is generated by, for example, a CAD / CAM device or a machine tool operator, etc. NC command codes such as preparation functions (G functions) and auxiliary functions (M functions) included in the machining program are mostly standardized by JIS B6314 or the like.
[0003] However, unlike standards such as JIS B6314, NC command codes such as G functions and M functions for various additional functions for improving the functions of machine tools are designed for each machine tool manufacturer.
[0004] In this regard, the following technology is known, which refers to a conversion table storing the correspondence between the own NC command code and other NC command codes that specify the same function as the NC command code, converts the NC command code of the input machining program in a different format into the own NC command code to execute the machining program. For example, refer to Patent Document 1.
[0005] In addition, machining programs are generated for various machine tools through the post-processor of the CAD / CAM device. However, since the generated machining programs emphasize reliable operation, unnecessary NC instruction codes or repetitions of G functions (hereinafter also referred to as "G codes") and M functions (hereinafter also referred to as "M codes") are sometimes inserted. In addition, the order of processing does not necessarily take the processing time into consideration. Therefore, there is a problem of slowing down the operation of the machine tool and extending the cycle time. In addition, the machining programs generated by operators, especially operators who are not familiar with the machining programs, also have the same problem.
[0006] Patent Document 1: Japanese Patent Application Laid-Open No. 10-320027 Summary of the invention
[0007] Therefore, it is desired to optimize the NC command codes included in the generated machining program to speed up the operation of the machine tool.
[0008] One method of the optimization processing device disclosed in the present invention comprises: a program block analysis unit, which analyzes the preparation function code and / or auxiliary function code of each program block included in a first program (hereinafter also referred to as a "source program"); a code processing unit, which processes the preparation function code and / or auxiliary function code of a plurality of consecutive program blocks based on the analysis result of the program block analysis unit to optimize the first program; and a program generation unit, which generates the first program after optimization by the code processing unit into a second program (hereinafter also referred to as a "target program").
[0009] According to one embodiment, NC command codes included in a generated machining program can be optimized to speed up the operation of a machine tool. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 This is a functional block diagram showing an example of a functional configuration of a control system according to one embodiment.
[0011] Figure 2A An example of a source program for explaining the deletion processing of the deletion processing unit is shown.
[0012] Figure 2B This shows an example of a source program after deletion.
[0013] Figure 3A An example of a source program for explaining the merging process of program blocks in the second merging process unit is shown.
[0014] Figure 3B This shows an example of a source program after the merge process.
[0015] Figure 4A An example of a source program for explaining the merging process of program blocks in the second merging process unit is shown.
[0016] Figure 4B This shows an example of a source program after the merge process.
[0017] Figure 5A An example of a source program for explaining the reordering process performed by the program block reordering processing unit is shown.
[0018] Figure 5B This shows an example of a source program after rearrangement processing.
[0019] Fig. 6A An example of a source program for explaining the reordering process of the coordinate value reordering processing unit is shown.
[0020] Figure 6B express Fig. 6A An example of a machine tool tool path in a source program.
[0021] Fig. 7A This shows an example of a source program after rearrangement processing.
[0022] Figure 7B express Fig. 7A An example of a machine tool tool path in a source program.
[0023] Fig. 8A An example of a source program for explaining the replacement processing of the replacement processing unit is shown.
[0024] Figure 8B This shows an example of a source program after replacement processing.
[0025] Fig. 9 This is a flowchart for explaining the optimization process of the numerical control device.
[0026] Fig.10 Yes means Fig. 9 Flow chart of the subsequent optimization process.
[0027] Fig.11 Yes means Fig. 9 Flow chart of the subsequent optimization process.
[0028] Fig.12 Yes means Fig. 9 Flow chart of the subsequent optimization process.
[0029] Fig.13 Yes means Fig. 9 Flow chart of the subsequent optimization process.
[0030] Fig.14 An example of the configuration of a control system is shown.
[0031] Fig.15 This shows an example of a human-machine interface.
[0032] Description of Reference Numerals
[0033] 1: control system, 10: numerical control device, 20: machine tool, 111: program block analysis unit, 112: code processing unit, 1121: deletion processing unit, 1122: first merging processing unit 1123: second merging processing unit, 1124: program block rearrangement processing unit, 1125: coordinate value rearrangement processing unit, 1126: substitution processing unit, 113: information output unit, 114: NC program generation unit, 210: source program, 220: target program. DETAILED DESCRIPTION
[0034] <Implementation Method 1>
[0035] First, the outline of this embodiment is described. In this embodiment, the optimization processing device analyzes the preparation function code and / or auxiliary function code of each program block included in the first program. Based on the analysis result, the optimization processing device performs optimization processing on the preparation function code and / or auxiliary function code of multiple consecutive program blocks to shorten the processing time, optimizes the first program, and generates the optimized first program into the second program.
[0036] Therefore, according to the present embodiment, it is possible to solve the problem of “optimizing the NC command codes included in the generated machining program and speeding up the operation of the machine tool”.
[0037] The above is an overview of the present embodiment.
[0038] Next, the structure of this embodiment is described in detail using the drawings.
[0039] Figure 1 1 is a functional block diagram showing an example of a functional structure of a control system according to an embodiment. Figure 1 As shown, the control system 1 includes a numerical control device 10 and a machine tool 20 .
[0040] The numerical control device 10 and the machine tool 20 can be directly connected to each other via a connection interface not shown. In addition, the numerical control device 10 and the machine tool 20 can also be connected to each other via a network not shown, such as a LAN (Local Area Network) and the Internet. In this case, the numerical control device 10 and the machine tool 20 are equipped with a communication unit not shown for communicating with each other through such a connection. In addition, as described later, the machine tool 20 may also include the numerical control device 10.
[0041] The numerical controller 10 is a well-known numerical controller for those skilled in the art, and generates an action command based on the control information, and sends the generated action command to the machine tool 20. Thus, the numerical controller 10 controls the action of the machine tool 20. In addition, when the machine tool 20 is a robot or the like, the numerical controller 10 may also be a robot control device or the like.
[0042] The numerical controller 10 is not limited to controlling the machine tool 20 or the robot, but can be widely applied to all industrial machines. Industrial machines include various machines such as machine tools, industrial robots, service robots, forging machines, and injection molding machines.
[0043] like Figure 1 As shown, the numerical control device 10 has a control unit 100 and a storage unit 200. In addition, the control unit 100 has an optimization unit 110 and a program execution unit 120 in order for the numerical control device 10 to operate as an optimization processing device. In addition, the optimization unit 110 has a program block analysis unit 111, a code processing unit 112, an information output unit 113, and an NC program generation unit 114. In addition, the code processing unit 112 has a deletion processing unit 1121, a first merging processing unit 1122, a second merging processing unit 1123, a program block rearrangement processing unit 1124, a coordinate value rearrangement processing unit 1125, and a substitution processing unit 1126.
[0044] <Storage Unit 200>
[0045] The storage unit 200 is a RAM, a HDD, etc. The storage unit 200 stores a source program 210 and an object program 220 .
[0046] The source program 210 is a machining program before optimization that is generated and acquired by an external device such as a CAD / CAM device, an operator of the machine tool 20 , or the like.
[0047] The target program 220 is a machining program after the source program 210 is optimized and generated by the NC program generation unit 114 and processed by the code processing unit 112 .
[0048] <Control Unit 100>
[0049] The control unit 100 includes a CPU, a ROM, a RAM, a CMOS memory, and the like, and these are configured to be communicable with each other via a bus, which is well known to those skilled in the art.
[0050] The CPU is a processor that controls the entire numerical control device 10. The CPU reads out the system program and application program stored in the ROM via the bus, and controls the entire numerical control device 10 according to the system program and application program. Figure 1 As shown, the control unit 100 is configured to realize the functions of a program block analysis unit 111, a code processing unit 112, an information output unit 113, and an NC program generation unit 114. The RAM stores various data such as temporary calculation data and display data. The CMOS memory is backed up by a battery (not shown) and is configured as a non-volatile memory that maintains the storage state even if the power supply of the numerical control device 10 is turned off.
[0051] The block analysis unit 111 obtains, for example, a machining program generated by an external device such as a CAD / CAM device and / or an operator as a source program 210 from the storage unit 200. The block analysis unit 111 analyzes the preparation function code (G code) and / or the auxiliary function code (M code) corresponding to each block included in the obtained source program 210.
[0052] In addition, the source program 210 is based on the standards of, for example, JIS B6315-1 and JIS B6315-2.
[0053] The code processing unit 112 optimizes the predetermined preparation function codes and / or predetermined auxiliary function codes of a plurality of consecutive program blocks of the source program 210 based on the analysis result of the program block analyzing unit 111 , and optimizes the source program 210 .
[0054] The deletion processing unit 1121 determines that the preparation function code is unnecessary duplication of the preparation function code when the preparation function code is not a code that affects only the program block in which it appears in the plurality of consecutive program blocks and the preparation function code is the same as the preparation function code of other consecutive program blocks. The deletion processing unit 1121 deletes the preparation function code of the program blocks other than the initial program block.
[0055] Figure 2A and 2B This is a diagram for explaining an example of the source program 210 for the deletion process of the deletion processing unit 1121.
[0056] Figure 2A The source program 210 first moves the tool (not shown) of the machine tool 20 from the current tool position in the X-axis direction by "-10" and in the Y-axis direction by "+10" at a speed of "F350" through linear interpolation. Next, the source program 210 moves the tool (not shown) of the machine tool 20 from the moved position in the X-axis direction by "-10" and in the Y-axis direction by "-10" at a speed of "F350" through linear interpolation. Finally, the source program 210 moves the tool (not shown) of the machine tool 20 from the moved position in the X-axis direction by "+10" and in the Y-axis direction by "+10" at a speed of "F350" through linear interpolation.
[0057] In addition, since the preparatory function codes for "G91" and "G01" are modal group codes, once set, they are valid until the setting is changed or canceled. Figure 2B As shown, the deletion processing unit 1121 deletes Figure 2A The source program 210 is thus optimized, and the processing of the numerical controller 10 can be reduced when executing the target program 220, thereby shortening the execution time.
[0058] The first merging processing unit 1122 merges a plurality of consecutive program blocks when the preparation function code is not a code that affects only the program block in which it appears, and the preparation function code is a code of a modal group different from the preparation function codes of other consecutive program blocks.
[0059] The second merging processing unit 1123 merges multiple program blocks when, in multiple consecutive program blocks, the preparation function code is not a code that only affects the program block in which it appears, and the preparation function code is a code of a modal group different from the preparation function codes of other consecutive program blocks, and when the auxiliary function codes contained in other program blocks do not need to be separately indicated to other program blocks and are not opposite actions.
[0060] Figure 3A and 3B 11 is a diagram for explaining an example of the source program 210 for explaining the merging process of program blocks in the second merging processing unit 1123 .
[0061] Figure 3AThe source program 210 executes the tool change command "M6" in the program block of line 3 and the positioning command "G00" in the program block of line 4. Here, the positioning command "G00" is not a code that affects only the program block of line 4, but is a code of a modal group different from the tool length correction cancellation command "G49" of the continuous program block of line 3. In addition, the tool change command "M6" does not need to be separately indicated to other program blocks, and it is not a reverse action. Therefore, if Figure 3B As shown, the second merging processing unit 1123 merges the tool change command "M6" of the 3rd program block with the positioning command "G00" of the 4th program block. Thus, the source program 210 is optimized, and the tool change command "M6" and the positioning command "G00" can be executed simultaneously, which can shorten the cycle time.
[0062] Figure 4A and 4B 11 is a diagram for explaining an example of the source program 210 for explaining the merging process of program blocks in the second merging processing unit 1123 .
[0063] Figure 4A The source program 210 executes the tool length correction instruction "G43" in the program block of the second line, and executes the spindle rotation instruction "M3" in the program block of the third line. Here, the tool length correction instruction "G43" is not a code that only affects the program block of the second line, but is a code of a different modal group from the tool length correction cancellation instruction "G49" in the continuous program block of the first line. In addition, the spindle rotation instruction "M3" does not need to be separately indicated to other program blocks, and it is not an opposite action. Therefore, if Figure 4B As shown, the second merging processing unit 1123 merges the tool length correction command "G43" of the second program block with the spindle rotation command "M3" of the third program block. As a result, the source program 210 is optimized, and the tool length correction command "G43" and the spindle rotation command "M3" can be executed simultaneously, and the processing time of the auxiliary function code is unlikely to affect the cycle time.
[0064] The block reordering processing unit 1124 reorders the order of the plurality of blocks when the auxiliary function code in the plurality of consecutive blocks is not an operation opposite to the preparation function code or the auxiliary function code included in the previous block.
[0065] Figure 5A and 5B This is a diagram for explaining an example of the source program 210 to be subjected to the reordering process by the program block reordering processing unit 1124 .
[0066] Figure 5AThe source program 210 first executes the positioning instruction "G00", executes the coolant discharge instruction "M08", and executes the linear interpolation movement instruction "G01". Here, the coolant discharge instruction "M08" is not an action opposite to the preparatory function code of the positioning instruction "G00" and the linear interpolation movement instruction "G01". Therefore, Figure 5B As shown, the block rearrangement processing unit 1124 interchanges the coolant discharge instruction "M08" with the positioning instruction "G01" of the block on line 1. Thus, the source program 210 is optimized and the execution time can be shortened.
[0067] In addition, even if the coolant discharge command "M08" is instructed, there is a time delay before the coolant is actually discharged. Therefore, by moving the coolant discharge command "M08" from before the linear interpolation movement command "G01" of the program block on line 3 to before the positioning command "G00", it can be confirmed that the coolant is discharged, so that the machine tool 20 can perform the processing operation.
[0068] In a plurality of consecutive program blocks, when the preparation function code of the first program block is a preparation function code of a fixed period, and the preparation function code of the last program block is a cancellation preparation function code of a fixed period corresponding to the preparation function code of the first program block, the coordinate value rearrangement processing unit 1125 rearranges a plurality of coordinate values specified by a dimension word between the plurality of program blocks so that the total of the moving distance or the moving time between the coordinate values is minimized.
[0069] Fig. 6A and Figure 6B as well as Fig. 7A and Figure 7B This is a diagram showing an example of a source program 210 for explaining the reordering process of the coordinate value reordering processing unit 1125 .
[0070] Fig. 6A The source program 210 has a fixed cycle preparation function code, i.e., drilling cycle, point boring cycle instruction "G81" in the first line of the program block, and a fixed cycle cancellation instruction "G80" corresponding to "G81" in the fourth line of the program block. Figure 6B As shown, the source program 210 moves a tool such as a drill (not shown) of the machine tool 20 in order from the command position A to the command position D based on the coordinate values specified by the dimension numbers between the program blocks of the 1st to 4th lines.
[0071] However, in Figure 6BIn the path shown, the moving distance of the tool (not shown) of the machine tool 20 is unnecessarily extended, and the cycle time is extended. Therefore, the coordinate value rearrangement processing unit 1125 optimizes the order of moving from the command position A to the command position D, for example, so that the total moving distance or moving time is minimized by considering the command position A to the command position D as nodes in the traveling salesman problem.
[0072] In addition, the traveling salesman problem is a well-known method, and detailed description is omitted. In addition, the method of optimizing the order of moving in a way that the total of the moving distance or the moving time is minimized is not limited to the traveling salesman problem, and other well-known methods can also be used.
[0073] Fig. 7A This is a diagram showing an example of the source program 210 after the rearrangement processing. Figure 7B It is shown Fig. 7A FIG. 2 is a diagram showing an example of a path of a tool (not shown) of a machine tool in a source program 210 .
[0074] like Fig. 7A As shown, Fig. 6A By rearranging the coordinate values of the program blocks at lines 2 and 3 in the source program 210, as shown in FIG. Figure 7B As shown, a tool such as a drill (not shown) of the machine tool 20 moves in the order of command position A, command position C, command position B, and command position D. As a result, the cumulative moving distance of the tool (not shown) of the machine tool 20 is shortened, and the cycle time can be shortened.
[0075] In addition, based on the traveling salesman problem, when the distance between the instruction positions is regarded as the cost and the moving distance is regarded as the evaluation function, Figure 6B The evaluation function of the path shown is "48", Figure 7B The evaluation function of the path shown is "40". That is, Figure 7B The path shown is the minimum.
[0076] The replacement processing unit 1126 replaces the multiple program blocks with a combination of interpolated preparation function codes from the fixed period preparation function code when, among multiple consecutive program blocks, the preparation function code of the initial program block is a preparation function code of a fixed period and the preparation function code of the last program block is a canceled preparation function code of the fixed period corresponding to the preparation function code of the initial program block.
[0077] Fig. 8A and Figure 8B 11 is a diagram for explaining an example of the source program 210 to be subjected to replacement processing by the replacement processing unit 1126 .
[0078] Fig. 8AThe source program 210 has a drilling cycle and a point boring cycle instruction "G81" as a fixed cycle preparation function code in the first line of the program block, and a fixed cycle cancel instruction "G80" corresponding to "G81" in the second line of the program block. In this case, Figure 8B As shown, the replacement processing unit 1126 replaces the fixed-cycle preparation function code such as the drilling cycle and the point boring cycle instruction "G81" with various interpolation preparation function codes such as the positioning instruction "G00" or the linear interpolation movement instruction "G01". In this way, the execution time can be shortened by replacing the fixed-cycle preparation function code with various interpolation preparation function codes.
[0079] The information output unit 113 outputs information indicating the processing content performed by the code processing unit 112 to the previous or next program block of the program block including the preparation function code or auxiliary function code optimized by the code processing unit 112. The information output unit 113 outputs the source program 210 to which the information is output to the NC program generation unit 114.
[0080] In addition, the information output unit 113 may output information indicating the processing contents performed by the code processing unit 112 to a display unit (not shown) such as a liquid crystal display included in the numerical controller 10. Furthermore, the display unit (not shown) may also display the processing contents performed by the code processing unit 112. Thus, the operator of the numerical controller 10 can confirm what processing has been performed on the source program 210.
[0081] Furthermore, the information output unit 113 may calculate a predicted value of the execution time of the target program 220 based on the processing content performed by the code processing unit 112, and output the predicted value to a display unit (not shown). Furthermore, the display unit (not shown) may display the predicted value calculated by the information output unit 113. Thus, the operator of the numerical controller 10 can confirm how much the execution time is shortened by the optimization processing of the source program 210.
[0082] The NC program generation unit 114 generates the source program 210 optimized by the code processing unit 112 as a target program 220 .
[0083] Specifically, the NC program generation unit 114 generates the object program 220 from the source program 210 processed by the code processing unit 112 . Then, the NC program generation unit 114 stores the generated object program 220 in the storage unit 200 .
[0084] The NC program generating unit 114 generates the target program 220 separately from the source program 210 , but the target program 220 may be generated by replacing the source program 210 .
[0085] The program execution unit 120 reads the target program 220 generated by the NC program generation unit 114 from the storage unit 200 and executes it. The program execution unit 120 generates an operation command based on the target program 220 and sends the generated operation command to the machine tool 20 to control the operation of the machine tool 20.
[0086] <Optimization Processing of Numerical Control Device 10>
[0087] Next, the operation related to the optimization process of the numerical controller 10 according to the present embodiment will be described.
[0088] Figures 9 to 13 2 is a flowchart for explaining the optimization process of the numerical control device 10. The flow shown here is repeatedly executed every time a new source program 210 is obtained.
[0089] exist Fig. 9 In step S11, the program block analysis unit 111 determines whether the program block of the source program 210 includes an auxiliary function code. If the auxiliary function code is included, the process proceeds to step S12. On the other hand, if the auxiliary function code is not included, the process proceeds to step S13.
[0090] In step S12, the program block analysis unit 111 determines whether the program block of the source program 210 contains a preparation function code. If the preparation function code is contained, the process proceeds to Fig.12 On the other hand, if the preparation function code is not included, the process proceeds to step S41. Fig.11 Step S31.
[0091] In step S13, the block analysis unit 111 determines whether the block of the source program 210 includes a preparation function code. If the preparation function code is included, the process proceeds to step S14. On the other hand, if the preparation function code is not included, the process proceeds to step S15.
[0092] In step S14, the deletion processing unit 1121 determines whether the preparation function code of the program block determined in step S13 is a preparation function code valid only for the above program block. If it is a preparation function code valid only for the above program block, the processing proceeds to step S15. On the other hand, if it is not a preparation function code valid only for the above program block, that is, it is a preparation function code valid for other program blocks, the processing proceeds to step S16. Fig.10 Step S21.
[0093] In step S15 , the code processing unit 112 generates a processed instruction code. Then, the numerical controller 10 ends the optimization process.
[0094] exist Fig.10In step S21 of Fig. 9 In step S14, it is determined whether the preparation function code of the program block is the same as the preparation function code of the previous program block before the above program block. In the case of the same preparation function code as the previous program block, the processing proceeds to step S22. On the other hand, in the case of a preparation function code different from the previous program block, the processing proceeds to step S23.
[0095] In step S22, the deletion processing unit 1121 and Figure 2B The same as the case of , delete the preparation function code of the program block other than the initial program block.
[0096] In step S23, the second merge processing unit 1123 determines whether the preparation function code of the program block determined in step S21 includes the preparation function code of the same modal group as the previous program block. In the case of including the preparation function code of the same modal group as the previous program block, the processing proceeds to step S29. On the other hand, in the case of including the preparation function code of the modal group different from the previous program block, the processing proceeds to step S24.
[0097] In step S24, the coordinate value rearrangement processing unit 1125 determines whether the program block determined in step S23 includes a fixed-cycle preparation function code. If it includes a fixed-cycle preparation function code, the process proceeds to step S25. On the other hand, if it does not include a fixed-cycle preparation function code, the process proceeds to step S26. Fig.13 Step S51.
[0098] In step S25, the coordinate value rearrangement processing unit 1125 saves the coordinate value (address) of the instruction position in the program block that appears after the program block determined in step S24, and reads in the program block containing the canceled preparation function code of the fixed period corresponding to the preparation function code of the program block determined in step S24.
[0099] In step S26 , the coordinate value rearrangement processing unit 1125 solves the traveling salesman problem by using the moving distance or moving time between the command positions as an evaluation function for the coordinate values of the command positions stored in step S25 , thereby changing the order of movement.
[0100] In step S27, the replacement processing unit 1126 replaces the fixed-cycle preparation function code with a combination of various interpolation preparation function codes including positioning instruction "G00", linear interpolation movement instruction "G01", clockwise circular interpolation "G02" and counterclockwise circular interpolation "G03".
[0101] In step S28, the information output unit 113 generates a character string (information) indicating the content of the processing performed by the code processing unit 112, and outputs the generated character string to the previous or next program block of the program block containing the preparation function code processed in step S26 or step S27.
[0102] In step S29, the code processing unit 112 generates a processed instruction code. Then, the numerical controller 10 ends the optimization process.
[0103] exist Fig.11 In step S31, the block reordering processing unit 1124 determines that Figure 1 In step S12, it is determined whether the auxiliary function code of the program block cannot be executed simultaneously with the preparation function code. When the auxiliary function code cannot be executed simultaneously with the preparation function code, the processing enters step S32. On the other hand, when the auxiliary function code can be executed simultaneously with the preparation function code, the processing enters step S35.
[0104] In step S32, the block reordering processing unit 1124 determines whether the auxiliary function code affects the operation of the preparation function code. When the auxiliary function code does not affect the operation of the preparation function code, the process proceeds to step S33. On the other hand, when the auxiliary function code affects the operation of the preparation function code, the process proceeds to step S38.
[0105] In step S33, the block reordering processing unit 1124 and Figure 5B The same situation is the same, moving the program block of auxiliary function code forward.
[0106] In step S34, the information output section 113 generates a character string indicating the content of the processing performed by the code processing section 112, and outputs the generated character string to the previous or next program block of the program block including the auxiliary function code processed in step S33.
[0107] In step S35, the second merge processing unit 1123 determines whether the previous program block contains auxiliary function codes that cannot be executed simultaneously. If the previous program block does not contain auxiliary function codes that cannot be executed simultaneously, the process proceeds to step S36. On the other hand, if the previous program block contains auxiliary function codes that cannot be executed simultaneously, the process proceeds to step S38.
[0108] In step S36, Figure 3B and 4B The second merging processing unit 1123 merges the auxiliary function code with the previous program block.
[0109] In step S37 , the information output section 113 generates a character string indicating the contents of the processing result, and outputs the generated character string to a block before or after the block including the auxiliary function code processed in step S36 .
[0110] In step S38, the code processing unit 112 generates a processed instruction code. Then, the numerical controller 10 ends the optimization process.
[0111] exist Fig.12 In step S41, the second merge processing unit 1123 determines Fig. 9 In step S12, it is determined whether the program block includes the preparation function code of the same modal group as the previous program block. In the case where the preparation function code of the same modal group as the previous program block is included, the processing proceeds to step S45. On the other hand, if the preparation function code of the same modal group as the previous program block is not included, the processing proceeds to step S42.
[0112] In step S42, the second merge processing unit 1123 determines whether the previous program block contains auxiliary function codes that cannot be executed simultaneously. If the previous program block does not contain auxiliary function codes that cannot be executed simultaneously, the process proceeds to step S43. On the other hand, if the previous program block contains auxiliary function codes that cannot be executed simultaneously, the process proceeds to step S45.
[0113] In step S43, the second merge processing unit 1123 merges the preparation function code and the auxiliary function code with the previous program block.
[0114] In step S44, the information output unit 113 generates a character string indicating the content of the processing performed by the code processing unit 112, and outputs the generated character string to the previous or next program block of the program block containing the preparation function code and / or auxiliary function code processed in step S43.
[0115] In step S45, the code processing unit 112 generates a processed instruction code. Then, the numerical controller 10 ends the optimization process.
[0116] exist Fig.13 In step S51, the first merge processing unit 1122 determines whether the previous program block does not contain auxiliary function codes that cannot be executed simultaneously. If the previous program block does not contain auxiliary function codes that cannot be executed simultaneously, the processing proceeds to step S52. On the other hand, if the previous program block contains auxiliary function codes that cannot be executed simultaneously, the processing proceeds to step S54.
[0117] In step S52, the first merge processing unit 1122 merges the prepared function code with the previous program block.
[0118] In step S53, the information output unit 113 generates a character string indicating the content of the processing performed by the code processing unit 112, and outputs the generated character string to the previous or next block of the block including the preparation function code processed in step S52.
[0119] In step S54, the code processing unit 112 generates a processed instruction code. Then, the numerical controller 10 ends the optimization process.
[0120] As described above, the numerical control device 10 of one embodiment performs deletion processing, merging processing, program block rearrangement processing, coordinate value rearrangement processing, and replacement processing according to the instruction contents and arrangement of the preparation function code and auxiliary function code in each program block of the source program 210. As a result, the numerical control device 10 can optimize the NC instruction code included in the generated machining program and speed up the operation of the machine tool 20. In addition, the cycle time can be shortened.
[0121] Although one embodiment has been described above, the numerical control device 10 is not limited to the above embodiment, and includes modifications, improvements, etc. within a range that can achieve the purpose.
[0122] <Modification 1>
[0123] In the above embodiment, the numerical controller 10 is exemplified as a device different from the machine tool 20 , but a part or all of the functions of the numerical controller 10 may be provided in the machine tool 20 .
[0124] In addition, part or all of the functions of the optimization unit 110 of the numerical control device 10 may be realized as an optimization processing device by an information processing device such as a computer.
[0125] Alternatively, for example, the server may include a portion or all of the block analysis unit 111, the deletion processing unit 1121, the first merging processing unit 1122, the second merging processing unit 1123, the block rearrangement processing unit 1124, the coordinate value rearrangement processing unit 1125, the replacement processing unit 1126, the program execution unit 120, and the storage unit 200 of the numerical controller 10. In addition, the functions of the numerical controller 10 may be implemented in the cloud using a virtual server function or the like.
[0126] Furthermore, the numerical controller 10 may be a distributed processing system in which the functions of the numerical controller 10 are appropriately distributed among a plurality of servers.
[0127] <Modification 2>
[0128] In addition, for example, in the above-mentioned embodiment, the information output unit 113 outputs information indicating the processing content performed by the code processing unit 112 to the previous or next program block of the program block including the preparation function code or auxiliary function code processed by the code processing unit 112, but the present invention is not limited to this. For example, the information output unit 113 may output information indicating the processing content performed by the code processing unit 112 to the display unit (not shown) of the numerical controller 10. And the display unit (not shown) displays the processing content performed by the code processing unit 112. Thus, the operator of the numerical controller 10 can confirm what kind of processing is performed on the source program 210.
[0129] Furthermore, the information output unit 113 may calculate a predicted value of the execution time of the target program 220 based on the processing content performed by the code processing unit 112, and output the predicted value to a display unit (not shown). Furthermore, the display unit (not shown) may also display the predicted value calculated by the information output unit 113. Thus, the operator of the numerical control device 10 can confirm how much the execution time is shortened by the optimization processing for the source program 210.
[0130] <Variation 3>
[0131] In addition, for example, in the above-mentioned embodiment, the numerical control device 10 generates the target program 220 corresponding to one machine tool 20, but the present invention is not limited thereto. Fig.14 As shown, the numerical control device 10 can generate a target program 220 (m is an integer greater than or equal to 2) for each of the m machine tools 20A(1)-20A(m) connected to the network 50. Furthermore, the numerical control device 10 can provide the target program 220 to a numerical control device (not shown) included in each of the machine tools 20A(1)-20A(m) and execute it. In addition, the machine tools 20A(1)-20A(m) can be machine tools of the same type (version) or machine tools of different types (versions).
[0132] However, when the machine tools 20A(1)-20A(m) are of different types (versions), the numerical control device 10 may store a plurality of optimizers corresponding to the types (versions) of the machine tools 20A(1)-20A(m) in advance in the storage unit 200. In addition, the numerical control device 10 may store an optimizer table in advance in which the types (versions) of the machine tools 20A(1)-20A(m) and the optimizers are associated with each other in the storage unit 200. Thus, the numerical control device 10 can generate the optimized target program 220 according to the types (versions) of the machine tools 20A(1)-20A(m).
[0133] In addition, each of the machine tools 20A(1)-20A(m) is connected to Figure 1Hereinafter, when it is not necessary to distinguish between machine tools 20A(1)-20A(m), they are also referred to as "machine tool 20A".
[0134] In addition, if Fig.15 As shown, the numerical controller 10 may display a human-machine interface 300 on a display unit (not shown) of the numerical controller 10 instead of the optimizer table. In this case, the numerical controller 10 allows the operator to select the version (type) of the machine tool 20A that executes the source program 210 on the human-machine interface 300 via an input unit (not shown) such as a touch panel included in the numerical controller 10.
[0135] Fig.15 An example of a human-machine interface 300 is shown.
[0136] like Fig.15 As shown, human-machine interface 300 has a selection display area 310 that displays the version of machine tool 20A, a display area 320 that displays processing contents corresponding to the selected version, and a display area 330 that displays additional processing contents corresponding to the selected version.
[0137] Therefore, the operator of the numerical control device 10 can easily understand what processing is executed in the optimization processing for the source program 210 by selecting the version of the machine tool 20A.
[0138] In addition, each function included in the numerical control device 10 of one embodiment can be realized by hardware, software, or a combination of these. Here, realization by software means realization by a computer reading and executing a program.
[0139] Various types of non-transitory computer readable media (Non-transitory computer readable medium) can be used to store the program and provide it to the computer. Non-transitory computer readable media include various types of tangible recording media (Tangible storage medium). Examples of non-transitory computer readable media include magnetic recording media (e.g., floppy disks, magnetic tapes, hard disk drives), optical magnetic recording media (e.g., optical magnetic disks), CD-ROMs (Read Only Memory), CD-Rs, CD-R / Ws, semiconductor memories (e.g., mask ROMs, PROMs (Programmable ROMs), EPROMs (Erasable PROMs), flash ROMs, RAMs). The program can also be provided to the computer via various types of transient computer readable media (Transitory computer readable medium). Examples of transient computer readable media include electrical signals, optical signals, and electromagnetic waves. Transient computer readable media can provide the program to the computer via wired communication paths such as wires and optical fibers or wireless communication paths.
[0140] In addition, the steps describing the program recorded in the recording medium include not only processes executed chronologically in that order but also processes executed in parallel or individually even if not necessarily processed chronologically.
[0141] In other words, the optimization processing device of the present disclosure can adopt various implementations with the following structures.
[0142] (1) The optimization processing device (numerical control device 10) disclosed in the present invention comprises: a program block analysis unit 111, which analyzes the preparation function code and / or auxiliary function code of each program block included in the source program 210; a code processing unit 112, which processes the preparation function code and / or auxiliary function code of a plurality of consecutive program blocks based on the analysis result of the program block analysis unit 111 to optimize the source program 210; and a program generation unit 114, which generates the source program 210 optimized by the code processing unit 112 as a target program 220.
[0143] According to this optimization processing device, it is possible to optimize the NC command codes included in the generated machining program and speed up the operation of the machine tool.
[0144] (2) In the optimization processing device described in (1), the code processing unit 112 may include: a deletion processing unit 1121, which deletes the preparation function codes of program blocks other than the initial program block when, among multiple consecutive program blocks, the preparation function code is not a code that only affects the program block in which it appears, and when the preparation function code is the same as the preparation function code of other consecutive program blocks.
[0145] Therefore, the optimization processing device can shorten the execution time of the target program 220.
[0146] (3) In the optimization processing device described in (1) or (2), the code processing unit 112 may include: a first merging processing unit 1122, which merges the multiple program blocks when, in a plurality of consecutive program blocks, the prepared function code is not a code that affects only the program block in which it appears, and the prepared function code is a code of a modal group different from the prepared function codes of other consecutive program blocks; and a second merging processing unit 1123, which merges the above-mentioned multiple program blocks when, in a plurality of consecutive program blocks, the prepared function code is not a code that affects only the program block in which it appears, and the prepared function code is a code of a modal group different from the prepared function codes of other consecutive program blocks, and when the auxiliary function codes contained in the other program blocks do not need to be separately indicated to the other program blocks and are not opposite actions.
[0147] Thus, optimizing the processing equipment can shorten the cycle time.
[0148] (4) In the optimization processing device described in any one of (1) to (3), the code processing unit 112 may include: a program block rearrangement processing unit 1124, which rearranges the order of the multiple program blocks when the auxiliary function code in the consecutive multiple program blocks is not an action opposite to the preparation function code or the auxiliary function code included in the previous program block; and a coordinate value rearrangement processing unit 1125, which, in the consecutive multiple program blocks, when the preparation function code of the initial program block is a preparation function code of a fixed period and the preparation function code of the last program block is a cancellation preparation function code of the fixed period corresponding to the preparation function code of the initial program block, rearranges the multiple coordinate values specified by dimension numbers between the multiple program blocks so that the total moving distance or moving time between the coordinate values is minimized.
[0149] As a result, the optimization processing device can shorten the execution time and cycle time of the target program 220 .
[0150] (5) In the optimization processing device described in any one of (1) to (4), the code processing unit 112 may include: a replacement processing unit 1126, which replaces multiple program blocks from the fixed-period preparation function code with a combination of interpolated preparation function codes when the preparation function code of the initial program block in a plurality of consecutive program blocks is a fixed-period preparation function code and the preparation function code of the final program block is a canceled preparation function code of the fixed period corresponding to the preparation function code of the initial program block.
[0151] Therefore, the optimization processing device can shorten the execution time of the target program 220.
[0152] (6) In the optimization processing device described in any one of (1) to (5), the program generation unit 114 may generate the target program 220 by replacing the source program 210 .
[0153] Thus, the optimization processing device can save the storage capacity of the storage unit 200.
[0154] (7) In the optimization processing device described in any one of (1) to (5), the program generation unit 114 may generate the generated object program 220 as a new program different from the source program 210 .
[0155] Thus, the optimization processing device can generate a target program 220 for each machine tool 20 using one source program 210 .
[0156] (8) In the optimization processing device described in any one of (1) to (7), there may be: an information output unit 113, which outputs information representing the processing content performed by the code processing unit 112 to the previous or next program block of the program block containing the preparation function code or auxiliary function code to be processed.
[0157] This allows the operator of the numerical control device 10 to confirm what processing has been performed on each program block of the source program 210 .
[0158] (9) In the optimization processing device described in any one of (1) to (8), there is a human-machine interface 300 and an input unit that uses the human-machine interface 300 to accept the selection of a machine tool 20 for executing the source program 210 from an operator, and the code processor 112 can change the processing to be performed on the source program 210 based on the selected machine tool 20A.
[0159] Thus, the optimization processing device can generate the target program 220 most suitable for the selected machine tool 20A.
[0160] (10) In the optimization processing device described in any one of (1) to (9), a display unit can be provided for displaying information indicating the content of processing performed by the code processing unit 112.
[0161] This allows the operator of the numerical control device 10 to confirm what processing is performed on the source program 210 .
[0162] (11) In the optimization processing device described in (10), the display unit may display a predicted value of the execution time of the generated target program 220 based on the processing performed by the code processing unit 112.
[0163] Thus, the operator of the numerical control device 10 can confirm how much the execution time is shortened by optimizing the source program 210 .
Claims
1. An optimization processing device, characterized in that: have: a program block analysis unit that analyzes a preparation function code and / or an auxiliary function code of each program block included in the first program; a code processing unit, which processes the preparation function codes and / or auxiliary function codes of a plurality of consecutive program blocks based on the analysis result of the program block analysis unit to optimize the first program; and a program generating unit, which generates the first program optimized by the code processing unit as a second program, The above code processing unit has: a first merging processing unit configured to merge the plurality of program blocks if, in the plurality of consecutive program blocks, the preparation function code is not a code that affects only the program block in which it appears, and the preparation function code is a code of a modal group different from preparation function codes of other consecutive program blocks; as well as A second merging processing unit merges the above-mentioned multiple program blocks when, in the above-mentioned multiple continuous program blocks, the preparation function code is not a code that only affects the program block in which it appears, and the above-mentioned preparation function code is a code of a modal group different from the preparation function codes of other continuous program blocks, and the auxiliary function code contained in the above-mentioned other program blocks does not need to be separately indicated to the above-mentioned other program blocks, and the actions are not opposite.
2. The optimization processing device according to claim 1, characterized in that: The above-mentioned code processing unit includes: a deletion processing unit, which, in the above-mentioned multiple consecutive program blocks, when the preparation function code is not a code that only affects the program block in which it appears, and the above-mentioned preparation function code is the same as the preparation function code of other consecutive program blocks, deletes the preparation function code of program blocks other than the initial program block.
3. The optimization processing device according to claim 1 or 2, characterized in that: The above code processing unit has: a program block rearrangement processing unit for rearranging the order of the plurality of program blocks when the auxiliary function code in the plurality of consecutive program blocks is not an action opposite to the preparation function code or the auxiliary function code included in the previous program block; as well as A coordinate value rearrangement processing unit, which, in the above-mentioned multiple continuous program blocks, when the preparation function code of the initial program block is a preparation function code of a fixed period, and the preparation function code of the last program block is a cancellation preparation function code of the fixed period corresponding to the preparation function code of the above-mentioned initial program block, rearranges the multiple coordinate values specified by dimension numbers included in the above-mentioned multiple program blocks so that the total moving distance or moving time between the coordinate values is minimized.
4. The optimization processing device according to claim 1 or 2, characterized in that: The above-mentioned code processing unit includes: a replacement processing unit, which replaces the above-mentioned multiple program blocks with a combination of interpolated preparation function codes from the preparation function code of the fixed period when the preparation function code of the initial program block in the above-mentioned multiple consecutive program blocks is a preparation function code of a fixed period and the preparation function code of the last program block is a canceled preparation function code of the fixed period corresponding to the preparation function code of the above-mentioned initial program block.
5. The optimization processing device according to claim 1 or 2, characterized in that: The program generating unit generates the program by replacing the first program with the generated second program.
6. The optimization processing device according to claim 1 or 2, characterized in that: The program generating unit generates the generated second program as a new program different from the first program.
7. The optimization processing device according to claim 1 or 2, characterized in that: The optimization processing device includes: an information output unit that outputs information indicating the content of processing performed by the above-mentioned code processing unit to a previous or next program block of a program block including the above-mentioned preparation function code or the above-mentioned auxiliary function code after processing.
8. The optimization processing device according to claim 1 or 2, characterized in that: The optimization processing device has: Human-machine interface; and an input unit that receives, from an operator, a selection of an industrial machine on which the first program is to be executed, using the human-machine interface; The code processing unit changes processing to be performed on the first program based on the selected industrial machine.
9. The optimization processing device according to claim 1 or 2, characterized in that: The optimization processing device includes a display unit that displays information indicating the content of processing performed by the code processing unit.
10. The optimization processing device according to claim 9, characterized in that: The display unit displays the generated predicted value of the execution time of the second program based on the processing performed by the code processing unit.
Citation Information
Patent Citations
Numerical controller
JP1998320027A
Redundant exception handling code removal
US20100125837A1