Control program editing device, editing method, and program
By introducing a control program editing device into the PLC, users can select appropriate commands by entering search terms and viewing the command list, which solves the problem of a large number of commands and limited search functions in the PLC, and improves programming efficiency and accuracy.
Patent Information
- Application Number
- CN202380046115.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-07-15
- Filing Date
- 2023-07-04
- Publication Date
- 2025-01-21
AI Technical Summary
In PLC, due to the large number of commands, users need to master the commands and their functions when looking for target commands, and can only search consistently with the commands, resulting in users requiring additional judgment and understanding when creating programs.
A control program editing device is provided, which includes a search word input part, a command list acquisition part, an extraction part, a display control part, a selection part and an application part. Users can enter search terms, obtain a command list, extract commands associated with the search terms, display commands and their functional descriptions, and select appropriate commands to input to the control program.
Even if the user does not master the commands and their functions, they can still input appropriate commands through the device, which improves the user's efficiency and accuracy in programming.
Smart Images

Figure CN119343644A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a control program editing device. Background Art
[0002] Generally, programs are developed through an integrated development environment (IDE). In order to reduce the amount of user input, an IDE is equipped with an input support function that completes the input content based on the input information. For example, Patent Document 1 discloses a method for supporting the input of variable names in the programming of a programmable logic controller (PLC). In the input support method, only variables containing the variable name of the input string are extracted from the pre-stored variable names and displayed in a list.
[0003] In a factory automation (FA) system, a PLC is generally used. A large number of commands are prepared in the PLC, and a user creates a program using the large number of commands as appropriate.
[0004] Prior art literature
[0005] Patent Literature
[0006] Patent Document 1: Japanese Patent Application Publication No. 2005-352612 Summary of the invention
[0007] Problems to be solved by the invention
[0008] There are a large number of commands prepared in PLC. In order to find the target command, the command search function can be used. In the command search function, generally only the search that is consistent with the command front can be performed, so the user needs to make a program after judging whether the command displayed as the search result is appropriate. In other words, the user needs to understand the command and its function.
[0009] An object of one aspect of the present invention is to provide a control program editing device that allows a user to create a program using appropriate commands even if the user has not yet mastered the commands and functions that the user wants to use.
[0010] Technical means of solving problems
[0011] In order to solve the above-mentioned problems, one form of a control program editing device of the present invention is a control program editing device for editing a control program of an FA system, and includes: a search term input unit, which receives user input of a search term as a user instruction to input a command to the control program; a command list acquisition unit, which acquires a command list including candidates for the command and a command name corresponding to each of the command, and a functional description corresponding to each of the command; an extraction unit, which extracts the command associated with the search term from the command list; a display control unit, which controls the display of the command extracted by the extraction unit, the command name of the command, and the functional description of the command; a selection unit, which receives user input of selecting one of the commands from the commands displayed by the display control unit; and an application unit, which inputs the command selected by the selection unit into the control program.
[0012] In order to solve the above-mentioned problems, another form of an editing method of a control program editing device of the present invention is an editing method of a control program editing device for editing a control program of an FA system, and includes: a search term input step, receiving user input of a search term as a user instruction to input a command to the control program; a command list acquisition step, acquiring a command list including candidates for the command and a command name corresponding to each of the command, and a functional description corresponding to each of the command; an extraction step, extracting the command associated with the search term from the command list; a display control step, controlling the display of the command extracted by the extraction step, the command name of the command, and the functional description of the command; a selection step, receiving user input of selecting one of the commands from the commands displayed in the display control step; and an application step, inputting the command selected by the selection step into the control program.
[0013] According to the above structure, when inputting a command, the user can select a command while confirming the command, the command name and the function description. Therefore, even if the user has not yet understood the command and the function of the command, the user can input the command.
[0014] Effects of the Invention
[0015] According to one aspect of the present invention, an appropriate command can be input even if the command is not yet understood. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] [ Figure 1 ] is a block diagram showing the structure of the main parts of the control program editing device of implementation mode 1.
[0017] [ Figure 2 ] is a flowchart showing an example of the operation of the control program editing device according to implementation mode 1.
[0018] [ Figure 3 ] is a diagram showing an example of extracted commands.
[0019] [ Figure 4 ] is an example of a screen for selecting a function command at a stage where a search word has not been input.
[0020] [ Figure 5 ] is an example of a screen for selecting a function command at the stage where "timer" is input as a search word.
[0021] [ Figure 6 ] is an example of a screen for selecting a function command at a stage where "timer true (TRUE)" is input as a search word.
[0022] [ Figure 7 ] is an example of a screen at the stage where a command is selected based on the extraction result.
[0023] [ Figure 8 ] is an example of a screen showing the processing when the selected command and the type of circuit component are different.
[0024] [ Fig. 9 ] is a diagram in which the extracted results are rearranged and displayed with priority.
[0025] [ Fig.10 ] is an example of the priority of the display order in the display control unit. DETAILED DESCRIPTION
[0026] Hereinafter, an embodiment of one aspect of the present invention (hereinafter also referred to as "this embodiment") will be described based on the drawings. In addition, the same reference numerals are attached to the same or corresponding parts in the drawings, and their description will not be repeated.
[0027] §1. Application examples
[0028] The creation of PLC programs is performed using control program editing devices such as IDE. In the control program editing device, development can be performed in five languages specified in IEC61131-3. In these languages, programs are created using functions with a single function and function blocks with complex functions composed of a combination of contacts, coils, and functions to control the device.
[0029] There are a large number of functions and function blocks to meet various purposes. Therefore, in the case of a function, after configuring the circuit component of the function, the user must choose which command to use in order to select the function of the function. The same is true for the function block.
[0030] The IDE is equipped with an input support function that searches for a part of a command when inputting a function or a function block command and displays a list of commands corresponding to the search term.
[0031] In this embodiment, as the input support function, in addition to commands, command names (names in various languages used) and function descriptions of commands (descriptions of functions performed by the commands in various languages used) can also be searched (extracted) as objects. Therefore, even if the user does not remember the command (instruction) completely but only remembers the function of the command, the input support function can select and input the correct command.
[0032] §2.Structure example
[0033] (Control program editing device 1)
[0034] Figure 1 1 is a block diagram showing the configuration of the main parts of the control program editing device 1 according to Embodiment 1. The control program editing device 1 includes a recording unit 17, a search word input unit 11, a command list acquisition unit 12, an extraction unit 13, a display control unit 14, a selection unit 15, and an application unit 16. In addition, the control program editing device 1 is connected to an input device 20 such as a keyboard and a mouse, and a display device 30 such as a display.
[0035] The recording unit 17 records a command table 17a used in the control program. The control program editing device 1 appropriately acquires the command table 17a from the recording unit 17 and realizes the input support function. In addition, the command table 17a may also be recorded in an external device (for example, a cloud server).
[0036] In addition, a large number of commands are recorded in the command table 17a. A command is a function that executes a single function, and a function block that realizes multiple functions. In addition, as the contents recorded in the command table 17a, there are instructions of the command (hereinafter referred to as command), command names of the command, and functional descriptions of the command. In addition, the categories of commands, etc. may also be recorded.
[0037] The search term input unit 11 receives a user input of a search term, and the user input of the search term is used to lock an appropriate command from a plurality of commands. That is, the search term input unit 11 performs the user input of a search term through the input device 20, and the search term is used to search (specifically specify) a command, a command name related to the command, and a character string recorded in a function description related to the command. The search term input unit 11 outputs the search term to the extraction unit 13.
[0038] The command list acquisition unit 12 acquires a command list including command candidates, command names corresponding to the commands, and function descriptions corresponding to the commands, and outputs the command list to the extraction unit 13 .
[0039] The extraction unit 13 extracts commands, command names, and function descriptions associated with the search term from the command list. As long as the search term is included in any one of the command, command name, or function description, the command is extracted. The details of this process will be described later. The extraction unit 13 outputs the extracted commands to the display control unit 14.
[0040] The display control unit 14 displays the command extracted by the extraction unit 13 on the display device 30. At this time, the display control unit 14 displays the command, the command name, and the function description together. In addition, the type of command (function or function block) and the category of the command (for example, "+", "ADD", etc. are "arithmetic", etc.) may also be displayed together.
[0041] The selection unit 15 receives a user input for selecting an element from the commands displayed by the display control unit through the input device 20 , and outputs the received user input to the application unit 16 .
[0042] The application unit 16 inputs the element selected by the selection unit 15 into the control program. In other words, the application unit 16 inputs the command selected for the circuit component.
[0043] §3. Action Examples
[0044] Figure 2 This is a flowchart showing an operation example of the control program editing device 1 according to the first embodiment.
[0045] First, the command list acquisition unit 12 acquires the definition names of all functions and all function blocks as a command list (S101). Here, the command list includes commands, command names corresponding to the commands, and functional descriptions corresponding to the commands.
[0046] The search word input unit 11 receives an input of a search word as a user instruction to input a command to the control program. For example, as the input search word, "overflow" etc. are listed. Hereinafter, this example will be described as a representative example.
[0047] The extracting unit 13 extracts commands associated with the search word from the command list (S102). For example, when the search word is "overflow", commands with a command name of "multiply (with overflow check)" are extracted.
[0048] The display control unit 14 records and displays the commands extracted by the extraction unit 13 , the command names of the commands, and the functional descriptions of the commands together ( S103 ). Figure 3 This is a diagram showing an example of extracted commands. Figure 3 In the figure, reference numeral 101 indicates a search word, and reference numeral 102 indicates an extracted command. In reference numeral 102, the search word may be highlighted by boldface or by changing the color of the characters. In addition, the category of the command may be displayed together with the display content of the extracted command.
[0049] The selection unit 15 receives a user input for selecting a command from the extracted commands displayed by the display control unit 14 (S104). Based on this, it is determined whether the selected command is the same as the type of circuit component input in advance (S105). The reason is that in the PLC program, functions and function blocks present different command forms, so they need to be distinguished.
[0050] When the selected command and the type of the circuit component are the same (Yes in S105 ), the process proceeds to S107 .
[0051] When the selected command and the type of the circuit component are different ("No" in S105), the application unit 16 changes the circuit component to a format consistent with the selected command (S106). That is, when the selected command is a function and the circuit component is a function block, the circuit component is changed to the function. Vice versa.
[0052] The application unit 16 inputs the selected command to the circuit component ( S107 ).
[0053] (Extraction processing and determination of circuit components)
[0054] The process of extracting commands from the command list by the extracting unit 13 will be described in more detail.
[0055] Figure 4 This is an example of a screen for selecting a function command in a stage where a search term has not yet been entered. Figure 4 As shown, at the stage where no search word is input, all functions and function blocks are displayed as extracted commands. That is, what is actually displayed is a command list. As for the display order at this time, since no search word is set, the commands are set in ascending order based on the alphabet.
[0056] In addition, Figure 4 In the figure, the first column is a column showing whether it is a function or a function block, the second column is a command, the third column is a command name, the fourth column is a command category, and the fifth column is a function description. In the following figures, the display order is also the same.
[0057] Figure 5 This is an example of a screen for selecting a function command when "timer" is input as a search word. Figure 5 As shown, this is based on the "timer" in the command name and function description. Figure 4 This is an example of a command list extracted using "timer". In addition, the type of command can also be added to the search object.
[0058] Figure 6 This is an example of a screen for selecting a function command in the stage where "timer true" is input as a search word. In response to this input, the extraction unit 13 extracts using "timer" and "true". Figure 6 As shown, multiple search terms can be separated by spaces, and search can be performed with compound conditions (AND conditions) of each. This allows the command to be targeted with higher accuracy.
[0059] Figure 7 This is an example of a screen at the stage where a command is selected based on the extraction results. Figure 6 The user confirms the appropriate command, selects the appropriate command from the displayed commands, and inputs the command by inputting "ENTER". In addition, the input device 20 is not limited to keyboard operation, and can also be clicked using a pointing device such as a mouse.
[0060] Here, even if the user selects the expected appropriate command, the command name and function description related to the command can be displayed. Through their correspondence, the user can confirm whether the appropriate command has been selected. In addition, in addition to displaying this information, when a single command is selected, a pop-up display corresponding to the command in the manual can be displayed. In this case, the method of using the command can be confirmed without referring to the manual, thereby reducing the user's labor.
[0061] Figure 8 This is an example of a screen showing the processing when the selected command and the type of circuit component are different. Figure 4 to Figure 7 In , the function is used as the type of circuit components. Figure 7 The type of command selected in is a function block. Therefore, the circuit components are different from the type of command selected.
[0062] If the original circuit component is of a different type from the selected command, the program cannot be edited, so the application unit 16 changes the circuit component at the position selected by the user to a circuit component of the type of the selected command.
[0063] Specifically, when the selected circuit component at a certain position is a function, the "TON" command as a function block is selected, so the circuit component at the position is changed from a function to a function block. Figure 8The control program editing device 1 requests the user to input the instance name and variables of the function block.
[0064] Here, the display control unit 14 may also perform control to display a graphic editing screen in which graphics representing circuit components constituting the control program are connected to each other.
[0065] (Display order of extracted results)
[0066] The display control unit 14 may rearrange the extracted results and display them with priority. Fig. 9 This is a diagram that rearranges the extracted results and displays them with priority.
[0067] like Fig. 9 As shown, when the search word is "Set", in addition to extracting commands beginning with "Set", commands including "set" represented by "Reset" etc. may also be extracted. In this case, the extracting unit 13 makes a determination without distinguishing between uppercase and lowercase characters during extraction.
[0068] In addition, the display control unit 14 performs control to display commands that coincide with the beginning of the search term preferentially. Since the prefix of "Reset" is "R", it is earlier than the prefix "S" of "Set" in alphabetical order, but since it is rearranged in a manner that coincides with the beginning of the search term (here, "Set"), "Set" comes before "Reset".
[0069] When multiple search terms are input, the commands obtained by searching with the first search term are rearranged so that the commands with the same search terms are prioritized, and then the search is performed with the next search term. Therefore, the second and subsequent search terms may not be rearranged.
[0070] (Based on the display order of the extracted objects)
[0071] In addition, the display control unit 14 may also set a priority for the display order of commands, command names, and functional descriptions. Specifically, the display control unit 14 first displays the commands that contain the search term in the commands extracted by the extraction unit 13, the command names of the commands, and the functional descriptions of the commands. Then, the display control unit 14 secondly displays the commands that contain the search term in the command names extracted by the extraction unit 13, the command names of the commands, and the functional descriptions of the commands. Then, the display control unit 14 thirdly displays the commands that contain the search term in the functional descriptions extracted by the extraction unit 13, the command names of the commands, and the functional descriptions of the commands.
[0072] Fig.10 is an example of the priority of the display order in the display control unit 14. Fig.10 As shown, when "seconds" is specified as a search word, commands containing "seconds" are first displayed in a manner consistent with the previous one. Next, command names containing "seconds" are displayed in a manner consistent with the previous one. Then, function descriptions containing "seconds" are further displayed in a manner consistent with the previous one. In this way, by performing extraction in multiple stages and rearranging the display order, commands that are more likely to be appropriate based on the search word are displayed at the top. Therefore, commands with a high probability of being appropriate can be easily selected.
[0073] §4. Function and Effect
[0074] When a user inputs a command, he or she can select a command while confirming the display related to the command, command name, and function description. Therefore, even if the user does not yet understand the command and the function of the command, the user can input the command. At this time, the character string recorded in any one of the command, command name, or function description can be extracted using the search term. Therefore, the extraction is not limited to the command, so it is easier to find the appropriate processing required by the user.
[0075] In addition, rather than just extracting using the search word, commands that match the beginning of the search word can be displayed preferentially. Therefore, even when a large number of commands are extracted, the target command can be easily found.
[0076] In the extraction using the search word, the priority of the display order is made different depending on whether the extraction is performed in the command, the command name, or the function description. This makes it easy to select a command that is considered to be more appropriate.
[0077] Even if the type of circuit components displayed on the graphic editing screen is different from the type of command selected, it can be converted into an appropriate program element. Therefore, even if the circuit components are arranged by selecting the wrong function and function block, an appropriate control program can be created.
[0078] 〔Summarize〕
[0079] In order to solve the above-mentioned problems, one form of a control program editing device of the present invention is a control program editing device for editing a control program of an FA system, and includes: a search term input unit, which receives user input of a search term as a user instruction to input a command to the control program; a command list acquisition unit, which acquires a command list including candidates for the command and a command name corresponding to each of the command, and a functional description corresponding to each of the command; an extraction unit, which extracts the command associated with the search term from the command list; a display control unit, which controls the display of the command extracted by the extraction unit, the command name of the command, and the functional description of the command; a selection unit, which receives user input of selecting one of the commands from the commands displayed by the display control unit; and an application unit, which inputs the command selected by the selection unit into the control program.
[0080] In order to solve the above-mentioned problems, another form of an editing method of a control program editing device of the present invention is an editing method of a control program editing device for editing a control program of an FA system, and includes: a search term input step, receiving user input of a search term as a user instruction to input a command to the control program; a command list acquisition step, acquiring a command list including candidates for the command and a command name corresponding to each of the command, and a functional description corresponding to each of the command; an extraction step, extracting the command associated with the search term from the command list; a display control step, controlling the display of the command extracted by the extraction step, the command name of the command, and the functional description of the command; a selection step, receiving user input of selecting one of the commands from the commands displayed in the display control step; and an application step, inputting the command selected by the selection step into the control program.
[0081] According to the above structure, when inputting a command, the user can select a command while confirming the command, the command name and the function description. Therefore, even if the user has not yet understood the command and the function of the command, the user can input the command.
[0082] The extracting unit may extract the command in which the search word exists in a character string of the command, the command name, and the function description.
[0083] According to the above configuration, the extraction unit can search (extract) a character string recorded in any one of the command, command name, or function description using the search word. Therefore, the extraction is not limited to the command, and the required processing can be found more easily.
[0084] The display control unit may control the commands extracted by the extraction unit to be displayed preferentially, the commands that coincide with the front of the search word.
[0085] According to the above configuration, since commands that coincide with the beginning of the search term are displayed preferentially, even when a large number of commands (command names or function descriptions) are extracted, a target command can be easily found.
[0086] It can be: the display control unit first displays the command whose search term exists in the commands extracted by the extraction unit, the command name of the command, and the functional description of the command, and then displays the command whose search term exists in the command name extracted by the extraction unit, the command name of the command, and the functional description of the command, and then displays the command whose search term exists in the functional description extracted by the extraction unit, the command name of the command, and the functional description of the command.
[0087] According to the above configuration, it is possible to give priority to the extracted commands in the display order, so that commands considered to be more appropriate are displayed at the top, and can be easily selected.
[0088] It can be: the display control unit controls to display a graphic editing screen, the graphic editing screen is formed by interconnecting graphics representing program elements constituting the control program, and the application unit makes the program element at the position selected by the user in the graphic editing screen become the program element corresponding to the command.
[0089] According to the above configuration, even when program elements (circuit components) constituting the control program are incorrectly arranged, they can be converted into appropriate program elements.
[0090] It can be: the command is a function or a function block.
[0091] According to the above structure, a function or a function block can be selected as a command.
[0092] The control program editing device in various forms of the present invention can also be implemented by a computer. In this case, the program of the control program editing device that implements the control program editing device by causing the computer to run as the various parts (software components) included in the control program editing device, and the computer-readable recording medium that records the program also fall within the scope of the present invention.
[0093] 〔Software-based implementation example〕
[0094] The functions of the control program editing device 1 (hereinafter referred to as "device") can be realized by a program for causing a computer to function as the device and a program for causing a computer to function as each control block of the device.
[0095] In this case, the device includes a computer having at least one control device (e.g., a processor) and at least one storage device (e.g., a memory) as hardware for executing the program. The control device and the storage device execute the program to implement the functions described in the embodiments.
[0096] The program may also be recorded in one or more recording media that are not temporary and can be read by a computer. The recording medium may be included in the device or not. In the latter case, the program may also be supplied to the device via any transmission medium, whether wired or wireless.
[0097] In addition, part or all of the functions of each control block can also be realized by a logic circuit. For example, an integrated circuit having a logic circuit that functions as each control block is also included in the scope of the present invention. In addition, for example, the functions of each control block can also be realized by a quantum computer.
[0098] In addition, each process described in each embodiment may be performed by artificial intelligence (AI). In this case, AI may be executed in the control device or in other devices (such as edge computers or cloud servers).
[0099] [Additional Notes]
[0100] The present invention is not limited to the above-described embodiments, and various modifications can be made within the scope of the claims. Embodiments obtained by appropriately combining technical means disclosed in different embodiments are also included in the technical scope of the present invention.
[0101] Explanation of symbols
[0102] 1: Control program editing device
[0103] 11: Search word input section
[0104] 12: Command list acquisition section
[0105] 13: Extraction Department
[0106] 14: Display control unit
[0107] 15: Selection Department
[0108] 16: Application Department
[0109] 17: Records Department
[0110] 17a: Command table
[0111] 20: Input device
[0112] 30: Display device
Claims
1. A control program editing device for editing a control program of a factory automation system, the control program editing device comprising: a search word input unit that receives a user input of a search word as a user instruction to input a command to the control program; A command list acquisition unit that acquires a command list including candidates for the command, a command name corresponding to each of the commands, and a function description corresponding to each of the commands; an extracting unit, extracting the command associated with the search word from the command list; A display control unit that controls display of the command extracted by the extraction unit, the command name of the command, and the function description of the command; a selection unit, receiving a user input for selecting one of the commands displayed by the display control unit; as well as The application unit inputs the command selected by the selection unit into the control program.
2. The control program editing device according to claim 1, wherein: The extraction unit extracts the command in which the search word exists in character strings of the command, the command name, and the function description.
3. The control program editing device according to claim 1, wherein: The display control unit controls the commands extracted by the extraction unit to be displayed preferentially, the commands that coincide with the front of the search term.
4. The control program editing device according to claim 2, wherein: The display control unit First, the commands extracted by the extraction unit, in which the search word exists, the command names of the commands, and the functional descriptions of the commands are displayed; Next, the command whose command name contains the search word, the command name of the command, and the function description of the command extracted by the extraction unit are displayed. Next, the commands containing the search word in the function description extracted by the extraction unit, the command names of the commands, and the function descriptions of the commands are displayed.
5. The control program editing device according to claim 1, wherein: The display control unit controls to display a graphic editing screen, wherein the graphic editing screen is formed by mutually connecting graphics representing program elements constituting the control program, and The application unit changes the program element at the position selected by the user on the graphic editing screen to a program element corresponding to the command.
6. The control program editing device according to any one of claims 1 to 5, wherein: The command is a function or a function block.
7. An editing method is an editing method of a control program editing device for editing a control program of a factory automation system, the editing method comprising: a search word input step of receiving a user input of a search word as a user instruction to input a command to the control program; A command list acquisition step, acquiring a command list including candidates for the command, a command name corresponding to each of the commands, and a function description corresponding to each of the commands; An extraction step of extracting the command associated with the search term from the command list; A display control step of controlling the display of the command extracted by the extraction step, the command name of the command, and the function description of the command; A selection step, receiving a user input for selecting one of the commands displayed in the display control step; as well as An application step of inputting the command selected in the selection step into the control program.
8. A program for causing a computer to function as the control program editing device as described in claim 1, wherein the program is used to cause the computer to function as the search term input unit, the command list acquisition unit, the extraction unit, the display control unit, the selection unit, and the application unit.
Citation Information
Patent Citations
Device for supporting program development, and method for displaying variable name list
JP2005352612A