Program conversion device and computer-readable storage medium

The program conversion device leverages a language model to convert machining programs, addressing the challenge of recreating programs for diverse numerical control devices without CAD/CAM, ensuring efficient and accurate adaptation.

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

Patent Information

Application Number
PCT/JP2024/004686
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 technologies require recreating machining programs for different numerical control devices, which necessitate access to CAM drawing data and understanding device characteristics, posing challenges when such data is unavailable or expertise is lacking.

Method used

A program conversion device utilizing a large-scale language model to convert machining programs by acquiring syntax information, creating prompts, and outputting converted programs, enabling conversion without CAD/CAM software and expertise.

Benefits of technology

Facilitates machining program conversion across different numerical control devices, even without CAD/CAM tools, ensuring accurate and efficient program adaptation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024004686_14082025_PF_FP_ABST
    Figure JP2024004686_14082025_PF_FP_ABST
Patent Text Reader

Abstract

This program conversion device acquires a pre-conversion machining program and information pertaining to the syntax of a post-conversion machining program, creates a prompt for instructing a language model to generate a machining program obtained by converting the pre-conversion machining program into the syntax of the post-conversion machining program, transmits the prompt to the language model, receives a response from the language model, and outputs a post-conversion machining program that has been received by a reception unit.
Need to check novelty before this filing date? Find Prior Art

Description

Program conversion device and computer-readable storage medium

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

[0002] Conventionally, there is a technology for generating machining programs for numerical control devices (for example, see Patent Document 1). Machining programs have different syntax for each numerical control device. A CAM (Computer Aided Machining, also known as a postprocessor) is used to create a machining program with a syntax compatible with the machine tool or numerical control device. To operate a different machine tool or numerical control device, the machining program must be recreated. This recreation requires obtaining drawing data from the CAM. The postprocessor creates the machining program based on the drawing data created by the CAM.

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

[0004] When recreating a machining program, it is not possible to recreate CAM or a machining program using CAM unless the drawing data is available. Also, converting a machining program from drawing data requires CAD and CAM operation skills. Furthermore, without understanding the characteristics of the numerical control device before and after conversion, it is difficult to convert to appropriate commands or improve the program.

[0005] In the field, there is a demand for technology that converts machining programs based on machining programs.

[0006] A program conversion device according to one aspect of the present disclosure includes a conversion information acquisition unit that acquires a processing program before conversion and information regarding the syntax of the converted processing program, a prompt creation unit that creates a prompt that instructs a language model to generate a processing program in which the processing program before conversion has been converted into the syntax, a transmission unit that transmits the prompt to the language model, a receiving unit that receives a response from the language model, and an output unit that outputs the converted processing program received by the receiving unit.

[0007] FIG. 1 is a block diagram of a program conversion device of a first embodiment; FIG. 2 is a flowchart explaining the operation of the program conversion device; FIG. 3 is a diagram showing an example of a prompt for instructing program conversion; FIG. 4 is a block diagram of a program conversion device of a second embodiment; FIG. 5 is a diagram showing an example of a screen presenting an alternative function; FIG. 6 is a diagram showing an example of a table for specifying an alternative; FIG. 7 is a diagram showing an example of a prompt for requesting a response regarding conversion contents; FIG. 8 is a diagram showing an example of a machining program before conversion, a machining program after conversion, and conversion contents; and FIG. 9 is a hardware configuration diagram of a program conversion 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 conversion device 100 of the first 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 conversion device 100 is implemented on a computer connected to the numerical control device via a network.

[0011] It is assumed that the program conversion device 100 is connected to a language model via a network. The language model includes a large-scale language model (LLM). The large-scale language model is a model that has been pre-trained on a natural language. When a predetermined sentence is input, the large-scale language model outputs a text string with a high probability as a response to the sentence. 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 machining programs with various syntaxes. The language model is assumed to have learned sufficiently to be able to convert a machining program with one syntax into a machining program with another syntax. The language model may also have learned tool information. By learning the tool information, when converting from one manufacturer's machining program to another manufacturer's machining program, it is possible to convert into a tool suitable for that manufacturer. Furthermore, the language model may have learned sentences related to machining programs, such as machining program manuals.

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

