Engineering tool

The engineering tool automates the import order calculation based on reference relationships within the engineering tool, enhancing the efficiency of control program reuse in plant control systems by ensuring correct import sequences, thus addressing inefficiencies in existing manual processes.

WO2024236936A1PCT designated stage expired Publication Date: 2024-11-21KK TOSHIBA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2024/014040
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-18
Filing Date
2024-04-05
Publication Date
2024-11-21

AI Technical Summary

Technical Problem

In plant control systems, reusing control programs is inefficient due to the need for manual investigation of reference relationships between components, leading to time-consuming import and export processes, especially when dealing with large-scale programs.

Method used

An engineering tool with an import unit that automatically determines the import order based on reference relationships between structures, functions, and programs, ensuring that referencing components are imported after the referenced ones, streamlining the import process.

Benefits of technology

This solution reduces the burden on system programmers by automating the import order calculation, improving the efficiency of control program development and reducing errors associated with incorrect import orders.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024014040_21112024_PF_FP_ABST
    Figure JP2024014040_21112024_PF_FP_ABST
Patent Text Reader

Abstract

The present invention improves the efficiency of importing of a control program. This engineering tool comprises an importing unit that imports a plurality of structures each having at least one variable or sequence. The importing unit determines an importing order so as to import a structure that refers to other structures among the plurality of structures, after the other structures, and imports the plurality of structures in the determined importing order.
Need to check novelty before this filing date? Find Prior Art

Description

Engineering Tools

[0001] The present embodiment relates to an engineering tool.

[0002] In general, in a plant control system, a system programmer creates a control program for a control device, tests and adjusts it, and then provides it to the plant operator. When a similar plant control system is newly constructed, the system programmer may reuse some or all of the components of the control program. Specifically, the system programmer exports some or all of the components of the control program from the original plant control system, and then imports a control program created by reusing some or all of the exported components into the newly constructed similar plant control system.

[0003] International Publication No. 2018 / 011959 Special Publication No. 2005-537538 International Publication No. 2015 / 190007

[0004] The components of a control program include programs, function blocks, functions, and user data types. These have a reference relationship. For example, a function block may refer to another function block. When importing a control program, the system programmer must strictly follow the import order based on this reference relationship.

[0005] Furthermore, when exporting the components of a control program, the system programmer must select the necessary programs, function blocks, functions, and user data types. Therefore, when exporting the components of a control program, the system programmer must investigate in advance the programs, function blocks, functions, and user data types required for the control program configuration. Furthermore, if a function block references another function block, this investigation takes time.

[0006] When exporting or importing a large number of control programs, there is a problem in that work efficiency deteriorates because it takes time to determine the order of import and to investigate the components that need to be exported.

[0007] Therefore, this embodiment provides an engineering tool that can improve the efficiency of importing control programs.

[0008] The engineering tool according to this embodiment includes an import unit that imports a plurality of structures, each of which has at least one variable or array, and the import unit determines an import order such that a structure that references another structure among the plurality of structures is imported after the other structures, and imports the plurality of structures in the determined import order.

[0009] 1 is a system configuration diagram showing an example of an engineering tool and its peripheral units according to an embodiment of the present disclosure; FIG. 2 is a diagram schematically showing a database configuration; FIG. 3 is a block diagram showing a detailed configuration of an operation screen and a database; FIG. 4 is an example configuration of a library database; FIG. 5 is an example configuration of a data type database; FIG. 6 is an example configuration of a user data type member database; FIG. 7 is an example configuration of a variable database; FIG. 8 is an example configuration of a program code database; FIG. 9 is a ladder diagram showing functions; FIG. 10 is a ladder diagram showing function blocks; FIG. 11 is a ladder diagram showing a program; FIG. 12 is a diagram showing an image of starting an import unit; FIG. 13 is a diagram showing an example screen of the import unit; FIG. 14 is a diagram showing an import order in the initial state of a group of files to be imported; FIG. 15 is a diagram showing an import order according to the reference relationships of each file to be imported; FIG. 16 is a flowchart of import order calculation according to an embodiment of the present disclosure; FIG. 17 is an example of a message window output by the import unit indicating that import is not possible; FIG. 18 is a flowchart of overall import according to an embodiment of the present disclosure; FIG. 19 is a flowchart of import order calculation for structures; FIG. 19 is a flowchart of import order calculation for functions and function blocks; FIG. 19 is a flowchart of import processing;

[0010] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.

[0011] 1 is a system configuration diagram showing an example of an engineering tool 1 and its peripherals according to an embodiment of the present disclosure. The engineering tool 1 shown in FIG. 1 is disposed in a computer 2, for example.

[0012] The engineering tool 1 is used, for example, to develop a control program. The control program developed with the engineering tool 1 is applied to a plant control device or the like. The engineering tool 1 has an operation screen 3 and a database (storage unit) 4. The operation screen 3 provides a system programmer (also called a user) with operation functions for the engineering tool 1. This specification describes an example in which the operation screen 3 is configured by a GUI (Graphical User Interface), but is not limited to this. The operation screen 3 may also be configured by a CUI (Character User Interface), etc. The database 4 stores the control program created via the operation screen 3.

[0013] The engineering tool 1 also has a function of importing and exporting a control program. The engineering tool 1 can export a control program as a file 5 in the computer 2. Exporting a control program means exporting some or all of the components that make up the control program. The engineering tool 1 can also import some or all of the components that make up the control program from any file 5 in the computer 2.

