Program improvement device and computer-readable recording medium

The program improvement device uses a language model to convert machining commands for numerical control devices, addressing inefficiencies by enhancing precision and speed through device-specific prompts, achieving continuous refinement and improved accuracy.

WO2025169498A1PCT designated stage Publication Date: 2025-08-14FANUC LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2024/004684
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-02-09
Publication Date
2025-08-14

AI Technical Summary

Technical Problem

Existing machining programs for numerical control devices lack efficiency and precision due to the need for understanding device-specific settings and commands, which is complex and time-consuming, and the available functions vary based on device configurations.

Method used

A program improvement device that utilizes a language model to refine machining programs by creating prompts based on device-specific information, including environmental and command-related data, to convert commands for higher speed and precision, using a computer-connected system to interact with a large-scale language model for improved accuracy.

Benefits of technology

Enhances machining program efficiency and precision by converting commands effectively, leveraging device-specific settings and options, without requiring prior knowledge of device configurations, and allowing continuous refinement through iterative prompts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024004684_14082025_PF_FP_ABST
    Figure JP2024004684_14082025_PF_FP_ABST
Patent Text Reader

Abstract

A program improvement device according to the present disclosure receives a processing program before improvement and an improvement request for the processing program, acquires information related to a command executable by a numerical control device, creates a prompt for instructing improvement to a processing program executable by the numerical control device from the processing program before improvement, transmits the prompt to a language model, receives an answer from the language model, and outputs the received processing program after the improvement.
Need to check novelty before this filing date? Find Prior Art

Description

Program improvement device and computer-readable recording medium

[0001] The present disclosure relates to a program improvement device and a computer-readable recording medium.

[0002] Conventionally, there is a technology for generating machining programs for numerical control devices (for example, see Patent Document 1). CAM (Computer Aided Machining, also known as a postprocessor) is a device that automatically generates machining programs. CAM generates machining programs compatible with machine tools and numerical control devices from drawing data created by CAD (Computer Aided Design).

[0003] Japanese Patent Application Publication No. 7-334225

[0004] Numerical control devices have various commands that increase the speed and precision of machining. To improve machining programs, it is necessary to understand each function and replace them with commands that are suitable for increasing speed and precision. However, to replace commands, the available functions differ depending on the settings of the numerical control device, so it is necessary to understand the settings of the numerical control device.

[0005] There is a demand for technology to improve machining programs in the field.

[0006] A program improvement device according to one aspect of the present disclosure includes a machining program before improvement, a receiving unit that receives a request to improve the machining program, an improvement-related information acquisition unit that acquires information regarding commands that can be executed by a numerical control device, a prompt creation unit that creates a prompt that instructs the user to improve the machining program before improvement to a machining program that can be executed by the numerical control device, a transmitting unit that transmits the prompt to a language model, a receiving unit that receives a response from the language model, and an output unit that outputs the improved machining program received by the receiving unit.

[0007] FIG. 1 is a block diagram of a program improvement device. FIG. 2 is a diagram showing an example of a prompt instructing an improvement and a prompt specifying improvement-related information. FIG. 3 is a table correlating commands before improvement with commands after improvement. FIG. 4 is a diagram showing an example of a prompt instructing conversion of a machining program. FIG. 5 is a diagram showing an example of execution auxiliary information to which a language model responds. FIG. 6 is a flowchart explaining the operation of a program improvement device. FIG. 7 is a hardware configuration diagram of a program improvement device.

[0008] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. In the following description, components having the same or similar functions will be denoted by the same reference numerals. Duplicate descriptions of those components may be omitted.

[0009] In this application, "based on XX" means "based on at least XX," and includes cases where it is based on other elements in addition to XX. Furthermore, "based on XX" is not limited to cases where XX is used directly, but also includes cases where it is based on XX that has been calculated or processed. "XX" is any element (for example, any information).

[0010] [First Embodiment] The program improvement device 100 according to this embodiment can be implemented on a computer, such as a numerical control device, a personal computer attached to the numerical control device, a personal computer connected to the numerical control device via a wired / wireless network, a cell computer, a fog computer, a cloud server, etc. In this embodiment, an example is shown in which the program improvement device 100 is implemented on a computer connected to the numerical control device via a network.