[0014] The conversion information acquisition unit 1 acquires syntax information of the converted machining program. The syntax of a machining program may differ depending on the manufacturer of the numerical control device. The syntax may also differ depending on the machine tool controlled by the numerical control device. The syntax may also differ depending on the model, type, year, etc. of the numerical control device. The conversion information acquisition unit 1 acquires information (called syntax information) that determines the syntax of the machining program.

[0015] The prompt creation unit 2 creates a prompt to have the language model execute "processing program conversion." 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. To obtain the desired result from the language model, the prompt needs to be clear and specific.

[0016] The sending unit 3 sends a prompt to the language model. The receiving unit 4 receives a response from the language model. The prompt does not have to be sent and received just once. By repeatedly exchanging questions and answers with the language model, a highly accurate prompt can be created.

[0017] The output unit 5 outputs the answer of the language model. The output method may be a screen display or storage in a storage medium.

[0018] The operation of the program conversion device 100 will be described with reference to the flowchart in Fig. 2. The program conversion device 100 receives a conversion request for a machining program from a user (step S1). The conversion information acquisition unit 1 receives the machining program to be converted and information indicating the syntax of the converted machining program (syntax information). The syntax information includes, for example, the manufacturer and model of the numerical control device to which the program is converted. The syntax information allows the syntax of the machining program to be identified (step S2).

[0019] The prompt creation unit 2 creates a prompt that instructs conversion of the machining program (step S3). The prompt includes at least the machining program and syntax information. The prompt creation unit 2 may also include a template. Using a template makes it possible to store specific data such as "syntax information," "manufacturer," and "model name" in variables. FIG. 3 shows an example of a prompt. The prompt in FIG. 3 includes instructions and syntax information. The instruction is "Please convert the attached machining program into the syntax of the following numerical control device." and the syntax information is "The numerical control device is the XX model XX series from XX company. The machine tool is XX from XX company."

[0020] The sending unit 3 outputs the prompt created by the prompt creating unit 2 to the language model (step S4). The language model converts a processing program for a certain syntax into a processing program for a specified syntax in accordance with the prompt (step S5).

[0021] The receiving unit 4 receives the converted processing program (step S6). It is also possible to receive not only the processing program but also the conversion content at the same time. In this flowchart, the processing program is converted only once, but the procedure of checking the response from the language model and the conversion result, creating a prompt, and instructing further conversion may be repeated multiple times. This makes the instructions to the language model more specific, improving the accuracy of the conversion.

[0022] The output unit 5 outputs the converted machining program and information related to the conversion to a file, a screen, or the like (step S7).

[0023] As described above, the program conversion device 100 of the first embodiment converts one machining program into another by outputting instructions to the language model and syntax information of the machining program before conversion and the machining program after conversion to the language model. This makes it possible to convert machining programs without CAM or CAD software. Furthermore, even if you are not a CAM or CAD engineer, you can convert machining programs. Furthermore, with older machining programs, CAD drawing data may not exist or may not be readable. Even in such cases, machining programs can be converted.

[0024] 4 is a block diagram of a program conversion device 100 according to a second embodiment. The program conversion device 100 according to the second embodiment includes a conversion information acquisition unit 1, a prompt creation unit 2, a transmission unit 3, a reception unit 4, an output unit 5, a function analysis unit 6, a substitution command unit 7, a feedback unit 8, and a knowledge storage unit 9.

[0025] The conversion information acquisition unit 1 of the second embodiment acquires syntax information of the machining program before conversion and the machining program after conversion. The method of acquiring syntax information is not particularly limited, but several examples will be given as embodiments. The first method is to directly ask the language model about the syntax using a prompt. The prompt creation unit 2 creates a prompt requesting syntax determination, such as "Please tell me the syntax of the attached machining program," and sends it to the language model. It is also possible to ask about the syntax of the machining program after conversion. The prompt creation unit 2 creates a prompt requesting syntax determination, such as "Please tell me the syntax of the machining program compatible with the numerical control device of the XX series machine from XX company," and sends it to the language model.

[0026] The second method uses document search of a language model. In this case, documents that support syntax determination are prepared in advance. Documents that support syntax determination include programming language manuals and update information for the processing program. The processing program before conversion can also be used as a document that supports syntax determination. The commands and comments contained in the processing program can serve as syntax information for the processing program. The text is pre-processed, such as vectorized and structurized, and is in a format that can be searched using the language model. Search results are linked, and the relevant part of the document based on the language model can be displayed. The user can check the linked document and confirm whether the language model's response is correct.