[0014] The computer 2 has peripheral devices such as a keyboard 21, a mouse 22, and a display device 23. The system programmer can operate the operation screen 3 using the keyboard 21 and the mouse 22. The system programmer can also check the operation screen 3 on the display device 23.

[0015] 2 is a diagram schematically illustrating the configuration of the database 4. The system 6 shown in FIG. 2 has a library 61, a network 62, and a station 63. The library 61 stores one or more control programs. The library 61 has multiple user libraries W1 to WX created for each user, and multiple standard libraries B1 to BX that can be shared among users.

[0016] Each of the multiple user libraries (and multiple standard libraries) has a control program consisting of user data types, functions, function blocks, and programs. For example, user library W1 has a control program G1 consisting of user data type D1, function D2, function block D3, and program D4. Note that a control program may have multiple user data types, functions, function blocks, or programs. Each of the multiple user libraries also has user information.

[0017] A user data type has one or more variables (variable members) and is also called a structure. User data types are used in programs, function blocks, and functions. User data types may also contain other user data types as variable members.

[0018] A function has no history. A function can be called from a program or a function block. A function can also call other functions.

[0019] A function block is a function with history. A function block is called from a program. A function block can also call other function blocks.

[0020] The program specifies the operation procedure for causing the control device or the like to perform a predetermined operation.

[0021] As mentioned above, programs, function blocks, and functions may call other function blocks or functions. Also, programs, function blocks, functions, and user data types may contain other user data types internally. A relationship in which one component calls or contains another component internally is also called a reference relationship. For example, when a program calls a function block, it is said that the program is referencing the function block.

[0022] The network 62 has connection information between a plurality of control devices to which the control program is applied, or connection information between the control devices and other devices.

[0023] The station 63 has hardware information of the control device to which the control program is applied, such as the model name of the control device or the execution period of the control program.

[0024] 3 is a block diagram showing the detailed configuration of the operation screen 3 and the database 4. The operation screen 3 has an export section 31 and an import section 32.

[0025] The export unit 31 acquires some or all of the components of one or more control programs from the database 4, and outputs one or more export target files 51 (files 5) each containing the acquired components.

[0026] The import unit 32 reads one or more import target files 52 (files 5) as one or more control programs to be imported. Each import target file 52 contains one or more components of the control program. The import unit 32 writes (imports) the components contained in the read import target files 52 (files 5) into the database 4. As a result, the import unit 32 writes one or more control programs into the database 4.

[0027] Note that some or all of the import target files 52 that are to be imported by the import unit 32 may be the export target files 51 output by the export unit 31. In this case, the user can select the export target files 51 output by the export unit 31 as some or all of the import target files 52.

[0028] 2 . The product manager 33 acquires information about the system 6 from the database 4 and writes changes to the system 6 to the database 4. The operation screen 3 may also have a program editor 34 that edits a control program. The program editor 34 acquires a control program from the database 4 and writes changes to the control program to the database 4.

[0029] The database 4 manages the information of the library 61 in the system 6 by dividing it into library data, data type data, data type member data, variable data, and program code data. Details of each data and its correspondence with the control program, etc., shown in Figure 2 will be described later. The library data, data type data, data type member data, variable data, and program code data are stored in a library database 41, a data type database 42, a user data type member database 43, a variable database 44, and a program code database 45, respectively.

[0030] In addition to the above, the database 4 may have a database for storing information on the network 62 and information on the station 63, respectively.

[0031] 4 shows an example of the configuration of the library database 41. The library database 41 stores a collection of library data. The library data in the library database 41 includes a relation, a library name, a library type, security manager information, and member information.

[0032] A relation is a number that is uniquely assigned to each library data in order to link each library data with other databases.

[0033] The library name is a name that indicates each library. The library name is set by, for example, the user. The library type indicates the type of library. The library type includes, for example, a user library and a standard library.

[0034] The library data includes the security administrator's username and password as security administrator information. The security administrator is a user in charge of managing the security of the library. The security administrator can designate other users as members and grant them access to the library. The security administrator can also set an access level for each member. Access levels include, for example, a level that denies access, a level that allows only library use, a level that allows viewing and use of the library, and a level that allows editing, viewing, and use of the library. The library data also includes the member's username, password, and access level as member information. Note that the security administrator information and member information are omitted from Figure 4.

[0035] The library database 41 in Fig. 4 has registered as library data the user library (work 1) W1 and standard library (standard 1) B1 shown in Fig. 2. Fig. 4 also shows an example in which a user library (work 2) W2 and a standard library (standard 2) B2 are registered. The relations of the user libraries W1 and W2 and the standard libraries B1 and B2 are assigned the numbers 1, 2, 3, and 4, respectively.

[0036] 5 shows an example of the configuration of the data type database 42. The data type database 42 stores a collection of data related to data types (data type data). Each data type data in the data type database 42 has a relation, a data type name, a data type, a comment, and a relation with a library.

[0037] The data type name is a name indicating each data type. The data type name is set by, for example, the user. The data type indicates the type of data type. Data types include STRUCT, which indicates a user data type, FUNCTION_BLOCK, which indicates a function block, FUNCTION, which indicates a function, and PROGRAM, which indicates a program. The comment is an explanatory text for each data type, and is set by, for example, the user. The relationship with the library links the library data in FIG. 4 with the data type data in FIG. 5.