[0011] The program improvement device is connected to a language model via a network. The language model includes a large-scale language model (LLM). When a given text is input, the language model learns the probability that the given text will be a response. By learning from a large number of samples, the language model outputs a text with a high probability as a response to a given sentence when the given sentence is input. The language model can be used for purposes such as dialogue, question and answer session, sentence summarization, sentence editing, sentence translation, sentence conversion, sentence modification, sentence optimization, sentence interpretation / detection, recognition, prediction, judgment, code generation, image generation, and comprehensive judgment.

[0012] The language model is assumed to have learned data related to the machining program. The data to be learned includes not only the machining program but also the setting information and manuals of the numerical control device. The language model is assumed to have learned sufficiently to convert basic commands into high-speed, high-precision commands.

[0013] 1 is a block diagram of a program improvement device 100. The program improvement device 100 includes a reception unit 1, an improvement-related information acquisition unit 2, a prompt creation unit 3, a transmission unit 4, a reception unit 5, and an output unit 6.

[0014] The receiving unit 1 receives from a user a machining program before improvement and a request for improvement of the machining program.

[0015] The improvement-related information acquisition unit 2 acquires information related to the improvement of the machining program (improvement-related information). The improvement-related information is used to refine the prompt. Creating a detailed prompt limits the response range of the language model, leading to improved accuracy of the machining program. The improvement-related information includes environmental information indicating the execution environment of the improved machining program and information related to commands. The environmental information includes the type of numerical control device, the type of machine tool, the mechanical configuration of the machine tool, axis information, parameters, etc. Information related to commands refers to information about commands that can be executed by the numerical control device. In addition to basic commands, the commands of the numerical control device include additional commands that can be obtained as options. By obtaining options, additional functions such as higher speed and higher accuracy can be used. Options that the user obtains additionally and that can be used by the numerical control device are called obtained options, and options that have not yet been obtained are called unobtained options.

[0016] The prompt creation unit 3 creates prompts to "improve the processing program." A prompt is an instruction or question sentence to be input to the language model. The language model generates a response or result in response to the prompt.

[0017] The prompt creation unit 3 creates a prompt that instructs the user to improve the machining program. The prompt includes improvement-related information. The improvement-related information is used to refine the prompt. The improvement-related information includes, for example, the commands to be used in the improved machining program and environmental information for executing the improved machining program. Figure 2 shows examples of a prompt that instructs the user to improve and a prompt that specifies improvement-related information. The prompt creation unit creates prompts such as "Please improve the machining program using the available option," "The available option is XX," "Please use command XX," and "The manufacturer of the numerical control device is XX, and the model is XX."