[0027] The third method is a rule-based method, which determines syntax based on rules such as directive names and grammar.

[0028] Note that the response of the language model may not be accurate, so the output probability may be adjusted. Also, since the same processing program may be executable in multiple versions, information on multiple versions with high probabilities may be obtained. Furthermore, if a model that accurately classifies syntax without user confirmation becomes available in the future, such a model may be utilized.

[0029] Next, a method for acquiring syntax information of the converted machining program will be described. As described above, the syntax of the machining program depends on the model, type, year, and type of machine tool of the numerical control device. Therefore, by applying this information to the three methods described above, syntax information can be acquired. Note that the method for acquiring syntax information is an example and is not limited to the above-mentioned methods.

[0030] The function analysis unit 6 analyzes alternative functions from the syntax information and the machining program. Alternative functions include (1) functions that are provided in the syntax before conversion but not in the syntax after conversion, and (2) functions that are not provided in the syntax before conversion but are provided in the syntax after conversion. Since each manufacturer of numerical control devices has its own preferred commands, commands that could not be executed in the machining program before conversion may be executable in the machining program after conversion, and conversely, commands that could be executed in the machining program before conversion may not be executable in the machining program after conversion. The function analysis unit 6 uses syntax information to analyze alternative functions from functions provided in the syntax before conversion and functions provided in the syntax after conversion.

[0031] The substitution command unit 7 accepts the designation of a function (command) that the user desires to be substituted. The substitution command unit 7 may accept the designation of a function directly from the user, or may present the user with the substitute functions analyzed by the function analysis unit 6 as shown in FIG. 5 and accept the selection of the substitute function. FIG. 6 is an example of a table for designating a substitution, in which commands in the machining program before conversion are associated with commands of the function that the user desires to be substituted. Although FIG. 6 shows a table, it may also be a list or a sentence. In the example of FIG. 6, the command "G(y 1 ) and command "G(x 1 )”, command “G(y 3 ) and command "G(x 3 "Myyyy" is associated with the command "M (No. xxxx)" and it is further stated that "For M (No. xxxx), use the setting value of parameter No. xxxx." Also, the command "G (y 4 ) and "0.01 continuous command" are associated with each other, and furthermore, "G(y4 ) has been replaced with tiny line segments."

[0032] A specific example of an alternative command is a command that combines multiple commands into one command (called a macro command). If the syntax of the converted machining program does not correspond to the macro command of the machining program before conversion, it is necessary to convert one command into multiple commands. Specifically, suppose that syntax A contains a command that is specialized for small commands. In syntax B, which does not contain such a command, it is necessary to issue small movements multiple times. When converting a small command of syntax A into a machining program of syntax B, if there are three or more consecutive small movement commands of 1.0 or less, they can be converted into one macro command.

[0033] The prompt creation unit 2 creates a prompt that instructs the conversion of the machining program. The prompt includes syntax information, specification of alternative functions, and a response request for the conversion contents. The conversion contents are information about which parts of the machining program have been converted and how. They also include information such as setting changes required by the conversion. As shown in FIG. 7, the prompt creation unit 2 creates prompts such as "Please also respond with a file describing the conversion parts" and "Please tell us the conversion parts and setting changes involved in the conversion." This makes it possible to confirm the conversion parts and setting changes of the machining program. An example of the machining program before and after conversion and the conversion contents is shown in FIG. 8. The receiving unit 4 receives a prompt "G(y 3 ) to G(x 3 )," "The blocks from **** to **** were converted to G(x 5 ) command" and "Use the setting value of parameter No. xxxx for M (No. xxxx)." are received from the language model.

[0034] Regarding the setting change, the search function of the language model described above may be used to search for the processing program manual, information on additions / updates of functions, and the like.

[0035] The feedback unit 8 stores the machining program before conversion, the machining program after conversion, and information related to the conversion in the knowledge storage unit 9. The information related to the conversion includes alternative functions, setting changes associated with the conversion of the machining program, etc. By accumulating knowledge, it is possible to utilize knowledge obtained from past conversions of machining programs.

[0036] Since large-scale language models cannot answer questions about knowledge or concepts that are not publicly available, they may not convert machining programs accurately. The feedback unit 8 and knowledge storage unit 9 collect correct answer data obtained by actually converting machining programs, which leads to improved accuracy of the language model.

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

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