[0038] 5, a user data type (STR_HZZ) D1, a function (USER_FUN) D2, a function block (USER_FBK) D3, and a program (MS000) D4 are registered, with relations assigned 1, 2, 3, and 4. The relations between the user data type D1, function D2, function block D3, and program D4 and the library are all assigned 1. In other words, the user data type D1, function D2, function block D3, and program D4 are linked to the user library W1 in FIG.

[0039] 6 shows an example of the configuration of the user data type member database 43. The user data type member database 43 stores a collection of user data type member data. Each user data type member data in the user data type member database 43 has a relation, a member name, a data type, a comment, and a relation with the user data type. The member name is a name indicating each member and is set by the user, for example.

[0040] 6, member (INT_ARY) M1 and member (BOOL_ARY) M2 are registered, with relations assigned 1 and 2. Since 1 is specified for the relations between member M1 and member M2 and the user data type, member M1 and member M2 are linked to user data type D1 in FIG. 5. In other words, user data type D1 references members M1 and M2. Note that, as mentioned above, a user data type may contain other user data types as members.

[0041] 7 shows an example of the configuration of the variable database 44. The variable database 44 stores a collection of variable data. Each variable data in the variable database 44 has a relation, a variable name, a data type, and a relation with the data type in the data type database 42. The variable name is a name indicating each variable and is set, for example, by the user. For the data type in FIG. 7, a standard data type of the engineering tool 1 (for example, BOOL) or data type data stored in the data type database 42 is specified.

[0042] 7, variables (INPUT) V1, (USER_FUN) V2, (INPUT) V3, (OUTPUT) V4, (ABC) V5, and (USER_FBK_1) V6 are registered, with relations assigned 1, 2, 3, 4, 5, and 6. Regarding the relationships with the data types in the data type database 42, variables V1 and V2 are assigned a value of 2, variables V3 and V4 are assigned a value of 3, and variables V5 and V6 are assigned a value of 4. That is, variables V1 and V22 are linked to function D2, variables V3 and V4 are linked to function block D3, and variables V5 and V6 are linked to program D4.

[0043] Furthermore, since the data type of variable V5 is specified as STR_HZZ, variable V5 references user data type D1. Similarly, the data type of variable V6 is specified as USER_FBK, and variable V6 references function block D3. In other words, program D4 linked to variables V5 and V6 references user data type D1 and function block D3.

[0044] 8 shows an example of the configuration of the program code database 45. The program code database 45 stores a collection of program codes. These collections of program codes correspond to control programs. Each program code data stores the location of each variable, function, and function block within a program, function block, or function. Each program code data has a relationship with the row, column, function / function block name, variable name, and data type.

[0045] The rows and columns indicate the location of each variable and function. The function / function block names link the data type data in the data type database 42 to the program code data. The relationship between the variable name and the data type in the data type database 42 links the variable data in the variable database 44 to the program code data.

[0046] 8, program code data C1 to C10 are registered, with relations assigned 1 to 10. Program codes C1 and C2 indicate that in function D2, variable V1 is placed at row 0, column 0, and variable V2 is placed at row 0, column 1. Program codes C3 and C4 indicate that in function block D3, variable V3 is placed at row 0, column 0, and variable V4 is placed at row 0, column 1.

[0047] Program codes C5, C7, C8, and C10 all indicate the placement position of member M1 of variable V5 (user data type D1). Program codes C5, C7, C8, and C10 indicate that member M1 is placed at row 0, column 0, row 0, column 2, row 1, column 0, and row 1, column 2 in program D4, respectively. Program code C6 indicates that variable V6 (function block D3) is placed at row 0, column 1 in program D4.

[0048] Program code C9 indicates that function D2 is located in row 1, column 1 of program D4. That is, program D4 references function D2.

[0049] Fig. 9 is a ladder diagram showing function D2. The ladder diagram in Fig. 9 is generated by, for example, the program editor 34 based on the program code database 45, etc. Furthermore, changes made by the program editor 34 are reflected in the program code database 45, etc.

[0050] Column data (column 0, column 1) is arranged horizontally in Fig. 9, and row data (row 0) is arranged vertically. In function D2 in Fig. 9, variable V1 is arranged at row 0, column 0, and variable V2 is arranged at row 0, column 1, as shown in Fig. 8.

[0051] Fig. 10 is a ladder diagram showing function block D3. In function block D3 in Fig. 10, variable V3 is placed at row 0, column 0, and variable V4 is placed at row 0, column 1, as shown in Fig. 8.

[0052] Fig. 11 is a ladder diagram showing program D4. In program D4 in Fig. 11, as shown in Fig. 8, member M1 of variable V5 is placed at row 0 column 0, row 0 column 2, row 1 column 0, and row 1 column 2. Variable V6 (function block D3) is placed at row 0 column 1. Variable V3 is assigned to the input section of variable V6, and variable V4 is assigned to the output section. Function D2 is placed at row 1 column 1. Variable V1 is assigned to the input section of function D2.

[0053] As described above, the user data types, function blocks, functions, and programs that make up a control program are registered in the database 4. The import unit 32 can store the control program acquired from the import target file 52 in the database 4 in the formats shown in FIGS.

