Analysis device and computer-readable recording medium
The analysis device enhances numerical control program readability by using generative AI to update variable representations, addressing complexity and improving program clarity and efficiency.
Patent Information
- Application Number
- PCT/JP2024/012739
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-03-28
- Publication Date
- 2025-10-02
AI Technical Summary
Numerical control programs become difficult to read and understand as the number of variables increases, leading to a demand for improved readability.
An analysis device uses generative AI to analyze variables in numerical control programs, generating role information and updating the programs to replace variable numbers with names or associate them with data information, thereby enhancing readability and managing conflicts and duplications.
The solution improves program readability by replacing variable numbers with names, resolves conflicts and duplications, and simplifies understanding of program flow, reducing memory consumption and user burden.
Smart Images

Figure JP2024012739_02102025_PF_FP_ABST
Abstract
Description
Analysis device and computer-readable recording medium
[0001] The present disclosure relates to an analysis device and a computer-readable recording medium.
[0002] In a numerical control program executed by a control device to control industrial machinery such as machine tools and robots, G-codes and movement amounts are specified numerically. These numerical values can be specified using variables. A variable number is used where a numerical value is specified, and the value of that variable is then specified. In addition to directly specifying the value of this variable within the numerical control program, by allowing the value of the variable to change in response to user operations or changes in the state of industrial machinery and peripheral devices, it is possible to create a numerical control program that can flexibly respond to various situations (see, for example, Patent Document 1). When using multiple variables, memory equal to the number of variables to be used is reserved in advance.
[0003] Japanese Patent Application Laid-Open No. 2021-026309
[0004] When the number of variables included in a numerical control program increases, it becomes a string of variable numbers, making it difficult to read and understand. In the field, there is a demand for technology to improve the readability of numerical control programs.
[0005] The analysis device according to the present disclosure solves the above problem by analyzing variables used in a numerical control program to create calculation information, and then generating role information for each variable using generative AI such as large-scale language models (LLMs) based on the calculation information.
[0006] One aspect of the present disclosure is an analysis device that includes an operation information creation unit that creates variables included in a program related to industrial machinery and access information to the variables as operation information, a prompt creation unit that creates a prompt that inquires about role information of the variables, a transmission unit that transmits the prompt to an interactive response device, a reception unit that receives a response including role information generated by the interactive response device based on the prompt, a program update unit that updates the program based on the operation information and the role information, and an output unit that outputs the program updated by the program update unit.
[0007] 1 is a schematic hardware configuration diagram of an analysis device according to an embodiment of the present disclosure; FIG. 2 is a block diagram showing schematic functions of an analysis device according to a first embodiment; FIG. 3 is a schematic diagram showing an example of a numerical control program; FIG. 4 is a schematic diagram showing another example of a numerical control program; FIG. 5 is a schematic diagram showing an example of calculation information of a numerical control program; FIG. 6 is a schematic diagram showing another example of calculation information of a numerical control program; FIG. 7 is a schematic diagram showing an example of a sequence program; FIG. 8 is a schematic diagram showing an example of calculation information of a sequence program; FIG. 9 is a schematic diagram showing an example of an external application program; FIG. 10 is a schematic diagram showing an example of calculation information of an external application program; FIG. 11 is a schematic diagram showing an example of a template; FIG. 12 is a schematic diagram showing an example of a prompt; FIG. 13 is a schematic diagram showing an example of a response of an interactive response device; FIG. 14 is a schematic diagram showing an example of an updated numerical control program; FIG. 15 is a schematic diagram showing another example of an updated numerical control program; FIG. 16 is a schematic diagram showing an example of a prompt; FIG. 17 is a schematic diagram showing an example of a relationship definition between a value used for a variable and an instruction; FIG. 18 is a schematic diagram showing an example of variable transition information displayed in a sequence diagram;
[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] 1 is a schematic hardware configuration diagram showing the main parts of an analysis device according to a first embodiment of the present disclosure. The analysis device 1 according to this embodiment can be implemented, for example, on a control device that controls industrial machinery. The analysis device 1 can also be implemented, for example, on a computer such as a personal computer attached to the control device, or a personal computer, cell computer, fog computer 6, or cloud server 7 connected to the control device via a wired or wireless network. This embodiment shows an example in which the analysis device 1 is implemented on a computer connected to the control device that controls industrial machinery via a network.
[0011] The CPU 11 included in the analysis device 1 according to this embodiment is a processor that controls the entire analysis device 1. The CPU 11 reads a system program stored in the ROM 12 via the bus 22 and controls the entire analysis device 1 in accordance with the system program. The RAM 13 temporarily stores temporary calculation data, display data, various data acquired from the outside, and the like.
[0012] The non-volatile memory 14 is composed of, for example, a battery-backed memory (not shown) or an SSD (Solid State Drive), and retains its stored state even when the power to the analysis device 1 is turned off. The non-volatile memory 14 stores programs and data read from an external device 72 via the interface 15, programs and data input via the input device 71, and programs and data acquired from the control device 3 that controls the industrial machine 4 or other devices via the network 5. The programs and data stored in the non-volatile memory 14 may be expanded into the RAM 13 when executed / used. In addition, various system programs such as known analysis programs are written in the ROM 12 in advance.
[0013] The interface 15 is an interface for connecting the CPU 11 of the analysis device 1 to an external device 72 such as a USB device. For example, system programs, setting data, etc. are read from the external device 72. In addition, programs, setting data, etc. created or edited within the analysis device 1 can be stored in external storage means via the external device 72.
[0014] The interface 20 is an interface for connecting the CPU 11 of the analysis device 1 to a wired or wireless network 5. The network 5 may communicate using technologies such as serial communication such as RS-485, Ethernet (registered trademark), optical communication, wireless LAN, Wi-Fi (registered trademark), Bluetooth (registered trademark), etc. The network 5 is connected to a control device 3 that controls at least one industrial machine 4, an interactive response device 2 that responds to inquiries from users, a fog computer 6, a cloud server 7, etc., and exchanges data with the analysis device 1.
[0015] The display device 70 displays data and the like obtained as a result of executing various data and programs loaded into memory, output via the interface 17. An input device 71, which is comprised of a keyboard, pointing device, voice input device, etc., passes commands, data, etc. based on user operations to the CPU 11 via the interface 18.
[0016] The interactive response system 2 is configured as a system that returns a response sentence to a predetermined sentence. The interactive response system 2 includes a large-scale language model that has learned a response sentence to the predetermined sentence. This model can be a known model such as a BERT model or a Transformer model. The large-scale language model learns, for each text, the probability that the given sentence will be a response to the given sentence when the given sentence is input. It also learns the probability that each of the given texts will be followed by other texts. By repeating this learning process, the large-scale language model comes to output a text string with a high probability as a response to the given sentence when the given sentence is input. Depending on how the learning process learns documents that will be responses to the given sentence, the interactive response system 2 can be used for purposes such as dialogue, question and answer session, text summarization, text editing, text translation, text conversion, text modification, text optimization, text interpretation, text detection, recognition, prediction, judgment, code generation, image generation, and comprehensive judgment.
[0017] The analysis device 1 according to the present disclosure is assumed to be connected to an interactive response device 2 via a network 5. The interactive response device 2 includes a model trained based on various information publicly available on the Internet, for example. Examples of publicly available information include manuals for the control device 3 and the industrial machine 4, manuals for programming languages such as numerical control programming languages, PLC languages, and C language, and publicly available technical documents related to these programming languages. If necessary, additional training (fine-tuning) may be performed in advance using various documents, including specifications for the control device 3 and the industrial machine 4, specifications for programming languages such as numerical control programming languages, PLC languages, and C language, and technical documents related to these programs. These documents contain names of system variables, sample function codes, functions, and the like. Therefore, by narrowing down the information to this range, an interactive response device 2 that returns responses to queries with a certain degree of accuracy can be prepared.
[0018] 2 is a schematic block diagram illustrating functions of the analysis device 1 according to the first embodiment of the present disclosure. Each function of the analysis device 1 according to this embodiment is realized by the CPU 11 included in the analysis device 1 shown in FIG. 1 executing a system program and controlling the operation of each part of the analysis device 1.
[0019] The analysis device 1 of this embodiment includes a program acquisition unit 100, a calculation information creation unit 110, a prompt creation unit 130, a transmission unit 140, a reception unit 150, a program update unit 170, and an output unit 190. The RAM 13 to the non-volatile memory 14 of the analysis device 1 also include a template storage unit 200, which is an area in which prompt templates are stored in advance.
[0020] The program acquisition unit 100 acquires a program executed on the control device 3 to control the industrial machine 4. This program may be, for example, a numerical control program. It may also be, for example, a sequence program executed on a programmable logic controller (PLC) (not shown) included in the control device 3. It may also be, for example, a source program of an external application that accesses variables used by the numerical control program. This source program is written in C, C++, C#, or the like. The program acquisition unit 100 may acquire a program stored in the RAM 13 or nonvolatile memory 14 in response to a user's operation of the input device 71. It may also acquire a program stored in an external device 72. It may also acquire a program from the control device 3, the fog computer 6, or the cloud server 7 via the network 5. The program acquisition unit 100 outputs the acquired program to the calculation information creation unit 110. The program acquisition unit 100 also outputs the acquired program to the prompt creation unit 130 and the program update unit 170.
[0021] The calculation information creation unit 110 analyzes the program acquired by the program acquisition unit 100 and creates calculation information that associates variables included in the program with access information to the variables. FIGS. 3 and 4 are schematic diagrams showing examples of numerical control programs acquired by the program acquisition unit 100. In numerical control programs, variables are indicated by placing a number after a "#." In the numerical control program of FIG. 3, for example, "#100," "#101," "#102," "#118600," "#118650," "#300," and "#500" are variables. In the numerical control program of FIG. 4, "#101," "#102," "#103," "#300," and "#500" are variables. The calculation information creation unit 110 extracts such variables from the numerical control program.
[0022] The calculation information creation unit 110 extracts from the machining program the positions in the machining program where the extracted variables are read or written, and information related to the read or write. In the example of FIG. 3, for example, at the position of sequence number N0102, the value obtained by adding the variables "#101" and "#102" is assigned (written) to the variable "#100." Also, at the same position of sequence number N0102, the values of the variables "#100" and "#101" are read. The calculation information creation unit 110 creates access information including information related to the access operation for each variable. Then, calculation information is created in which the access information is associated with each variable.
[0023] FIG. 5 is a table diagram showing an example of operation information related to the numerical control program exemplified in FIG. 3 . FIG. 6 is a table diagram showing an example of operation information related to the numerical control program exemplified in FIG. 4 . In FIGS. 5 and 6 , the symbol "[W]" in the access information column indicates that a write is being performed, and "[R]" indicates that a read is being performed. The access information includes at least information related to such access operations. Furthermore, "N" and the four-digit number following it indicate the sequence number within the numerical control program where such reading and writing is performed. The access information may also include information related to the location where such an access operation to a variable is performed within the numerical control program. Furthermore, in the access information related to writing, a number, variable, formula, etc. following a ":" indicates the value to be written to the variable. In this way, the access information related to writing to a variable may include a number, variable, formula, etc. indicating the value to be written to the variable. In the operation information exemplified in FIGS. 5 and 6 , for example, the variable "#101" included in the numerical control program O0001 is written with a value calculated using the formula "#100 + #102" at the position of sequence number N102. It is also read at the position of sequence number N0003.
[0024] FIG. 7 is a schematic diagram showing an example of a sequence program acquired by the program acquisition unit 100. The sequence program includes, for example, an input data structure and a ladder program. The input data structure indicates the function codes of the functions provided by the sequence program, the variable numbers of the variables accessed by the sequence program, and the setting values set for the variables. The ladder program also defines the access operations related to the input and output of signals and the reading and writing of variables in the sequence program. The example in FIG. 7 shows a sequence program that sets a value for variable "#500." In the ladder program included in this sequence program, if the value of signal "R100.0" is 1, the value of variable "#500" is set to 20, and if the value of signal "R100.0" is 0, the value of variable "#500" is set to 10.
[0025] Fig. 8 is a table diagram showing an example of operation information related to the numerical control program exemplified in Fig. 7. In Fig. 8, the conditional expression following "[W]" indicates a condition under which an access operation to a variable is performed. The access information may include information related to the condition under which an access operation to a variable in such a sequence program is performed.
[0026] FIG. 9 is a schematic diagram showing an example of a source program of an external application acquired by the program acquisition unit 100. The external application accesses variables of a numerical control program by executing a predetermined library function. In the example of FIG. 9, a value can be written to a specified variable by accessing a library function called "cnc_set_values()." In the structure specified as the third argument of this function "cnc_set_values()," a value is set to the specified variable by specifying the variable number ("Macro.datano" in the example of FIG. 9) and the value to be set ("Macro.mcr_val" in the example of FIG. 9). In FIG. 9, the value of the variable "#300" is set to 50. FIG. 10 is a table diagram showing an example of calculation information related to the source program of the external application illustrated in FIG. 9.
[0027] The format of the access information is not limited to the formats exemplified in Figures 5, 6, 8, and 10. Any format is acceptable as long as it can at least identify the program accessing each variable, the access operation, and the value written to the variable by the access operation. The calculation information creation unit 110 outputs the calculation information created in this manner to the prompt creation unit 130 and the program update unit 170.
[0028] The prompt creation unit 130 creates a prompt that can be input to the interactive response system 2 based on the program acquired by the program acquisition unit 100 and the calculation information created by the calculation information creation unit 110. The prompt created by the prompt creation unit 130 is a prompt for inquiring about role information indicating the role of each variable included in the program acquired by the program acquisition unit 100. The prompt creation unit 130 may assign prompt identification information that allows the created prompt to be uniquely identified. The prompt creation unit 130 may create a prompt by, for example, applying the program and calculation information to a prompt template corresponding to the inquiry information.
[0029] FIG. 11 is a schematic diagram showing an example of multiple templates stored in the template storage unit 200. In the example of FIG. 11, the template storage unit 200 stores multiple templates 1, 2, .... Each template is associated with a type of program to be queried. The prompt creation unit 130 selects a template stored in the template storage unit 200 in accordance with the type of program acquired by the program acquisition unit 100 and the type of information to be queried. The selected template is then used to create a prompt. The created prompt is then transmitted to the transmission unit 140.
[0030] FIG. 12 is a schematic diagram showing an example of a template. The template shown in FIG. 12 is a template for creating a prompt that queries for information related to the role of each variable used in a program. In this example, the role information queries the name of each variable and information about the data stored in each variable. The template may include, for example, information keys for embedding specific information at specific positions in the prompt text. The prompt creation unit 130 creates a prompt by embedding corresponding information in the positions of each information key. In the example of FIG. 12, files containing numerical control programs are attached to the positions of the information keys "CNC_PROGRAM1" and "CNC_PROGRAM2." Furthermore, files containing calculation information extracted from the numerical control programs are attached to the positions of the information keys "VALIABLES_INFO1" and "VALIABLES_INFO2." The template may also have information keys corresponding to information calculated by performing specific calculations based on specific machine information.
[0031] Such templates are created in advance to match the format of inquiries to the interactive response system 2. For example, if the interactive response system 2 responds to inquiries in the form of a list of items, it is desirable that the templates be for creating prompts that list each of the items. Also, if the interactive response system 2 responds to inquiries in the form of natural language inquiries, it is desirable that the templates be for creating prompts in the form of natural sentences. It is desirable that each template be created so as to include machine information and information calculated from the machine information that will be useful when creating an answer to an inquiry about the cause of an expected abnormal operation and countermeasures.
[0032] The transmitting unit 140 transmits the prompt created by the prompt creating unit 130 to the interactive response apparatus 2. Upon receiving the prompt from the transmitting unit 140, the interactive response apparatus 2 generates a response to the received prompt. The interactive response apparatus 2 includes role information, such as the name of the variable and information about the data stored in the variable, in the response. The variable names are expected to be those used in, for example, manuals for the control device 3 and the industrial machine 4, manuals for programming languages such as numerical control programming languages, PLC languages, and C languages, and technical public documents related to these programming languages. Furthermore, the information about the data stored in the variable is expected to be the type of data assigned to the variable after analyzing the attached program. FIG. 13 shows an example of a response generated by the interactive response apparatus 2. The interactive response apparatus 2 transmits the generated response to the analysis device 1.
[0033] The receiving unit 150 receives the response transmitted from the interactive response apparatus 2. The response received by the receiving unit 150 includes role information generated by the interactive response apparatus 2 for each variable included in the program. The receiving unit 150 outputs the received response to the program update unit 170.
[0034] The program update unit 170 updates the program acquired by the program acquisition unit 100 based on the calculation information created by the calculation information creation unit 110 and the role information included in the response from the interactive response device 2 received by the receiving unit 150. The program update unit 170 may, for example, replace the variable numbers included in each program with the names of the variables indicated in the response from the interactive response device 2. Furthermore, the program update unit 170 may associate the names of the variables and the types of data indicated in the response with the variable numbers. The program update unit 170 outputs the updated program to the output unit 190.
[0035] The output unit 190 outputs the program updated by the program update unit 170. The output unit 190 may display the updated program on the display device 70. FIGS. 14 and 15 are schematic diagrams showing examples of display of the updated program by the output unit 190. In the example of FIG. 14, each variable is replaced with the name of the variable included in the response of the interactive response device 2. FIG. 15 shows an example in which each variable is associated with the name of the variable included in the response of the interactive response device 2. For example, when a variable is selected with a mouse cursor, the output unit 190 may display information about the data associated with the variable in a speech bubble or the like. The output unit 190 may transmit the updated program to another computer, such as the control device 3, the fog computer 6, or the cloud server 7, via the network 5.
[0036] The analysis device 1 according to this embodiment, which has the above configuration, can replace variables with their names or associate them with data information stored in the variables in programs such as numerical control device programs in which variables are indicated by variable numbers, related sequence programs, and source programs of external applications, thereby improving the readability of the entire program.
[0037] Second Embodiment An analysis device according to a second embodiment of the present disclosure will be described below. The analysis device 1 according to this embodiment has the same hardware configuration as the analysis device 1 according to the first embodiment.
[0038] Similar to the analysis device 1 according to the first embodiment, the analysis device 1 according to this embodiment includes a program acquisition unit 100, a calculation information creation unit 110, a prompt creation unit 130, a transmission unit 140, a reception unit 150, a program update unit 170, and an output unit 190. The RAM 13 to the non-volatile memory 14 of the analysis device 1 also include a template storage unit 200, which is an area in which prompt templates are stored in advance.
[0039] The program acquisition unit 100, the calculation information creation unit 110, the transmission unit 140, and the reception unit 150 included in the analysis device 1 according to this embodiment have the same functions as those of the first embodiment.
[0040] The prompt creation unit 130 creates a prompt that can be input to the interactive response device 2 based on the program acquired by the program acquisition unit 100 and the calculation information created by the calculation information creation unit 110. The prompt created by the prompt creation unit 130 according to this embodiment is a prompt for inquiring about at least one of variable conflict information, variable duplication information, and variable transition information as information related to the role of each variable included in the program acquired by the program acquisition unit 100. Variable conflict occurs when variables with the same variable number are used in different locations. The variable conflict information includes a list of the variable numbers of the conflicting variables and the names and locations of the programs in which the conflicting variables are used. The variable duplication information includes a list of the names and locations of programs in which similar writing is performed on different variables. Variable transition is the flow of data values read and written to variables. The variable transition information includes information indicating the flow of data values read and written between each variable. In addition to this information, the information related to the role of each variable may also include the usage relationship of the variables, the type of data stored in the variables, and the timing of data updates. FIG. 16 is a schematic diagram showing an example of a template used by the prompt generator 130 according to this embodiment.
[0041] The program update unit 170 updates the program acquired by the program acquisition unit 100 based on the calculation information created by the calculation information creation unit 110 and the role information included in the response from the interactive response device 2 received by the receiving unit 150. The program update unit 170 according to this embodiment may resolve conflicts, for example, by changing the variable numbers used in a program location for conflicting variables indicated in the response from the interactive response device 2 to different variable numbers. For variables using duplicate values, the number of variables can be reduced by unifying the variable numbers, for example. If no command is executed between two or more variables using duplicate values that changes the values used in the variables, unifying the variable numbers of these variables is not a problem. The relationship between the values used in the variables and the commands that change them may be defined in advance and stored in the RAM 13 or non-volatile memory 14. FIG. 17 shows an example of a relationship definition between the values used in the variables and the commands. Based on such a relationship definition and the role information created by the interactive response device 2, variables can be integrated. The program update unit 170 can also reduce the amount of code by creating macros for variables that use duplicate values. If no commands are executed that change the values used in two or more variables that use duplicate values, it is more efficient to create macros for the processing related to those variables. In this case, the processing related to the variables is compiled into a separate program as a macro and replaced with a callable program. The program update unit 170 may also perform processing such as constantizing values. Such a program update method can be achieved by defining rules in advance based on known code optimization techniques. Similar optimization can also be performed on the source code of PLC programs and external applications. The program update unit 170 outputs the updated program to the output unit 190.
[0042] The output unit 190 outputs the program updated by the program update unit 170. In addition to outputting the program, the output unit 190 according to this embodiment may also output variable transition information included in the response from the interactive response apparatus 2. FIG. 18 is a schematic diagram showing an example of displaying transition information. The variable transition information may be displayed as is, as information included in the response from the interactive response apparatus 2. Alternatively, as shown in FIG. 18, the variable transition information may be displayed in the form of, for example, a sequence diagram. When creating a sequence diagram from the variable transition information, a known sequence diagram creation library such as Mermaid or SequenceDiagram can be used.
[0043] The analysis device 1 according to this embodiment, which has the above configuration, can improve the readability of the entire program by eliminating conflicts and duplications between variables. Furthermore, by viewing variable transition information, it becomes easier to understand the overall flow of the program. Furthermore, eliminating conflicts and duplications can reduce unnecessary resources. If variables are not properly managed, multiple variables may be allocated for similar commands, resulting in excessive memory consumption. Furthermore, when variables are accessed by executing a numerical control program with multi-path commands, or when variables are accessed from an external application or a processor controlling signals, conflicts with variables currently in use may occur. When conflicting or duplicated variables exist, it is necessary to analyze the numerical control program to address the issue, which places a significant burden on the user. The analysis device 1 according to this embodiment also contributes to solving these problems.
[0044] As a modified example of the analysis device 1 according to this embodiment, the analysis device 1 may output the program updated by the program update unit 170 to the prompt creation unit 130 again, and inquire about the role information of each program from the interactive response system 2. With this configuration, it is possible to inquire about variable conflict information, variable duplication information, variable transition information, etc. for the updated program, and to check whether there are any further variable conflicts or duplications, how the variable transition information has changed as a result of the update, etc.
[0045] [Other Embodiments] In the above-described embodiment, the results of countermeasures taken by the user may be further fed back to the interactive response device 2. For example, among responses including a plurality of pieces of cause and countermeasure proposal information, for a response including cause and countermeasure proposal information that actually contributed to improving abnormal behavior as a result of cause investigation and countermeasures, the transmitting unit 140 transmits to the interactive response device 2 a message indicating that the response was useful. With this configuration, it is expected that the interactive response device 2 will be able to improve the accuracy of investigating the cause of abnormal behavior and formulating countermeasure proposals, thereby contributing to reducing the time required for considering countermeasures.
[0046] Although the embodiments of the present disclosure have been described in detail above, 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 invention or the idea and intent of the present disclosure derived from the content described in the claims and their equivalents. 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. The same applies when numerical values or mathematical expressions are used in the description of the above-described embodiments.
[0047] The following are supplementary notes related to embodiments of the present disclosure. (Supplementary Note 1) An analysis device (1) according to one aspect of the present disclosure includes an operation information creation unit (110) that creates variables included in a program related to an industrial machine (4) and access information to the variables as associated operation information, a prompt creation unit (130) that creates a prompt inquiring about role information of the variables, a transmission unit (140) that transmits the prompt to an interactive response device (2), a reception unit (150) that receives a response including role information generated by the interactive response device (2) based on the prompt, a program update unit (170) that updates the program based on the operation information and the role information, and an output unit (190) that outputs the program updated by the program update unit (170).
[0048] (Supplementary Note 2) The role information of the variables received by the analysis device (1) according to another aspect of the present disclosure includes at least one of information on data stored in the variables and names of the variables, and the program update unit (170) updates the program by at least one of replacing variable numbers included in the program with variable names and linking variable numbers to variable names based on the operation information and the role information. (Supplementary Note 3) The role information of the variables received by the analysis device (1) according to another aspect of the present disclosure includes at least one of variable conflict information, variable duplication information, and variable transition information, and the program update unit (170) updates the program by at least one of resolving variable conflicts, unifying duplicate variables, and creating macros for operation commands related to duplicate variables based on the operation information and the role information.
[0049] (Supplementary Note 4) The program analyzed by the analysis device (1) according to another aspect of the present disclosure is at least one of a numerical control program, a PLC program, and a source program of an application that reads and writes the variables. (Supplementary Note 5) The calculation information creation unit (110) included in the analysis device (1) according to another aspect of the present disclosure reanalyzes the machining program updated by the program update unit (170).
[0050] (Supplementary Note 6) A computer-readable recording medium according to one aspect of the present disclosure records a program that causes a computer to operate as an operation information creation unit (110) that creates operation information that associates variables included in a program related to an industrial machine (4) with access information to the variables, a prompt creation unit (130) that creates a prompt that inquires about role information of the variables, a transmission unit (140) that transmits the prompt to an interactive response device (2), a reception unit (150) that receives a response including role information generated by the interactive response device (2) based on the prompt, a program update unit (170) that updates the program based on the operation information and the role information, and an output unit (190) that outputs the program updated by the program update unit (170).
[0051] REFERENCE SIGNS LIST 1 Analysis device 2 Interactive response device 3 Control device 4 Industrial machine 5 Network 6 Fog computer 7 Cloud server 11 CPU 12 ROM 13 RAM 14 Non-volatile memory 15, 17, 18, 20 Interface 22 Bus 70 Display device 71 Input device 72 External device 100 Program acquisition unit 110 Calculation information creation unit 130 Prompt creation unit 140 Transmission unit 150 Reception unit 170 Program update unit 190 Output unit 200 Template storage unit
Claims
1. An analysis device comprising: an operation information creation unit that creates operation information that associates variables included in a program related to industrial machinery with access information to the variables; a prompt creation unit that creates a prompt that inquires about role information of the variables; a transmission unit that transmits the prompt to an interactive response device; a reception unit that receives a response including role information generated by the interactive response device based on the prompt; a program update unit that updates the program based on the operation information and the role information; and an output unit that outputs the program updated by the program update unit.
2. The analysis device according to claim 1, wherein the role information of the variables includes at least one of information on data stored in the variables and names of the variables, and the program update unit updates the program based on the calculation information and the role information by at least one of replacing variable numbers included in the program with variable names and linking variable names to variable numbers.
3. The analysis device according to claim 1, wherein the variable role information includes at least one of variable conflict information, variable duplication information, and variable transition information, and the program update unit updates the program based on the operation information and the role information by at least one of resolving variable conflicts, unifying duplicated variables, and creating macros for operation commands related to duplicated variables.
4. The analysis device according to claim 1, wherein the program is at least one of a numerical control program, a PLC program, and a source program of an application that reads and writes the variables.
5. The analysis device according to claim 1, wherein the calculation information creation unit reanalyzes the machining program updated by the program update unit.
6. A computer-readable recording medium having recorded thereon a program for causing a computer to operate as: an operation information creation unit that creates operation information that associates variables included in a program related to industrial machinery with access information to the variables; a prompt creation unit that creates a prompt that inquires about role information of the variables; a transmission unit that transmits the prompt to an interactive response device; a reception unit that receives a response including role information generated by the interactive response device based on the prompt; a program update unit that updates the program based on the operation information and the role information; and an output unit that outputs the program updated by the program update unit.
Citation Information
Patent Citations
Source code analysis program
JP2006252201A
Development support program, recording medium, development support method, and development support device
JP2017016411A
Numerical controller and variable determination method
JP2017224137A