[0039] The interface 115 is an interface for connecting the program conversion apparatus 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 conversion apparatus 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 conversion apparatus 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.

[0040] 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.

[0041] The following are supplementary notes related to embodiments of the present disclosure. (Supplementary Note 1) A program conversion device (100) includes a conversion information acquisition unit (1) that acquires a processing program before conversion and information related to the syntax of a converted processing program, a prompt creation unit (2) that creates a prompt that instructs a language model to generate a processing program in which the processing program before conversion is converted to the syntax, a transmission unit (3) that transmits the prompt to the language model, a reception unit (4) that receives a response from the language model, and an output unit (5) that outputs the converted processing program received by the reception unit. (Supplementary Note 2) The program conversion device (100) includes a function analysis unit (6) that analyzes functions that need to be replaced for the processing program before conversion and the syntax of the converted processing program. (Supplementary Note 3) The conversion information acquisition unit (1) acquires information related to the syntax of the processing program before conversion. (Supplementary Note 4) The conversion information acquisition unit (1) acquires information related to the syntax of the converted processing program. (Supplementary Note 5) The function analysis unit (6) analyzes an alternative function based on information about the syntax of the machining program before conversion and information about the syntax of the machining program after conversion. (Supplementary Note 6) The program conversion device (100) includes an alternative command unit that accepts a user's designation of an alternative function and causes the prompt creation unit to create a prompt instructing the use of the alternative function. (Supplementary Note 7) The prompt creation unit (2) requests a response regarding the conversion content when converting the machining program. (Supplementary Note 8) The computer-readable storage medium (112, 113, 114) stores instructions that cause the processor (111) to execute processing to acquire information about the machining program before conversion and the syntax of the converted machining program, create a prompt that instructs a language model to generate a machining program in which the pre-conversion machining program has been converted into the syntax, send the prompt to the language model, receive a response from the language model, and output the received converted machining program.

[0042] REFERENCE SIGNS LIST 100 PROGRAM CONVERSION DEVICE 1 CONVERSION INFORMATION ACQUISITION UNIT 2 PROMPT GENERATION UNIT 3 TRANSMISSION UNIT 4 RECEIVER UNIT 5 OUTPUT UNIT 6 FUNCTION ANALYZER 7 SUBSTITUTE INSTRUCTION UNIT 8 FEEDBACK UNIT 9 KNOWLEDGE MEMORY UNIT 111 CPU 112 ROM 113 RAM 114 NON-VOLATILE MEMORY

Claims

1. A program conversion device comprising: a conversion information acquisition unit that acquires a processing program before conversion and information related to the syntax of a processing program after conversion; a prompt creation unit that creates a prompt that instructs a language model to generate a processing program in which the processing program before conversion has been converted to the syntax; a transmission unit that sends the prompt to the language model; a reception unit that receives a response from the language model; and an output unit that outputs the converted processing program received by the reception unit.

2. The program conversion device according to claim 1, further comprising a function analysis unit for analyzing functions that need to be replaced with respect to the syntax of the machining program before conversion and the syntax of the machining program after conversion.

3. The program conversion device according to claim 1, wherein the conversion information acquisition section acquires information about the syntax of the machining program before conversion.

4. The program conversion device according to claim 1, wherein the conversion information acquisition section acquires information about the syntax of the converted machining program.

5. The program conversion device according to claim 2, wherein the function analysis unit analyzes the alternative function based on information relating to the syntax of the machining program before conversion and information relating to the syntax of the machining program after conversion.

6. A program conversion device according to claim 1, further comprising an alternative command section for receiving a user's designation of an alternative function and causing the prompt creation section to create a prompt instructing the use of the alternative function.

7. The program conversion device according to claim 1, wherein said prompt creation section requests a response regarding the conversion content when converting a machining program.

8. A computer-readable storage medium storing instructions for executing the following process: acquiring information about the syntax of a processing program before conversion and a processing program after conversion; creating a prompt that instructs a language model to generate a processing program in which the processing program before conversion has been converted into the syntax; sending the prompt to the language model; receiving a response from the language model; and outputting the received converted processing program.

Citation Information

Patent Citations

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

    CN115981615A

  • Conversion device for NC data

    JP1993197413A

  • Nc program editing system and record medium recording nc program editing program

    JP1999007312A

  • Program conversion device

    JP2006293744A