[0054] The export unit 31 can also obtain control programs from the database 4 and output them as export target files 51. In the example databases shown in FIGS. 5 to 8 , a user data type D1 file (a file containing data indicated by D1 in the database of FIG. 6 ), a function D2 file (a file containing data indicated by D2 in the databases of FIGS. 7 and 8 ), a function block D3 file (a file containing data indicated by D3 in the databases of FIGS. 7 and 8 ), and a program D4 file (a file containing data indicated by D4 in the databases of FIGS. 7 and 8 ) can be output as export target files 51. While the above example shows one file being exported for each data type, multiple user data type files may be exported if multiple user data types are defined in the data type database of FIG. 5 . Similarly, multiple files may be exported for functions, function blocks, and programs if multiple functions, function blocks, and programs are defined.

[0055] 12 is a diagram showing an image of starting the import unit 32. The system programmer can call up the import unit 32 from, for example, the product manager 33. For example, the system programmer can call up the import unit 32 by clicking Import from the menu in FIG.

[0056] FIG. 13 shows an example of the screen of the import unit 32. The system programmer can search for files 5 using, for example, Explorer. The system programmer selects one or more files 5 from the search results and designates them as import target files 52. The import unit 32 imports data (structures, functions, function blocks, programs, etc.) from the designated import target files 52. The files designated as import target files 52 may be files exported from any control program, files created separately by a user (e.g., a system programmer) and stored in the database 4 or another storage unit, or both. The import destination library is designated in advance. One or more data items may have been imported into the import destination library in advance. In other words, when the import operation is performed in multiple steps, the data (structures, functions, function blocks, programs, etc.) imported up to the previous operation may be stored in the designated library.

[0057] 14A is a diagram showing the initial import order of a group of import target files 52 designated as import targets. In the initial import order, the import order of each import target file 52 is the order designated by, for example, a system programmer. FIG. 14A shows the import target files 52a, 52b, 52c, 52d, 52e, 52f, 52g, and 52h in the initial import order.

[0058] To successfully import each import target file 52, the order in which the import target files 52 are imported must be determined based on the reference relationships between the import target files 52, more specifically, the reference relationships between the data (structures, functions, function blocks, programs, etc.) contained in each import target file 52. For example, the program stored in the import target file (MS000.PRG) 52a references the structure stored in the import target file (STR1.TYP) 52c and the function stored in the import target file (USR_FUN.FUN) 52g. Therefore, the import unit 32 must import the import target files 52c and 52g before importing the import target file 52a. Note that importing an import target file 52 refers to importing the data (structures, functions, function blocks, programs, etc.) stored in the import target file 52.

[0059] However, the import order in Fig. 14A is not an order that corresponds to the reference relationships between the import target files 52. In the import order in Fig. 14A, the import target files 52c and 52g are imported after the import target file 52a. Therefore, if import is performed in the import order in Fig. 14A, the import of the import target file 52a will fail.

[0060] Similarly, in FIG. 14A , the structure stored in import target file 52c references the structure stored in import target file (STR2.TYP) 52d. Furthermore, the function stored in import target file 52g references the structure stored in import target file 52d. Furthermore, the function block stored in import target file (USR_FBK.FBK) 52f references the function stored in import target file 52g. In other words, with the import order shown in FIG. 14A , the import of import target files 52c and 52f would also fail. Note that import target file (MS001.PRG) 52b, import target file (STR3.TYP) 52e, and import target file (USR_FUN1.FUN) 52h have no reference relationships with other files.

[0061] As described above, if the import order of the import target files 52 is not in accordance with the reference relationships of the import target files 52, the import unit 32 will fail to import some of the import target files 52.

[0062] Conventionally, in order for a system programmer to correctly specify the import order, it was necessary to investigate the structures stored in each import target file 52 and correctly understand all reference relationships. In the case of a large-scale control program, investigating and calculating the import order took time, which increased the burden on the system programmer and reduced the efficiency of control program development.

[0063] 14B is a diagram showing an example in which the import order of the import target files 52 is determined based on the reference relationships between the import target files 52. Even when the import order of FIG. 14A is specified, the import unit 32 according to the embodiment of the present disclosure can automatically calculate the correct import order as shown in FIG. 14B based on the reference relationships between the import target files 52. In FIG. 14B, the import target files 52d, 52c, 52g, 52f, 52a, 52e, 52h, and 52b are imported in this order.

[0064] In the following description, the structures and the like stored in the import target files 52d, 52c, 52g, 52f, and 52a will be referred to as the first structure, the second structure, the first function, the second function, and the program, respectively. In FIG. 14B , the second structure that references the first structure is imported after the first structure. The first function that references the first structure is imported after the first structure. The second function that references the first function is imported after the first function. The program that references the first function is imported after the first function.

[0065] 14B illustrates an example in which the first function is a function and the second function is a function block that references the first function, but this embodiment is not limited to this example. For example, the first function may be a function and the second function may be a function that references the first function. Alternatively, the first function may be a function block and the second function may be a function block that references the first function. In either case, the first function and the second function are imported in this order.

[0066] As described above, the first function that references the first structure is imported after the first structure, and the program that references the first function is imported after the first function. As described above, the first function is a function in this example, but it may also be a function block.

