Program editing apparatus
The program editing device automates the identification of equivalent function names across PLC environments, addressing inefficiencies in switching by providing quick and efficient function name lookup.
Patent Information
- Application Number
- PCT/JP2024/003516
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-02-02
- Publication Date
- 2025-08-07
AI Technical Summary
Programmers face inefficiencies when switching between different programmable logic controller (PLC) development environments due to varying function names and specifications, requiring time-consuming manual look-ups in documentation to identify equivalent functions.
A program editing device that includes a current development environment acquisition unit, a development environment function database, and a multi-environment function name search unit to automatically identify and output equivalent function names across different PLC environments.
Facilitates quick and efficient identification of function names in new environments, reducing the need for manual document searches and enhancing programming efficiency.
Smart Images

Figure JP2024003516_07082025_PF_FP_ABST
Abstract
Description
Program editing device
[0001] The present disclosure relates to a program editing device, and more particularly to a program editing device that can display candidate function names (function names, command names) in a predetermined development environment.
[0002] In a program development environment for programmable logic controllers (PLCs) used for sequence control, etc., a set of library functions that compile frequently used processes as functions is provided, and programmers are expected to program efficiently using these convenient function sets.
[0003] Furthermore, in an editor used for programming, that is, editing a program, there is a technique for displaying candidate function names that partially or completely match the text entered into the editor by a programmer.
[0004] Even library functions with the same functionality have different function names depending on the development environment, such as the programming language, version number and model of the environment, and manufacturer of the PLC, etc. Therefore, when a programmer changes to an unfamiliar development environment, they have to look up what functions are available, with what function names (function names, command names), and specifications, which takes time to program.
[0005] For example, as shown in Figure 1, assume that there is Engineer A who is good at ladder logic but unfamiliar with ST (Structured Text) language, and Engineer B who is good at ST language but unfamiliar with ladder logic. When the programming language in the development environment currently in use is ST language and Engineer A wants to write a program to concatenate character strings, Engineer A knows that the library function with the string concatenation function in ladder logic is SCON, but if he does not know the name (function name) or specifications of the library function with the string concatenation function in ST language, Engineer A has to refer to documents such as the ST language manual to look up the function name, etc., which takes time.
[0006] Similarly, if the programming language in the development environment currently in use is ladder logic and engineer B wants to write a program to concatenate strings, he knows that the library function with the string concatenation function in ST language is CONCAT, but if he does not know the function name or specifications of the library function with the string concatenation function in ladder logic, he would have to refer to documents such as the ladder logic manual to find out the function name, etc.
[0007] For this reason, there is a demand for a technology (program editing device) that allows a user to easily find out the function names of library functions having desired functions in the currently used development environment when editing a program.
[0008] A program editing device according to one aspect of the present disclosure includes: a current development environment acquisition unit that acquires information about the development environment of a program currently in use; a development environment function database that stores a plurality of development environments including at least one of a manufacturer, model, version number, and programming language, and a collection of name information of library functions or instructions that have equivalent functions in two or more of the development environments; a multi-environment function name search unit that searches among the name information for name information that has a function similar to name information whose name partially or completely matches a string input from an input unit and that can be used in the development environment currently in use; and a function candidate output unit that outputs the name information that can be used in the development environment currently in use as a candidate for the string to be input.
[0009] FIG. 1 is a diagram for explaining a problem to be solved by the present invention. FIG. 2 is a block diagram illustrating a configuration of a program editing device according to an embodiment of the present disclosure. FIG. 3 is a diagram illustrating input of a character string to a multiple environment function name search unit of a program editing device according to an embodiment of the present disclosure. FIG. 4 is a diagram illustrating a search of a development environment function database by a multiple environment function name search unit of a program editing device according to an embodiment of the present disclosure. FIG. 5 is a flowchart illustrating a processing procedure for searching and outputting function names (function names, instruction names) in a program editing device according to an embodiment of the present disclosure. FIG. 6 is a diagram illustrating an output mode of searched function name candidates by a function candidate output unit of a program editing device according to an embodiment of the present disclosure. FIG. 7 is a block diagram illustrating a first modified example (modified example 1) of a program editing device according to an embodiment of the present disclosure. FIG. 8 is a block diagram illustrating a second modified example (modified example 2) of a program editing device according to an embodiment of the present disclosure.
[0010] An embodiment of the present disclosure will be described below with reference to the drawings. A program editing device 1 may be realized by one or more computer devices having, for example, a memory, a processor, an input / output interface, etc., and executing an appropriate control program. FIG. 2 is a block diagram showing the configuration of the program editing device 1. The program editing device 1 includes at least an input unit 10, a control unit 20, and an output unit 30. Note that these components of the program editing device 1 are classifications of the functions of the program editing device 1, and may not necessarily be clearly distinguishable in terms of physical configuration and / or program configuration.
[0011] 2 shows the program editing device 1 itself as being equipped with the development environment function database 40, but this merely represents one possible embodiment, and this figure should not be interpreted as meaning that the development environment function database 40 is an essential component of the program editing device 1. For example, the development environment function database 40 may be implemented on a server external to the program editing device 1.
[0012] That is, it should be noted that the present disclosure does not particularly limit where and how the development environment function database 40 is implemented, and the development environment function database 40 may be implemented anywhere as long as it can be accessed in a timely manner from the control unit 20 of the program editing device 1. Details of the format of the information stored in the development environment function database 40 will be described later.
[0013] The input unit 10 can be realized by any device capable of inputting text (character strings), such as a keyboard or a touch panel. Such devices also include voice input devices (microphones, headsets, etc.). These input devices may be used in combination. A user of the program editing device 1 can input a character string representing part of a function name (function name, command name) via the input unit 10 (details will be described later).
[0014] The control unit 20 may be realized by hardware such as a processor, memory (ROM, RAM), and storage device (HDD, SSD) connected to a common bus. The storage device may store an OS and application programs for causing the hardware to function as the program editing device 1 of this embodiment. When the OS and application programs are running, the control unit 20 may include, as functional blocks, an in-use development environment acquisition unit 21, a multiple environment function name search unit 22, and a function candidate output unit 23, as shown in FIG. 2 .
[0015] The output unit 30 can be realized by a display (such as a liquid crystal display device or an organic EL display device) that can display characters and graphics. The output unit 30 is not limited to a display, and may be, for example, an audio output device (such as a speaker or a headset), or a combination of these. The user of the program editing device 1 recognizes the names of candidate functions and commands via the output unit 30 (details will be described later).
[0016] The in-use development environment acquisition unit 21 acquires information about the development environment of the program currently in use (such as the programming language, the version number and model of the environment, and the manufacturer of the PLC, etc.). The method for acquiring the in-use development environment information is not particularly limited, and for example, the in-use development environment information may be acquired by automatically communicating with the PLC, etc. (not shown) that is the target of the program to be edited when the program editing device 1 is started. Alternatively, a specific combination of development environment information may be set as a default, and the user may be allowed to manually change individual environment information as needed. Also, for example, the development environment information used last time may be set as the default, or a default may be set for each user.
[0017] The in-use development environment acquisition unit 21 outputs the acquired development environment information to the multiple environment function name search unit 22. The multiple environment function name search unit 22 receives the development environment information from the in-use development environment acquisition unit 21, and also receives a character string representing a part of a function name (function name, command name) entered by the user from the input unit 10. Then, the multiple environment function name search unit 22 searches the development environment function database 40 using the development environment information and the character string, and outputs the result to the function candidate output unit 23.
[0018] The function candidate output unit 23 creates output content using the search results received from the multi-environment function name search unit 22 and outputs it to the output unit 30 (the output content will be described later). The output unit 30 outputs the output content received from the function candidate output unit 23. For example, if the output unit 30 is a display, the output content is displayed on the screen of the display.
[0019] Next, referring to Figures 3 to 6, we will explain how a user can use the program editing device 1 and the processing that takes place inside the program editing device 1, using the example of an engineer A who is skilled in the ladder language shown in Figure 1 but unfamiliar with the ST language, and who is trying to write a program in the ST language to concatenate strings of characters as a user of the program editing device 1.
[0020] When the multiple environment function name search unit 22 of the control unit 20 of the program editing device 1 receives the currently used development environment information (programming language, environment version number and model, manufacturer of PLC, etc.) from the currently used development environment acquisition unit 21 (step S1 in Figure 5), it enters a state of waiting for input from the input unit 10.
[0021] Engineer A is skilled in ladder programming and knows that the function for concatenating character strings in ladder programming is SCON, but does not know how to write it in ST programming. Therefore, as shown in Figure 3, Engineer A tries to input the character string "SC" which represents part of the ladder programming function name SCON into the input unit 10. The input character string "SC" is sent from the input unit 10 to the multi-environment function name search unit 22.
[0022] As shown in FIG. 4, when the multi-environment function name search unit 22 receives the character string "SC" from the input unit 10, it accesses the development environment function database 40 and searches for functions and commands that are available in the currently used development environment and have functions similar to the functions and commands that partially or completely match the input character string "SC" (step S2 in FIG. 5).
[0023] Here, a collection of name information for a plurality of functions and commands provided in each development environment is stored by function in the development environment function database 40. For example, if the function names of a plurality of string manipulation functions provided in the currently used development environment (manufacturer: Company A, model: XXX, and language: ST) are "REPLACE," "CONCAT," "=", "LEN," etc., the development environment function database 40 stores these function names in association with the functions of each function, such as string replacement, string concatenation, string comparison, and string length acquisition.
[0024] Similarly, the function names "SREP," "SCON," "SCOMP," "SLEN," etc. of multiple string manipulation functions provided in another development environment (manufacturer: Company A, model: XXX, and language: Ladder) are stored in association with the functions of each function, such as string replacement, string concatenation, string comparison, and string length acquisition. The same is true for still other development environments (manufacturer: Company B, model: YYY, and language: Ladder; manufacturer: Company B, model: YYY, and language: ST; manufacturer: Company C, model: ZZZ, and language: C; manufacturer: Company D, model: DDD, and language: Python).
[0025] If the functions provided by different development environments are grouped by identical or similar functions, a function name correspondence table such as that shown in Figure 4 is formed. The development environment function database 40 stores a collection of function name (function name, command name) information in the form of such a correspondence table (tabular format).
[0026] The multi-environment function name search unit 22 identifies "SCON" and "SCOMP" in the development environment (manufacturer: Company A, model: XXX, language: ladder) as functions and instructions that partially or completely match the input string "SC." Then, by referencing the intersections of the row of the string concatenation function to which "SCON" belongs and the row of the string comparison function to which "SCOMP" belongs in the correspondence table shown in FIG. 4 with the column of the currently used development environment (manufacturer: Company A, model: XXX, language: ST), the unit searches for functions and instructions that have the same functions as "SCON" and "SCOMP," i.e., string concatenation and string comparison, and that are available in the currently used development environment (manufacturer: Company A, model: XXX, language: ST), and obtains the function names "CONCAT" and "=" as search results. Next, the multi-environment function name search unit 22 outputs the obtained function names "CONCAT" and "=" to the function candidate output unit 23 (step S3 in FIG. 5).
[0027] As shown in FIG. 6 , when the function candidate output unit 23 receives the function name “CONCAT” and “=” from the multi-environment function name search unit 22, it creates output content and outputs it to the user via the output unit 30. The output content may be, for example, a message “The following candidates were found” followed by a list of the function names “CONCAT” and “=,” as shown in the output example in the upper right corner of FIG. 6 . However, the output content is not limited to this, as long as it can accurately convey to the user the function name (function name, command name) candidates obtained by the search. For example, as shown in the output example in the lower right corner of FIG. 6 , specification information such as the description format, parameters (arguments), and return values of the library function or command associated with the function name may be included in the output content to further improve user convenience.
[0028] As shown in the flowchart of Fig. 5, the program editing device 1 loops through steps S2 and S3 while a loop condition is satisfied. For example, if the loop condition is set to the period during which a character string continues to be input, steps S2 and S3 will be repeatedly executed while the user continues to input. This allows, for example, if the user does not obtain the output he or she desires, to re-execute the search and output with a simple operation, such as by changing the input character string and re-inputting it. Of course, even if the user obtains the output he or she desires, if he or she wishes to continue searching for other function names, he or she can simply and quickly repeat the desired search by continuing to input new character strings as appropriate.
[0029] Here, the method of determining whether input of the character string is continuing is not particularly limited. For example, a timer may be used to measure time, and if no input is made within a predetermined time, the loop of steps S2 and S3 may be terminated, or input of the character string may be determined to have ended when a predetermined operation is performed by the user.
[0030] The above has been described using an example in which engineer A, who is skilled in ladder logic but unfamiliar with ST language, is attempting to write a program in ST language that concatenates character strings as a user of the program editing device 1. However, if engineer B, who is skilled in ST language but unfamiliar with ladder logic, is attempting to write a program in ladder logic that concatenates character strings as a user of the program editing device 1, it goes without saying that engineer B can input a character string (e.g., "CO") that represents a part of the function name (function name) CONCAT for concatenating character strings in the ST language that engineer B is familiar with. In this case, as in the previous example, the program editing device 1 executes steps S2 and S3 while the input of the character string continues.
[0031] (Variation 1) Furthermore, as a first variation (variation 1) of this embodiment, as shown in Fig. 7, the control unit 20 of the program editing device 1 may further include a development environment function database update unit 24. Whenever the development environment is updated (for example, when the version number is updated) or a new development environment is released (for example, when a new model is added), the development environment function database update unit 24 can be started to edit and update the development environment function database 40. This allows the user to use a database containing the latest development environment information, making it possible to easily edit programs compatible with a wide range of development environments.
[0032] 8, the control unit 20 of the program editing device 1 may further include a search condition input unit 25 in addition to the development environment function database update unit 24. The search condition input unit 25 outputs at least one of the manufacturer, model, version number, and programming language as search conditions to the multi-environment function name search unit 22. When searching the development environment function database 40, the multi-environment function name search unit 22 outputs function names that match the received search conditions as candidates to the function candidate output unit 23.
[0033] For example, even if the programming language is the same, there may be slight differences in specifications (so-called dialects of the programming language) depending on the manufacturer and version number. In such cases, by specifying the manufacturer and version number as search conditions, the program editing device 1 can provide function names and their specification information that better match the desired development environment.
[0034] According to at least one of the embodiments and variants described above, the user of the program editing device does not need to refer to separate documents such as manuals to find out what functions (functions, commands) are available in the development environment they are using, what their names are, and what their specifications are. This saves time and allows for efficient programming work.
[0035] The following supplementary note is further disclosed regarding the above embodiment and modified examples. (Supplementary Note 1) A program editing device (1) includes: an in-use development environment acquisition unit (21) that acquires development environment information currently in use; a multiple environment function name search unit (22) that uses a development environment function database (40) that stores a plurality of program development environments including at least one of a manufacturer, a model, a version number, and a programming language, and a collection of name information of library functions or instructions that have equivalent functions in two or more of the development environments, and searches from the name information for name information that has a function similar to name information that partially or completely matches a character string input from an input unit (10) and that can be used in the development environment currently in use; and a function candidate output unit (23) that outputs the name information that can be used in the development environment currently in use as a candidate for an input character string.
[0036] (Supplementary Note 2) The program editing device (1) of Supplementary Note 1 may be provided with a development environment function database update unit (24) that edits and updates the development environment function database (40).
[0037] (Supplementary Note 3) The program editing device (1) of Supplementary Note 1 or 2 may have a search condition input section (25) and may perform a search using at least one of the manufacturer, model, version number, and programming language as search conditions.
[0038] (Supplementary Note 4) In the program editing device (1) of any of Supplementary Notes 1 to 3, the content output by the function candidate output unit (23) may further output either a function summary or a parameter of the library function or command.
[0039] (Supplementary Note 5) The program editing method comprises: a currently used development environment acquisition step of acquiring development environment information currently in use; a multiple environment function name search step of searching, using a development environment function database (40) that stores a plurality of development environments for the program, including at least one of a manufacturer, a model, a version number, and a programming language, and a collection of name information of library functions or instructions that have equivalent functions in two or more of the development environments, from the name information for name information that has a function similar to name information whose name partially or completely matches a character string input from the input unit (10) and that can be used in the currently used development environment; and a function candidate output step of outputting the name information that can be used in the currently used development environment as a candidate for the character string to be input.
[0040] (Supplementary Note 6) The computer program causes one or more computer devices to function as a program editing device comprising: a current development environment acquisition unit that acquires information about the development environment of the program currently in use; a multiple environment function name search unit that uses a development environment function database that stores a plurality of development environments including at least one of manufacturer, model, version number, and programming language, and a collection of name information of library functions or instructions that have equivalent functions in two or more of the development environments, and searches from the name information for name information that has a similar function to name information that partially or completely matches a character string input from the input unit and that can be used in the development environment currently in use; and a function candidate output unit that outputs the name information that can be used in the development environment currently in use as a candidate for the character string to be input.
[0041] The program editing device of the present disclosure has been described in detail above. However, this disclosure not only discloses the program editing device, but also discloses a program editing method including steps performed by each unit of the program editing device, and a computer program that causes one or more computer devices to function as the program editing device. Furthermore, this disclosure is not limited to the individual embodiments and variations described above. Various additions, substitutions, modifications, partial deletions, etc. are possible to these embodiments, etc., within the scope of the gist of this disclosure, or within the scope of the spirit of this disclosure derived from the content of the claims and their equivalents.
[0042] REFERENCE SIGNS LIST 1 Program editing device 10 Input unit 20 Control unit 21 Development environment acquisition unit in use 22 Multiple environment function name search unit 23 Function candidate output unit 24 Development environment function database update unit 25 Search condition input unit 30 Output unit 40 Development environment function database
Claims
1. A program editing device comprising: a development environment in use acquisition unit that acquires information about the development environment of a program currently in use; a multi-environment function name search unit that uses a development environment function database that stores a plurality of development environments including at least one of manufacturer, model, version number, and programming language, and a collection of name information of library functions or instructions that have equivalent functions in two or more of the development environments, and searches from the name information for name information that has a function similar to name information that partially or completely matches a character string input from an input unit and that can be used in the development environment currently in use; and a function candidate output unit that outputs the name information that can be used in the development environment currently in use as a candidate for the character string to be input.
2. A program editing device according to claim 1, further comprising a development environment function database update section for editing and updating said development environment function database.
3. A program editing device according to claim 1 or 2, which has a search condition input section and searches using at least one of manufacturer, model, version number, and programming language as search conditions.
4. A program editing device according to any one of claims 1 to 3, wherein the content output by the function candidate output unit further includes outputting either a function summary or parameters of the library functions or instructions.
5. A program editing method comprising: a currently used development environment acquisition step for acquiring information about the development environment of a program currently in use; a multiple environment function name search step for searching, using a development environment function database that stores a plurality of development environments including at least one of manufacturers, models, versions, and programming languages, and a collection of name information of library functions or instructions that have equivalent functions in two or more of the development environments, for name information that has a similar function to name information whose name partially or completely matches a character string input from an input unit and that can be used in the currently used development environment; and a function candidate output step for outputting the name information that can be used in the currently used development environment as a candidate for the character string to be input.
6. A computer program for causing one or more computer devices to function as a program editing device comprising: a development environment acquisition unit in use that acquires information about the development environment of the program currently in use; a development environment function database that stores a collection of name information for multiple development environments, including at least one of the manufacturer, model, version number, and programming language, and name information for library functions or commands that have equivalent functions in two or more of the development environments, and a multiple environment function name search unit that searches among the name information for name information that has a function similar to name information that partially or completely matches a string entered from an input unit and that can be used in the development environment currently in use; and a function candidate output unit that outputs the name information that can be used in the development environment currently in use as a candidate for the string to be entered.
Citation Information
Patent Citations
Program editing device
JP1994230952A
Application program editing device
JP1995281879A
Method and device for input support of program
JP2004259084A
Machine tool, program editing method, and control program
JP2015207147A