[0018] The correspondence between the commands before improvement and the commands after improvement may be specified in a table. The table in FIG. 3 includes the commands of the machining program before improvement, the commands after improvement, the necessary conditions for using the commands, and auxiliary information. The example in FIG. 3 is a table, but it may also be a list or text. In the example in FIG. 3, the command (before improvement) "G(y 1 " and the command (improved) "G (x 1 )”, Directive (before improvement) “G(y 2 " and the command (improved) "G (x 2 " and "G(x 3 The command "G(x)" is associated with 2 The requirement for "G(x)" is "Option C". 3 The requirement for "G(x)" is "Option C". 3 The auxiliary information for "command G(x 2 ) is expected to further increase speed (option C is required)." Also, commands are expressed not only as code but also as text. In the third column of Figure 3, there is a text representing the command before improvement, "10 or more consecutive small commands of less than 0.1", and a text representing the command after improvement, "G(x 4 In the fourth column, the sentence representing the command before improvement, "arc command with radius less than 1.0", and the sentence representing the command after improvement, "G(x 5 ) are associated with each other. The prompt creation unit creates prompts such as "This table contains correspondence information between commands before and after improvement" and "Please improve the machining program according to this correspondence information." This improvement-related information is information provided by the user.

[0019] The improvement-related information acquisition unit 2 may assist the user in collecting improvement-related information. The improvement-related information acquisition unit 2 may acquire information related to improvements using a language model. The method of acquiring information is not particularly limited, but two examples are given as embodiments. The first method is to directly instruct the language model. In this case, the prompt creation unit 3 creates a prompt that instructs the acquisition of information related to improvements to the machining program. FIG. 4 shows an example of a prompt. An example of the prompt is, "The acquired option is XX. Please tell me the command to improve the attached machining program." At the same time, information regarding parameter changes and settings for executing the improved command (called execution support information) may be acquired. An example of a prompt is, "Please tell me the settings of the numerical control device necessary to execute the improved command."

[0020] The second method uses document search. In this case, documents that support the improvement of the machining program are prepared. Documents that support the improvement of the machining program include machining program manuals, programming language update information, previously created machining programs, machine configuration information when the machining program is executed, tool information, and numerical control device setting information (parameters). These documents are vectorized, structured, and so on, and are in a format that can be searched using a language model. The language model searches documents that support the improvement of the machining program for information that matches the machining program before the improvement and environmental information. The search results include at least a correspondence between commands before the improvement and commands after the improvement.

[0021] The search results may further include information on parameter changes and settings (called execution support information) for executing the improved command. For example, to execute a high-speed, high-precision command, information on parameter changes such as allowable acceleration, corner speed difference, and tolerance is presented.

[0022] The prompt creation unit 3 creates a prompt that instructs improvement of the machining program. The prompt may include information on the correspondence between the command before the improvement and the command after the improvement. The prompt may further include a response request for the improvement content. The improvement content is information on where and how the machining program has been improved. It also includes auxiliary execution information that indicates the work (setting changes, etc.) that becomes necessary as a result of the improvement. Figure 5 shows an example of auxiliary execution information. The language model may be, for example, "G(y 2 ) to G(x 3 ) may be able to speed up the process. 2 ) to G(x 2 ) to speed up the process (requires option C) and converting *** to *** blocks to G(x 4 ) may be able to speed up the process."

[0023] If the improved command is not included in the acquired options, the prompt creation unit 3 excludes the use of the unacquired command, or may notify the user that the improved command is not included in the acquired options and prompt the user to acquire the option.

[0024] The transmitting unit 4 associates the commands before improvement with the commands after improvement and transmits a prompt instructing the user to improve the program to the language model. The receiving unit 5 receives a response from the language model. The prompt does not have to be sent and received just once. By checking the improved processing program and correcting the prompt, a processing program that meets the user's objectives can be provided.

[0025] The operation of the program improvement device 100 will be described with reference to the flowchart in Fig. 6. The program improvement device 100 receives a machining program improvement request from a user (step S1). The improvement-related information acquisition unit 2 acquires improvement-related information (step S2). The improvement-related information includes information related to the command to be improved and environmental information. The environmental information includes the execution environment of the machining program after improvement. The option-related information includes at least the acquired options.

[0026] The prompt creation unit 3 creates a prompt that instructs the improvement of the processing program. There is no particular method for creating the prompt, but there are two methods: a method of directly specifying the prompt in the language model (step S3; direct), and a method of having the language model search for details of the improvement content (step S3; search).

[0027] In the direct specification method, if a correspondence between pre-improvement commands and post-improvement commands is specified (step S4; Yes), the correspondence between the commands is included in the prompt (step S5). If a correspondence between pre-improvement commands and post-improvement commands is not specified (step S4; No), the correspondence between the commands is not included in the prompt. The prompt creation unit 3 creates a prompt including information on the acquired options, the improved program, and instructions for improving the machining program using the acquired options (step S6).

[0028] In the search method, a language model is used to search for documents prepared in advance (documents supporting the improvement of the machining program) (step S7). Documents supporting the improvement of the machining program include machining program manuals, programming language update information, previously created machining programs, machine configuration information at the time of machining program execution, tool information, setting information for numerical control devices, etc. Note that this language model does not have to be a large-scale language model.

[0029] The search results of the language model may be presented to the user. A link may be attached to the search results. The link can display the relevant part of the document on which the language model is based. This allows the user to check whether the search results are correct.

[0030] The search results include correspondence between commands before and after the improvement, and auxiliary execution information for executing the improved machining program.

[0031] When the search results are obtained, the prompt creation unit checks whether options for the improved command have been acquired (step S8). If options for the command have not been acquired, the command may be excluded from the improvement, or the user may be prompted to acquire the options.

[0032] The prompt creating unit 3 creates a prompt including information on the correspondence between the commands before and after the improvement and an instruction to improve the machining program (step S9).

[0033] The sending unit 4 sends the created prompt to the language model (step S10). The language model improves the processing program in accordance with the instructions in the prompt.

[0034] The receiving unit 5 receives the improved processing program (step S11). It is also possible to receive not only the processing program but also the details of the improvements, such as which parts of the processing program have been improved and how. In this flowchart, the processing program is improved only once, but the procedure of checking the response from the language model and the improvement results, creating a prompt, and instructing further improvements may be repeated multiple times. This makes the instructions to the language model more specific, improving the accuracy of the improvements.

[0035] The output unit 6 outputs the improved machining program, auxiliary execution information for executing the improved machining program, the details of the improvement, etc. to a file, a screen, etc. (step S12).

[0036] As described above, the program improvement device 100 creates a prompt that instructs improvement of a machining program. The prompt includes improvement-related information. The improvement-related information includes information about acquired options. The improvement-related information includes environmental information. The environmental information includes information indicating the environment in which the improved machining program will be executed. The environmental information includes the type of numerical control device, the type of machine tool, the machine configuration, axis information, numerical control setting information, etc.

[0037] Improving a machining program requires an understanding of the numerical control device, and if the commands are not converted into appropriate ones, the machining speed may actually decrease. To fully utilize the capabilities of the improved commands, it is also necessary to understand the characteristics of the numerical control device, the characteristics of the machine tool, the settings of the numerical control device, and options.

[0038] Because information about machining programs is complex, improving a machining program requires advanced skills. Furthermore, information about machining programs is updated over time, making it difficult to associate and manage the necessary information. The program improvement device 100 of this embodiment creates a prompt that specifies in detail environmental information related to the execution environment of the machining program and commands executable by a numerical control device, such as available options, and instructs the language model to improve the machining program taking these into account.

[0039] Furthermore, to refine the prompt instructions, it is possible to prepare text to assist in improving the processing program and search for information that matches the processing program before improvement, the options already available, and the environment after conversion. The text can be the processing program manual, programming language update information, etc., so it is easy to obtain. Because a language model is used, the text can be searched as is.

[0040] Furthermore, the program improvement device 100 uses the language model to acquire information (called execution support information) related to parameter changes and settings for executing the improved commands, making it possible to improve the machining program without prior knowledge of the settings and options of the numerical control device.

[0041] The hardware configuration of the program improvement device 100 to which the present disclosure is applied will be described below. Fig. 7 is a hardware configuration diagram of the program improvement device 100. As shown in Fig. 7, the program improvement device 100 includes a CPU 111 that controls the entire program improvement device 100, a ROM 112 that records programs and data, and a RAM 113 for temporarily expanding data. The CPU 111 reads out the system program recorded in the ROM 112 via a bus and determines the consistency between the block and the tool.

[0042] The nonvolatile memory 114 is backed up by, for example, a battery (not shown), and thus maintains its stored state even when the power to the program improvement device 100 is turned off. The nonvolatile memory 114 stores various data such as programs read from the external device 120 via the interfaces 115, 118, and 119 and operation inputs entered via the input device 20. The nonvolatile memory 114 may store programs and data for executing the program improvement device 100 of this embodiment.

[0043] The interface 115 is an interface for connecting the program improvement device 100 to an external device 120 such as an adapter. Programs, various parameters, etc. are loaded from the external device 120. The interface 118 is an interface for connecting the program improvement device 100 to a display device 30 such as a liquid crystal display. The display device 30 displays various data loaded into memory, data obtained as a result of executing programs, etc. The interface 119 is an interface for connecting the program improvement device 100 to an input device 20 such as a keyboard or pointing device. The input device 20 passes commands, data, etc. based on operations by an operator to the CPU 111 via the interface 119.

[0044] Although the present disclosure has been described in detail, the present disclosure is not limited to the individual embodiments described above. Various additions, substitutions, modifications, partial deletions, etc. are possible in these embodiments without departing from the gist of the present disclosure or the gist of the present disclosure derived from the claims and their equivalents. Furthermore, these embodiments can also be implemented in combination. For example, in the above-described embodiments, the order of each operation and the order of each process are shown as examples and are not limited to these.

[0045] The following are supplementary notes relating to embodiments of the present disclosure. (Supplementary Note 1) A program improvement device (100) includes a receiving unit (1) that receives a machining program before improvement and a machining program improvement request, an improvement-related information acquisition unit (2) that acquires improvement-related information including information about commands executable by a numerical control device, a prompt creation unit (3) that creates a prompt instructing the machining program before improvement to a machining program executable by the numerical control device, a transmission unit (4) that transmits the prompt to a language model, a reception unit (5) that receives a response from the language model, and an output unit (6) that outputs the improved machining program received by the reception unit (5). (Supplementary Note 2) The improvement-related information includes setting information for a numerical control device that executes the improved machining program, and the prompt includes an improvement instruction for the machining program and a response request for the improvement content. (Supplementary Note 3) The improvement-related information includes correspondence information between commands before improvement and commands after improvement. (Supplementary Note 4) The improvement-related information includes information about acquired options. (Supplementary Note 5) The improvement-related information includes environment information for executing the improved machining program. (Supplementary Note 6) The improvement content includes execution auxiliary information that indicates work that becomes necessary due to the improvement of the machining program. (Supplementary Note 7) The improvement-related information acquisition unit assists the user in collecting improvement-related information. (Supplementary Note 8) The computer-readable recording medium (112, 113, 114) stores the machining program before improvement and instructions for executing processing to receive a machining program improvement request, acquire information regarding commands executable by a numerical control device, create a prompt that instructs improving the machining program before improvement to a machining program executable by the numerical control device, send the prompt to a language model, receive a response from the language model, and output the received improved machining program.

[0046] 100 Program improvement device 1 Reception unit 2 Improvement related information acquisition unit 3 Prompt creation unit 4 Transmission unit 5 Reception unit 6 Output unit 111 CPU 112 ROM 113 RAM 114 Non-volatile memory

Claims

1. A program improvement device comprising: a receiving unit that receives a machining program before improvement and a machining program improvement request; an improvement-related information acquisition unit that acquires improvement-related information including information about commands that can be executed by a numerical control device; a prompt creation unit that creates a prompt that instructs the user to improve the machining program before improvement to a machining program that can be executed by the numerical control device; a sending unit that sends the prompt to a language model; a receiving unit that receives a response from the language model; and an output unit that outputs the improved machining program received by the receiving unit.

2. A program improvement device according to claim 1, wherein the improvement-related information includes setting information for a numerical control device that executes the improved machining program, and the prompt includes an instruction to improve the machining program and a response request for the improvement content.

3. The program improvement device according to claim 1, wherein said improvement-related information includes correspondence information between commands before improvement and commands after improvement.

4. The program improvement apparatus according to claim 1, wherein said improvement-related information includes information regarding acquired options.

5. The program improvement device according to claim 1, wherein said improvement-related information includes environmental information for executing the improved machining program.

6. A program improvement device according to claim 2, wherein the improvement content includes auxiliary execution information indicating work required by the improvement of the machining program.

7. The program improvement device according to claim 1, wherein said improvement-related information acquisition unit assists a user in collecting improvement-related information.

8. A computer-readable recording medium that stores instructions for executing the following processes: receiving a machining program before improvement and a request to improve the machining program; obtaining information regarding commands that can be executed by a numerical control device; creating a prompt that instructs the user to improve the machining program before improvement into a machining program that can be executed by the numerical control device; sending the prompt to a language model; receiving a response from the language model; and outputting the received improved machining program.

Citation Information

Patent Citations

  • G code generation method fusing language model and knowledge graph and related equipment

    CN115981615A

  • Industrial robot process package generation system and method of large language model

    CN116679909A

  • Processing program creation device

    JP2021060806A

  • Text generation device and text generation method

    JP7313757B1