[0067] As described above, in Figure 14B, the import order is set so that the referencing structure, etc. comes after the referenced structure, etc., so if import is performed in the import order of Figure 14B, the import of any of the import target files 52a to 52h will not fail.

[0068] As described above, the engineering tool 1 automatically calculates the import order based on the reference relationships between the files to be imported. This eliminates the need for the system programmer to specify the import order, reducing the burden on the system programmer and improving the development efficiency of the control program.

[0069] 15 is a flowchart of import order calculation according to an embodiment of the present disclosure. The import unit 32 calculates the import order shown in FIG. 14B according to the flowchart of FIG.

[0070] The import unit 32 processes the multiple import target files 52 one by one, for example, in the order specified by the system programmer. First, the import unit 32 determines whether or not there is a structure or the like (hereinafter referred to as data) referenced by one of the import target files 52 to be processed (step S1).

[0071] If there is no data referenced by the target import file 52, the import unit 32 stores the import order as is (step S2). For example, the import unit 32 determines the import order to be the value next to the last import order of the files for which the import order has currently been determined, and stores the determined import order value. The import unit 32 determines whether all import target files have been processed (step S3), and if all have been processed, ends the import order calculation process. If not, the import unit 32 performs processing on the next import target file 52 to be processed, starting from step S1.

[0072] In step S1, if there is data referenced by the target import file 52, the import unit 32 determines whether there is data to be referenced in another import file 52 (step S4).

[0073] If there is data to be referenced in other import target files 52, the import unit 32 organizes and stores the import order (step S5). Specifically, the import unit 32 organizes (rearranges) the import order so that the import target file 52 having the data to be referenced is imported before the target import target file 52.

[0074] The import unit 32 determines whether there is any data referenced by the target import file 52 or the import file 52 having the data to be referenced (step S6). If there is any data referenced by either the target import file 52 or the import file 52 having the data to be referenced, the determination in step S4 is performed again. If there is no data referenced by either the target import file 52 or the import file 52 having the data to be referenced, the determination in step S3 is performed.

[0075] If there is no data to be referenced in the other import target files 52 in step S4, the import unit 32 determines whether there is data to be referenced in the control program in the import destination library (hereinafter referred to as the existing control program) (step S7). The existing control program includes, for example, one or more pieces of data that were imported into the import destination library before the current import operation, and is stored in the database 4.

[0076] If an existing control program contains data to be referenced, this data does not need to be newly imported. Furthermore, since the target import target file 52 can be imported, the import unit 32 stores the import order of the target import target file 52 in step S5. Thereafter, the process is the same as when it is determined in step S4 that another import target file 52 contains data to be referenced.

[0077] If the existing control program does not contain the data to be referenced, the import unit 32 determines that the target import file 52 cannot be imported and stores information indicating that the file cannot be imported (step S8). In this case, the import unit 32 notifies the system engineer of this fact, for example, in a message window. Figure 16 shows an example of a message window output by the import unit 32 indicating that the file cannot be imported. Figure 16 displays, for example, the data type name (Datatype) of the data to be referenced that could not be found in other import files 52 or existing control programs.

[0078] After it is stored in step S8 that the import target file 52 cannot be imported, the determination in step S3 is performed.

[0079] As described above, the import unit 32 can calculate the import order in FIG. 14B by executing the process of the flowchart in FIG. 15 .

[0080] 15, data to be referenced is searched for in an existing control program. That is, the import unit 32 calculates the import order based on the data in the existing control program. Conventionally, if the import target file 52 does not contain a file storing data to be referenced, it was necessary to check in advance whether the data to be referenced exists in the existing control program (whether it has already been imported). In the embodiment of the present disclosure, as described above, data to be referenced is automatically searched for in the existing control program, so there is no need to check the existing control program.

[0081] Furthermore, the import unit 32 according to an embodiment of the present disclosure can also improve the efficiency of export work. When developing a new control program by reusing a control program, a system programmer may use the export unit 31 to export data required for the target control program from the source control program as a file from the engineering tool 1. The system programmer then imports the exported file into the new control program using the import unit 32. Even in such a situation, the import unit 32 calculates the import order based on the data in the existing control program, thereby eliminating or reducing the need to check the reference relationships of the data to be exported and the data to be referenced in the existing control program, which were previously required. In other words, the import unit 32 can improve the efficiency of export work.

[0082] Hereinafter, a more specific method for calculating the import order will be described for each of the structures, functions, function blocks, and programs that make up the control program. Note that the flowchart in FIG. 15 may also be applied to data other than structures, functions, function blocks, and programs.

[0083] Fig. 17 is a flowchart of the overall import process according to an embodiment of the present disclosure. The import unit 32 starts the import process shown in Fig. 17 when a system programmer designates multiple files 52 to be imported and presses the import button on the screen shown in Fig. 13, for example.

[0084] The import unit 32 first calculates the import order of structure files (structure import order) among the multiple import target files 52 (step S11). Next, the import unit 32 calculates the import order of function and function block files (function and function block import order) among the multiple import target files 52 (step S12). Next, the import unit 32 calculates the import order of program files (program import order) among the multiple import target files 52 (step S13). Finally, the import unit 32 imports the multiple import target files 52 based on the import order calculated in steps S11 to S13. That is, the import unit 32 imports the data (structures, functions, function blocks, programs) included in the multiple import target files 52.

[0085] 18 is a flowchart showing the process of calculating the import order of structures. In step S11 of FIG. 17, the import unit 32 executes the process of the flowchart of FIG.

[0086] The import unit 32 determines whether any of the files to be imported 52 contains a structure (step S21). The import unit 32 can determine whether the file to be imported 52 contains a structure by, for example, the file extension. For example, if the file to be imported 52 has the extension *.TYP, the file contains a structure.

[0087] If there is no file that stores a structure among the files to be imported 52, the import unit 32 ends the processing of FIG.

[0088] If any of the files to be imported 52 contains a structure, the import unit 32 processes the files to be imported 52 containing the structure one by one. As described above, a structure may refer to another structure. Therefore, the import unit 32 determines whether a structure in the file to be imported 52 to be processed (hereinafter, the structure to be processed) refers to another structure (step S22).

[0089] In step S22, similar to step S1 in Fig. 15, if the structure to be processed does not reference other structures, the import unit 32 stores the import order of the files of the structure to be processed (step S23). Next, the import unit 32 determines whether all files containing structures among the multiple files to be imported 52 have been processed (step S24). If all files containing structures have been processed, the import unit 32 ends the processing of Fig. 18. If there are files that have not been processed, the import unit 32 performs the determination of step S22 for the next structure.

[0090] 15, the import unit 32 determines whether or not there is a file including the other referencing structure among the files to be imported 52 (step S25), and if so, organizes and stores the import order (step S26). The import unit 32 determines whether or not the structure to be processed and the referencing structure further refer to other structures (step S27), and if so, performs the determination of step S25 again, and if not, proceeds to the determination of step S24.

[0091] If the file containing the referenced structure is not present in the import target file 52, the import unit 32 determines whether the referenced structure is present in an existing control program (import destination library) (step S28), and if present, proceeds to processing in step S26; if not present, it stores a message that the import is not possible (step S29) and proceeds to the determination in step S24.

[0092] 19 is a flowchart showing how to calculate the import order of functions (hereinafter referred to as FUNs) and function blocks (hereinafter referred to as FBKs). After the process of FIG. 18 is completed, the import unit 32 executes the process of the flowchart of FIG. 19 in step S12 of FIG. 17.

[0093] The import unit 32 determines whether any of the files 52 to be imported contains a file containing FUN and FBK (step S31), and if not, ends the processing of Fig. 19. For example, if the file 52 to be imported has an extension of *.FUN, the file contains FUN. If the file 52 to be imported has an extension of *.FBK, the file contains FBK.

[0094] As described above, FUNs and FBKs may refer to structures, other FUNs, or other FBKs. Therefore, the import unit 32 determines whether the FUN or FBK being processed references a structure (step S32). If the FUN or FBK being processed references a structure, the import unit 32 calculates the import order of the structure's files (step S33).

[0095] Specifically, in step S33, the import unit 32 performs the processes of steps S25 to S29 in Fig. 18. If, in step S27 in Fig. 18, the FUN or FBK to be processed and the referencing structure do not have any further referencing structures, or if information indicating that import is not possible is stored in step S29, the import unit 32 ends the process of step S33 in Fig. 19.

[0096] In the process of step S33, the import unit 32 determines whether the required structure file can be imported (step S34). Specifically, if information indicating that import is not possible is stored in step S29 of FIG. 18, it is not possible to import some or all of the required structure files. If it is not possible to import the structure files, it is also not possible to import the FUN or FBK file to be processed. At this time, information indicating that import is not possible may be stored for the FUN or FBK file to be processed.

[0097] If it is determined in step S27 of FIG. 18 that there are no further referenced structures, all files of structures that need to be imported can be imported.

[0098] If the FUN or FBK to be processed does not reference a structure in step S32, or if it is determined in step S34 that the structure can be imported, the import unit 32 determines whether the FUN or FBK to be processed references another FUN or FBK (step S35).

[0099] If the FUN or FBK to be processed does not refer to other FUNs or FBKs, the import unit 32 stores the import order of the FUN or FBK to be processed (step S36). This process may be the same as step S23 in FIG. 18.

[0100] After the process of step S36, or if it is determined in step S34 that importing the structure is not possible, the import unit 32 determines whether all FUN or FBK files have been processed (step S37). If all FUN or FBK files have been processed, the import unit 32 ends the process of Fig. 19; if not, the import unit 32 proceeds to the determination of step S32 for the next FUN or FBK file.

[0101] In step S35, if the FUN or FBK to be processed references another FUN or FBK, the import unit 32 determines whether the file of the referenced FUN or FBK is included in the files to be imported 52 (step S38).

[0102] If the referenced FUN or FBK file is among the files 52 to be imported, the import unit 32 determines whether the FUN or FBK further references a structure (step S39). If the referenced FUN or FBK further references a structure, the import unit 32 calculates the import order of the structure files, as in step S33 (step S40). In the processing of step S40, the import unit 32 determines whether the required structure file can be imported (step S41). If the structure file cannot be imported, the import unit 32 stores information that the target FUN or FBK file cannot be imported, and proceeds to the determination of step S37.

[0103] If the FUN or FBK referenced in step S39 does not further reference a structure, or if it is determined in step S40 that the structure file can be imported, the import unit 32 organizes and stores the import order (step S42) and determines whether there is a further referenced FUN or FBK (step S43). If there is a further referenced FUN or FBK in step S43, the import unit 32 proceeds to the determination in step S38, and if there is not, the import unit 32 proceeds to the determination in step S37.

[0104] In step S38, if the referenced FUN or FBK file is not in the import target file 52, the import unit 32 determines whether the referenced FUN or FBK is in an existing control program (step S44), and if so, proceeds to processing in step S39; if not, stores information indicating that import is not possible (step S45), and proceeds to the determination in step S37.

[0105] Fig. 20 is a flowchart showing the calculation of the import order of programs. After the process of Fig. 19 is completed, the import unit 32 executes the process of the flowchart of Fig. 20 in step S13 of Fig. 17.

[0106] The import unit 32 determines whether any of the files to be imported 52 contains a program (step S51), and if not, ends the processing in Fig. 20. For example, if the file to be imported 52 has the extension *.PRG, the file contains a program.

[0107] As described above, a program may reference a structure, FUN, or FBK. Therefore, the import unit 32 determines whether the program to be processed references a structure (step S52). If the program to be processed references a structure, the import unit 32 calculates the import order of the structures (step S53), similar to step S33 in FIG. 19. In the process of step S53, the import unit 32 determines whether the file of the required structure can be imported (step S54).

[0108] If the program to be processed does not reference a structure in step S52, or if it is determined in step S54 that the structure file can be imported, the import unit 32 determines whether the program to be processed references FUN or FBK (step S55). If it is determined in step S54 that the structure file cannot be imported, the file of the program to be processed cannot be imported.

[0109] If the program to be processed references a FUN or FBK in step S55, the import unit 32 calculates the import order of the FUN or FBK files (step S56). Specifically, the import unit 32 performs the processes of steps S35 to S43 in Fig. 19. If the program to be processed and the referenced FUN or FBK do not reference any other FUNs or FBKs in step S43 in Fig. 19, or if information indicating that the file of the program to be processed cannot be imported is stored in step S45, or if it is determined in step S41 that the structure referenced by the FUN or FBK cannot be imported, the import unit 32 ends the process of step S56 in Fig. 20.

[0110] After step S56, the import unit 32 determines whether the FUN or FBK file can be imported (step S57). Specifically, if it is stored in step S45 that the file of the program to be processed cannot be imported, or if it is determined in step S41 that the file of the structure referenced by FUN or FBK cannot be imported, the import of the FUN or FBK file is not possible. In other words, if it is determined that the import of the FUN or FBK file is not possible, the file of the program to be processed cannot be imported.

[0111] If it is determined in step S43 of FIG. 19 that there are no further referenced FUN or FBK files, all FUN or FBK files that need to be imported can be imported.

[0112] If the program to be processed does not reference FUN or FBK in step S55, or if it is determined in step S57 that FUN or FBK can be imported, the import unit 32 stores the import order of the program files (step S58).

[0113] If the import order of the program files is stored in step S58, if it is determined in step S54 that importing of the structure file is impossible, or if it is determined in step S57 that importing of the FUN or FBK file is impossible, the import unit 32 determines whether all of the program files have been processed (step S59). If all of the program files have been processed, the import unit 32 ends the processing of Fig. 20, and if not, proceeds to the determination of step S52 for the next program file.

[0114] Fig. 21 is a flowchart of the import process. After the process of Fig. 20 is completed, the import unit 32 executes the process of the flowchart of Fig. 21 in step S14 of Fig. 17.

[0115] The import unit 32 processes the import target files 52 one by one in the import order of the import target files sorted in steps S11 to S13 of Fig. 17. First, the import unit 32 determines whether the import target file 52 to be processed can be imported (step S61).

[0116] Import is not possible for the import target file 52 for which import is not possible in step S29 of Fig. 18, step S45 of Fig. 19, etc. If it is determined in step S61 that the file is not importable, an error dialog (for example, the dialog in Fig. 16) is displayed (step S62), and the processing in Fig. 21 is interrupted.

[0117] If it is not determined in step S61 that import is impossible, i.e., if it is determined that import is possible, the import target file 52 to be processed is imported (step S63). Subsequently, it is determined whether all of the import target files 52 have been processed (step S64). If all of the import target files 52 have not been processed, the import unit 32 performs the determination in step S61 for the next import target file 52 to be processed. If all of the import target files 52 have been processed in step S64, or if the processing of FIG. 21 is interrupted in step S62, the processing of FIG. 21 ends, and the processing of FIG. 17 also ends.

[0118] In this way, the engineering tool 1 according to the embodiment of the present disclosure automatically calculates the import order based on the reference relationships between each piece of data (structures, functions, function blocks, programs, etc.) in the control program and imports the import target files in the optimal order. This allows the system programmer to import the import target files without having to correctly specify the import order of the import target files. Furthermore, the engineering tool 1 according to the embodiment of the present disclosure can eliminate or reduce the need for the system programmer to investigate the reference relationships between the import target files. Furthermore, if the data to be imported does not exist in the import target files, the engineering tool 1 searches for the data to be imported from an existing control program, thereby reducing the time and effort required by the system programmer to investigate whether the existing control program contains data to be imported. In other words, the engineering tool 1 can improve the efficiency of importing and exporting control programs.

[0119] The present invention is not limited to the above-described embodiments, and the components can be modified and embodied in practice without departing from the spirit of the invention. Furthermore, various inventions can be created by appropriately combining multiple components disclosed in the above-described embodiments. For example, configurations in which some components are omitted from all the components shown in each embodiment may also be considered. Furthermore, components described in different embodiments may be appropriately combined.

[0120] [Additional Notes] [Item 1] An engineering tool comprising: an import unit that imports a plurality of structures, each having at least one variable or array, wherein the import unit determines an import order such that a structure that references other structures among the plurality of structures is imported after the other structures, and imports the plurality of structures in the determined import order. [Item 2] The engineering tool according to Item 1, wherein the import unit imports a plurality of functions, each configured of a function or a function block, wherein the import unit determines an import order for the plurality of functions such that a function that references other functions among the plurality of functions is imported after the other functions, and imports the plurality of functions in the determined import order. [Item 3] The engineering tool according to Item 2, wherein the import unit imports a program that references at least one of the functions, wherein the import unit determines an import order for the program and the functions such that the program is imported after functions referenced by the program, and imports the program and the functions in the determined import order. [Item 4] The engineering tool according to Item 3, wherein the import unit imports the program from an import target file that defines the program among a plurality of import target files that respectively define the function and the program, and when a file that defines a function referenced by the program is not among the plurality of import target files, the import unit determines whether the function has already been imported into the import destination library, and if the function has already been imported, determines an import order for the program and the function, and if the function has not already been imported, determines that importing the program is not possible.[Item 5] The engineering tool according to any one of Items 2 to 4, wherein the import unit imports the plurality of functions from a plurality of import target files each defining the plurality of functions, and when an import target file defining a function referenced by one of the plurality of functions is not included in the plurality of import target files, the import unit determines whether the referenced function has already been imported into an import destination library, and if the referenced function has already been imported, determines an import order for the plurality of functions, and if the referenced function has not already been imported, determines that the function referencing the referenced function cannot be imported. [Item 6] The engineering tool according to any one of Items 1 to 4, wherein the import unit imports the plurality of structures from a plurality of import target files each defining the plurality of structures, and when an import target file defining a structure referenced by one of the plurality of structures is not included in the plurality of import target files, the import unit determines whether the referenced structure has already been imported into an import destination library, and if the referenced structure has already been imported, determines an import order for the plurality of structures, and if the referenced structure has not already been imported, determines that the structure referencing the referenced structure cannot be imported. [Item 7] The engineering tool according to Item 3 or 4, wherein a collection of the program, the plurality of functions, and the plurality of structures imported by the import unit constitutes a control program that controls a control device.

[0121] 1 Engineering tool, 2 Computer, 3 Operation screen, 4 Database, 5 File, 6 System, 21 Keyboard, 22 Mouse, 23 Display device, 31 Export unit, 32 Import unit, 33 Product manager, 34 Program editor, 41 Library database, 42 Data type database, 43 User data type member database, 44 Variable database, 45 Program code database, 51 Export target file 52, 52a, 52b, 52c, 52d, 52e, 52f, 52g, 52h Import target file, 61 Library, 62 Network, 63 Station

Claims

1. An engineering tool comprising an import unit that imports a plurality of structures, each of which has at least one variable or array, wherein the import unit determines an import order such that a structure among the plurality of structures that references other structures is imported after the other structures, and imports the plurality of structures in the determined import order.

2. The engineering tool according to claim 1, wherein the import unit imports a plurality of functions, each of which is composed of a function or a function block, determines an import order for the plurality of functions such that a function that references other functions among the plurality of functions is imported after the other functions, and imports the plurality of functions in the determined import order.

3. The engineering tool according to claim 2, wherein the import unit imports a program that references at least one of the functions, the import unit determines an import order for the program and the functions such that the program is imported after the functions referenced by the program, and imports the program and the functions in the determined import order.

4. The engineering tool of claim 3, wherein the import unit imports the program from an import target file that defines the program among a plurality of import target files that respectively define the function and the program, and when a file defining a function referenced by the program is not included in the plurality of import target files, the import unit determines whether the function has already been imported into the import destination library, and if it has, determines the import order of the program and the function, and if it has not been imported, determines that the program cannot be imported.

5. The engineering tool of claim 2, wherein the import unit imports the plurality of functions from a plurality of import target files each defining the plurality of functions, and when an import target file defining a function referenced by any of the plurality of functions is not included in the plurality of import target files, the import unit determines whether the referenced function has already been imported into the import destination library, and if the referenced function has already been imported, determines the order in which the plurality of functions will be imported, and if the referenced function has not already been imported, determines that the function that references the referenced function cannot be imported.

6. The engineering tool of claim 1, wherein the import unit imports the multiple structures from multiple import target files each defining the multiple structures, and when an import target file defining a structure referenced by any of the multiple structures is not included in the multiple import target files, the import unit determines whether the referenced structure has already been imported into the import destination library, and if it has, determines the order in which the multiple structures will be imported, and if it has not been imported, determines that it is not possible to import a structure that references the referenced structure.

7. The engineering tool according to claim 3, wherein a collection of the program, the plurality of functions, and the plurality of structures imported by the import unit constitutes a control program for controlling a control device.

Citation Information

Patent Citations

  • Data preparation apparatus, management apparatus, data processing system, control method of data preparation apparatus, control method of management apparatus, and program

    JP2017040965A

  • Engineering tool

    JP2022054949A