Computer readable recording medium, programming assistance device and programming assistance method
By generating and updating class diagrams, identifying the strengths of object-oriented elements and relationships in the project, solving the problem that is difficult to master in PLC project construction, and achieving efficient programming assistance for object-oriented projects.
Patent Information
- Application Number
- CN202180100103.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2041-12-21
AI Technical Summary
In the programming of PLC projects, it is difficult for the prior art to effectively utilize the object-oriented elements and relationships introduced in IEC61131-3, the third edition, making it difficult to master the project structure.
Through programming auxiliary programs, the computer obtains the project's element information and relationship information, generates a class diagram, and displays and updates the class diagram based on the relationship between the user's selected elements and other elements to help users identify and understand the construction of the project.
It provides programming auxiliary methods that can easily master project structure for projects with object-oriented elements and relationships, shortens understanding time and promotes structured programming.
Smart Images

Figure CN117581167B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a computer-readable recording medium, a programming assistance device and a programming assistance method. Background Art
[0002] In the programming of a PLC (Programmable Logic Controller) project, a technology for visualizing the structure of the project is known. For example, Patent Document 1 discloses a technology for analyzing which FB (Function Block) is included in the project and what kind of relationship exists between multiple FBs included in the project, and displaying the analysis results in a tree form on the screen, thereby understanding the structure of the project.
[0003] Patent Document 1: Japanese Patent Application Publication No. 2004-303217 Summary of the invention
[0004] On the other hand, in the IEC (International Electric Machinery Standards Council), which is the latest standard for PLC
[0005] The third edition of 61131-3 introduced the use of object-oriented elements and relationships such as "interface" and "inheritance" to promote structured programming for the creation of projects executed by PLCs.
[0006] However, the technology of the above-mentioned patent document 1 only displays the relationship between the elements included in the project in a tree form, and therefore does not involve the object-oriented elements and relationships introduced in the 3rd edition of IEC61131-3. Therefore, when a project includes object-oriented elements and relationships, there is a problem that it is difficult to understand the structure of the project.
[0007] An object of the present invention is to provide a programming support program, a programming support device, and a programming support method that can easily grasp the structure of a project having object-oriented elements and relationships.
[0008] In order to achieve the above-mentioned object, the programming auxiliary program of the present invention enables the computer to
[0009] The following units are functional:
[0010] a project information acquisition unit that acquires element information indicating a plurality of elements constituting a project and relationship information indicating a relationship between the plurality of elements, the project having object-oriented elements and relationships;
[0011] a generating unit that generates a class diagram representing a structure of the project based on the acquired element information and the acquired relationship information;
[0012] A display unit, which displays the generated class diagram on a screen; and
[0013] The display updating unit receives a selection operation for selecting an element included in the class diagram displayed on the screen, and updates the display form of the class diagram in a manner capable of identifying the strength of the relationship between the element selected by the selection operation and other elements.
[0014] Effects of the Invention
[0015] According to the present invention, it is possible to provide a programming support program, a programming support device, and a programming support method that can easily grasp the structure of a project having object-oriented elements and relationships. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a diagram showing the functional structure of the programming support device involved in the first embodiment.
[0017] Figure 2 This is a block diagram showing the hardware configuration of the programming support device according to the first embodiment.
[0018] Figure 3 This is a diagram showing an example of item information according to the first embodiment.
[0019] Figure 4 This is a diagram showing an example of a class diagram according to the first embodiment.
[0020] Figure 5 This is a diagram showing a state in which the class diagram according to the first embodiment is displayed in a manner that allows identification of the strength of the relationship.
[0021] Figure 6 This is a diagram showing a state in which the class diagram according to the first embodiment is displayed in a manner that allows identification of the strength of the relationship.
[0022] Figure 7 This is a diagram showing a state in which the selected relationship is displayed in a recognizable manner in the class diagram according to the first embodiment.
[0023] Figure 8 This is a diagram showing a state in which the selected relationship is displayed in a recognizable manner in the class diagram according to the first embodiment.
[0024] Fig. 9 This is a diagram showing a situation in which some elements in the class diagram according to the first embodiment are not displayed.
[0025] Fig.10 This is a diagram showing a situation after an editing operation is performed on the class diagram involved in the first embodiment.
[0026] Fig.11This is a block diagram showing an example of project information according to the first embodiment.
[0027] Fig.12 This is a flowchart showing the display processing involved in the first embodiment.
[0028] Fig.13 This is a flowchart showing the display update process according to the first embodiment.
[0029] Fig.14 This is a flowchart showing the editing process involved in Implementation Example 1.
[0030] Fig.15 This is a diagram showing the functional structure of the programming support device involved in the second embodiment. DETAILED DESCRIPTION
[0031] (Implementation Method 1)
[0032] The programming assistance device 100 according to the first embodiment is a device for assisting programming of a project executed by a PLC. For example, the programming assistance device 100 is a device for realizing an engineering design tool. The programming assistance device 100 has the function of displaying a class diagram representing the structure of a project having object-oriented elements and relationships on a screen of the programming assistance device 100.
[0033] Figure 1 The functional structure of the programming support device 100 is shown. In terms of functions, the programming support device 100 includes: a project information storage unit 101 that stores project information; a project information acquisition unit 102 that acquires project information; an analysis unit 103 that acquires analysis information indicating the structure of the project based on the acquired project information; a generation unit 104 that generates a class diagram indicating the structure of the project based on the acquired analysis information; a display unit 105 that displays the class diagram on a screen; a display update unit 106 that updates the class diagram based on a selection operation from a user; an edit information acquisition unit 107 that acquires edit information indicating the content of an edit operation from a user; an information update unit 108 that updates the project information based on the acquired edit information; and a data output unit 109 that outputs data related to the class diagram.
[0034] Figure 1 The programming assistance device 100 has Figure 2 The hardware structure shown.
[0035] The programming support device 100 includes: a processor 11 that performs various processes; a main storage unit 12 that is used as a work area of the processor 11; an auxiliary storage unit 13 that stores various data used for the processes of the processor 11; a communication unit 14 that is used to communicate with an external device; an input unit 15 that obtains input information; an output unit 16 that displays various information; and an RTC (Real Time Clock) 17 that performs timekeeping. The main storage unit 12, the auxiliary storage unit 13, the communication unit 14, the input unit 15, the output unit 16, and the RTC 17 are all connected to the processor 11 via a bus 18.
[0036] The processor 11 includes a CPU (Central Processing Unit) and implements various functions of the programming support device 100 by executing a program stored in the auxiliary storage unit 13 .
[0037] The main storage unit 12 includes a RAM (Random Access Memory). The program is loaded from the auxiliary storage unit 13 to the main storage unit 12. The main storage unit 12 is used as a work area for the processor 11.
[0038] The auxiliary storage unit 13 includes a nonvolatile memory represented by an EEPROM (Electrically Erasable Programmable Read-Only Memory). In addition to the program, the auxiliary storage unit 13 also stores various data used for processing by the processor 11. The auxiliary storage unit 13 supplies the data used by the processor 11 to the processor 11 according to the instruction of the processor 11, and stores the data supplied from the processor 11.
[0039] The communication unit 14 includes a network interface circuit for communicating with an external device. The communication unit 14 receives a signal from an external device and outputs data represented by the signal to the processor 11. In addition, the communication unit 14 transmits a signal representing data output from the processor 11 to an external device.
[0040] The input unit 15 includes input devices such as input keys and a pointing device. The input unit 15 acquires information input by a user of the programming support apparatus 100 and notifies the processor 11 of the acquired information.
[0041] The output unit 16 includes output devices such as an LCD (Liquid Crystal Display) and a speaker. The output unit 16 may also constitute a touch screen formed integrally with a pointing device constituting the input unit 15. The output unit 16 presents various information to the user according to the instruction of the processor 11.
[0042] The RTC 17 is a timekeeping device having an oscillation circuit realized by a crystal oscillator. The RTC 17 has, for example, a built-in battery, and continues to keep time even when the programming support device 100 is powered off.
[0043] exist Figure 1 The project information storage unit 101 stores project information. The project information is element information indicating multiple elements constituting a project and relationship information indicating the relationship between the multiple elements. The structure of the project is described by the element information and the relationship information. The project information storage unit 101 is implemented by the auxiliary storage unit 13. In addition, the project information storage unit 101 is an example of a storage unit.
[0044] For example, the project information storage unit 101 stores Figure 3 The project information table is shown in Figure 3 In the project information table, a project ID for identifying a project, element information indicating elements constituting the project, and relationship information indicating the relationship between the elements are registered in association. Figure 3 The items registered in the item information table are items having object-oriented elements and relationships. Object-oriented elements include POU (Program Organization Unit), FB, interface and structure, and object-oriented relationships include reference, implementation, inheritance, realization and namespace. Figure 3 The element information and relationship information in the project information table are updated every time a project is created or edited.
[0045] For example, Figure 3 The record of the first row of the item information table indicates that an element "POU1" is included in item A (item ID "A"), and POU1 "has FB1 installed".
[0046] Figure 1 The project information acquisition unit 102 acquires the element information and the relationship information. The project information acquisition unit 102 is implemented by the processor 11 and the input unit 15. In addition, the project information acquisition unit 102 is an example of a project information acquisition unit.
[0047] For example, when the project information acquisition unit 102 receives an operation from the user to display the class diagram of project A, it refers to the class diagram stored in the project information storage unit 101. Figure 3 , and obtains element information and relationship information associated with project ID "A". Specifically, the project information acquisition unit 102 obtains Figure 3 The element information and relationship information of the 1st to 8th rows of the project information table.
[0048] Figure 1The analyzing unit 103 acquires first analysis information indicating the structure of the project based on the acquired element information and the acquired relationship information. The first analysis information is analysis information acquired based on the element information and relationship information acquired by the project information acquiring unit 102. The analyzing unit 103 is implemented by the processor 11. The analyzing unit 103 is an example of an analyzing unit.
[0049] For example, the analyzing unit 103 is based on Figure 3 From the 1st to 8th rows of the project information table, for project A, the first parsing information is obtained: "POU1 is installed with FB1", "POU2 is installed with FB1 and FB2 and belongs to namespace 1", "FB1 is installed in POU1 and implements interface 1", "FB1 is installed in POU2 and belongs to namespace 1", "FB2 is installed in POU2, inherited by FB3 and belongs to namespace 1", "FB3 inherits FB2, references structure 1 (or is associated with it) and belongs to namespace 1", "Interface 1 is implemented by FB1" and "Structure 1 is referenced by FB3 and belongs to namespace 1".
[0050] Figure 1 The generation unit 104 generates a class diagram representing the structure of the project based on the acquired first analysis information. The generation unit 104 is implemented by the processor 11. The generation unit 104 is an example of a generation means.
[0051] For example, the generating unit 104 generates Figure 4 The class diagram 201 shown in FIG. 201 shows that elements are represented by boxes and relationships are represented by lines and arrows. Hereinafter, the lines and arrows are referred to as "relationship lines". Figure 4 The legend 202 shows the correspondence between the relationship and the relationship line. In the class diagram, the elements connected by the relationship line show that there is a relationship shown by the relationship line, and the elements not connected by the relationship line show that there is no relationship.
[0052] Figure 1 The display unit 105 displays the generated class diagram on the screen. The display unit 105 is implemented by the processor 11 and the output unit 16. In addition, the display unit 105 is an example of a display unit.
[0053] For example, the display unit 105 displays on the screen 300 of the programming support device 100 Figure 4 Class diagram 201.
[0054] Figure 1The display update unit 106 receives a selection operation for selecting an element included in the class diagram displayed on the screen, and updates the display form of the class diagram in a manner that can identify the strength of the relationship between the element selected by the selection operation and other elements. The display update unit 106 is implemented by the processor 11 and the input unit 15. In addition, the display update unit 106 is an example of a display update unit.
[0055] Here, the strength of the relationship refers to the degree to which the elements are related to each other. In the class diagram, the closer the distance, the stronger the relationship. In addition, the distance is represented by the number of elements to be passed from the element selected by the user to other elements. That is, the greater the number of elements to be passed, the weaker the strength of the relationship between the elements, and the fewer the number of elements to be passed, the stronger the strength of the relationship between the elements.
[0056] The display update unit 106 calculates the number of elements that the element selected by the selection operation passes through to reach other elements in the class diagram, and updates the display form to indicate that the greater the calculated number, the weaker the strength of the relationship.
[0057] For example, Figure 5 As shown in FIG. 1 , if the user selects a box 402 (POU2) by hovering the mouse, clicking the left button, or other operations in the class diagram 201 displayed on the screen 300, the display update unit 106 receives the selection operation of the element of the box 402. Next, the display update unit 106 calculates the distance between the selected box 402 and other boxes connected to the box 402 by relationship lines. Figure 5 In the example of , the display update unit 106 calculates that the distance to the frame 402 is "0", the distance to the frame 403 (FB2) and the frame 405 (FB1) is "1", the distance to the frame 406 (FB3) is "2", and the distance to the frame 408 (structure 1) is "3". In addition, the display update unit 106 changes the depth of the color of the frame for which the distance is calculated and the depth of the color of the relationship line connecting them according to the distance from the selected frame 402. Specifically, the display update unit 106 makes the color of the frame for which the distance is calculated and the color of the relationship line connecting them darker as the distance becomes shorter, that is, the number of elements to be passed through becomes smaller.
[0058] In addition, the display update unit 106 further receives a selection operation for selecting one of the relationships, and updates the display form of the class diagram so that the elements having the relationship selected by the selection operation can be identified.
[0059] For example, Figure 6As shown, in the class diagram 201 displayed on the screen 300, the user hovers the mouse over the frame 403, and the colors of the frame 403 and other frames connected to the frame 403 through the relationship lines and the depth of the color of the relationship lines change according to the distance. Figure 7 As shown in FIG. 4 , if the user right-clicks the frame 403 while hovering the mouse, a panel 409 is displayed. Panel 409 includes items indicating the relationship between elements. If the user selects the "inherit" item in panel 409, the display update unit 106 receives a selection operation for selecting the "inherit" relationship for the element in frame 403. Then, the display update unit 106 displays the information as shown in FIG. Figure 7 As shown, the frame line of the frame 403, the frame line of the frame 406 having an "inheritance" relationship with the frame 403, and the relationship line connecting the frame 403 and the frame 406 are thickened to highlight the frame 403.
[0060] In addition, in the panel 409, when the items of "Install", "Realize" and "Reference (Relation)" are selected, the selected frame, the frame having the selected relationship with the frame, and the relationship line connecting them are highlighted, similarly to the case where the item of "Inherit" is selected. Figure 8 As shown, if the item "namespace" is selected, a panel 410 including "namespace 1" associated with the element of the selected frame 403 is displayed on the screen. Furthermore, if the user selects "namespace 1", the display update unit 106 makes the frame lines of the frames 402, 403, 405, 406, and 408 of the elements associated with "namespace 1" thicker and more prominently displayed.
[0061] Furthermore, the display update unit 106 may update the class diagram so that elements that are not related to the element selected by the selection operation are not displayed. Whether or not to display elements that are not related to the selected element can be appropriately set by the user.
[0062] For example, suppose that it is set so that elements that have no relationship with the selected element are not displayed. Fig. 9 As shown, if the user selects box 403 in the class diagram 201 displayed on the screen 300 by hovering the mouse, clicking the left button, etc., the display update unit 106 makes the box 401 (POU1), box 404 (FB1), box 407 (interface 1) and the relationship lines therebetween which are not connected to the selected box 403 by the relationship lines not displayed.
[0063] Figure 1The editing information acquisition unit 107 receives an editing operation on the class diagram displayed on the screen, and acquires editing information indicating the content of the received editing operation. The editing information acquisition unit 107 is implemented by the processor 11 and the input unit 15. The editing information acquisition unit 107 is an example of an editing information acquisition unit.
[0064] For example, Fig.10 As shown, it is assumed that the user performs an operation of deleting the frame 402 in the class diagram 201 and adding a relationship line of "installation" between the frame 401 and the frame 406. The editing information acquisition unit 107 receives the editing operation from the user and acquires editing information such as "deletion of the frame 402" and "addition of the relationship line of installation from the frame 401 to the frame 406".
[0065] Next, the analyzing unit 103 acquires second analysis information indicating the structure of the item after the acquired editing information is reflected. The second analysis information is analysis information acquired based on the editing information acquired by the editing information acquiring unit 107 .
[0066] For example, the analysis unit 103 obtains the second analysis information such as "POU2 is deleted, has no installation relationship with FB1 and FB2, and does not belong to namespace 1", "POU1 installs FB3", and "FB3 is installed in POU1".
[0067] Figure 1 The information updating unit 108 updates the element information and the relationship information stored in the item information storage unit 101 based on the acquired second analysis information. The information updating unit 108 is implemented by the processor 11. The information updating unit 108 is an example of information updating means.
[0068] For example, Fig.11 As shown, the information update unit 108 adds "Installed FB3" to the relationship information in the first row of the project information table, deletes the element information and relationship information related to "POU2" in the second row, deletes the relationship information "Installed in POU2" in the fourth and fifth rows, and adds "Installed in POU1" to the relationship information in the sixth row.
[0069] Figure 1 The data output unit 109 receives a designation operation for designating a file format for outputting the generated class diagram, and outputs the generated class diagram as data in the file format designated by the designation operation. The data output unit 109 is implemented by the processor 11. In addition, the data output unit 109 is an example of a data output unit.
[0070] Here, the specified file format is used even without Figure 1The functions of each part of the programming support device 100 shown in the figure can also display the class diagram in such a file format, for example, an image file format. For example, if the data output unit 109 receives a designated operation of designating a gif file format from the user, it receives the gif file format. Figure 4 The output operation of the class diagram 201 is output through the gif file format Figure 4 The class diagram 201 is shown as output.
[0071] Next, use Fig.12 The display processing executed by the programming support device 100 according to the present embodiment is described with reference to the flowchart of FIG. Fig.12 The display process is a process executed when an operation of displaying a class diagram of a project is received from a user.
[0072] Upon receiving an operation to display a class diagram of a project from a user, the project information acquisition unit 102 acquires element information and relationship information from the project information storage unit 101 (step S101 ).
[0073] For example, when receiving an operation to display a class diagram of project A from a user, the project information acquisition unit 102 refers to the project information table stored in the project information storage unit 101 and acquires element information and relationship information of the first to eighth rows associated with project ID “A”.
[0074] The analyzing unit 103 acquires first analysis information indicating the structure of the item based on the acquired element information and the acquired relationship information (step S102 ).
[0075] For example, the analyzing unit 103 is based on Figure 3 The element information and relationship information of the 1st to 8th rows of the project information table are used to obtain, for project A, first analysis information such as "POU1 has FB1 installed", "POU2 has FB1 and FB2 installed, and belongs to namespace 1".
[0076] The generation unit 104 generates a class diagram representing the structure of the project based on the acquired first analysis information (step S103 ).
[0077] For example, the generating unit 104 generates Figure 4 Class diagram 201 is shown.
[0078] The display unit 105 displays the generated class diagram on the screen (step S104 ).
[0079] For example, the display unit 105 may be Figure 5 As shown, the class diagram 201 is displayed in a screen 300 of the programming assistance device 100 .
[0080] The data output unit 109 determines whether an output operation to output the generated class diagram in a file format has been received (step S105). If the data output unit 109 determines that an output operation to output the generated class diagram in a file format has been received (step S105; YES), the data output unit 109 outputs the data in the file format specified by the user (step S106). On the other hand, if the data output unit 109 determines that an output operation to output the generated class diagram in a file format has not been received (step S105; NO), the process ends. Fig.12 Display processing.
[0081] For example, if the data output unit 109 receives a designation operation for designating a gif file format and receives an output operation for outputting the class diagram 201 in a gif file format from the user, the class diagram 201 is output in a gif file format. Figure 4 On the other hand, if the data output unit 109 does not receive an output operation from the user to output the class diagram 201, the data output unit 109 ends. Fig.12 Display processing.
[0082] Next, use Fig.13 The display update process executed by the programming support device 100 according to the present embodiment is described with reference to the flowchart of FIG. Fig.13 The display update process is a process executed when a selection operation of selecting an element included in the class diagram displayed on the screen is received from the user.
[0083] When the display update unit 106 receives a selection operation from the user to select an element included in the class diagram displayed on the screen, it changes the color of the selected element, elements related to the selected element, and the relationship lines connecting these elements based on the strength of the relationship (step S201).
[0084] For example, the display update unit 106 may Figure 6 As shown, if a selection operation is received to select an element of frame 403, the distance between frame 403 and other frames connected by relationship lines is calculated, and based on the calculated distance, the color depth of frame 403, other frames connected to frame 403 by relationship lines, and the relationship lines connecting them are changed.
[0085] Next, the display update unit 106 determines whether it is set to not display the elements that have no relationship with the selected element in the class diagram (step S202). If the display update unit 106 determines that it is set to not display the elements that have no relationship with the selected element (step S202; YES), the elements that have no relationship with the element selected by the user are not displayed in the class diagram (step S203). On the other hand, if the display update unit 106 determines that it is not set to not display the elements that have no relationship with the selected element (step S202; NO), the process proceeds to step S204.
[0086] For example, if the display update unit 106 determines that the elements that have no relationship with the selected element are set not to be displayed in the class diagram, Fig. 9 As shown in FIG. 2 , the user makes the frame 401, frame 404, frame 407 and the relationship lines therebetween not connected to the selected frame 403 by the relationship line not displayed in the class diagram 201 displayed on the screen 300. On the other hand, if the display update unit 106 determines that the element having no relationship with the selected element is not set to be not displayed in the class diagram, then Figure 6 Enter step S204 under the displayed state.
[0087] The display update unit 106 determines whether a selection operation for selecting a relationship has been further received from the user (step S204). If the display update unit 106 determines that a selection operation for selecting a relationship has been further received from the user (step S204; YES), the color of the element having the selected relationship and the relationship line representing the selected relationship are changed (step S205). On the other hand, if the display update unit 106 determines that a selection operation for selecting a relationship has not been received from the user (step S204; NO), the display update unit 106 ends the operation. Fig.13 Display update processing.
[0088] For example, if the display update unit 106 Figure 7 As shown, when the element of frame 403 receives the selection of the "inheritance" relationship, the frame line of frame 403, the frame line of frame 406 having the "inheritance" relationship with frame 403, and the relationship line connecting frame 403 and frame 406 are changed to be thicker than other frame lines and relationship lines, thereby terminating the display update processing.
[0089] Next, use Fig.14 The editing process executed by the programming support device 100 according to the present embodiment is described with reference to the flowchart of FIG. Fig.14 The editing process is a process executed when an editing operation for the class diagram displayed on the screen is received from the user.
[0090] When receiving an edit operation for a class diagram displayed on the screen from the user, the edit information acquisition unit 107 acquires edit information indicating the content of the edit operation (step S301 ).
[0091] For example, when the editing information acquisition unit 107 receives an editing operation from the user to delete frame 402 and add a relationship line of "install" between frame 401 and frame 406, the editing information acquisition unit 107 acquires editing information such as "deletion of frame 402" and "addition of a relationship line of install from frame 401 to frame 406".
[0092] The analyzing unit 103 acquires second analysis information indicating the structure of the item after the acquired editing information is reflected (step S302 ).
[0093] For example, the analysis unit 103 obtains the second analysis information "POU2 is deleted, no longer has an installation relationship with FB1 and FB2, and no longer belongs to namespace 1", "POU1 installs FB3", and "FB3 is installed in POU1".
[0094] The information updating unit 108 updates the element information and relationship information stored in the project information storage unit 101 based on the acquired second analysis information (step S303). Then, the information updating unit 108 ends. Fig.14 Editing process.
[0095] For example, Fig.11 As shown, the information updating unit 108 updates the element information and relationship information of the 1st, 2nd, 4th to 6th rows of the item information table, and ends the editing process.
[0096] The larger the scale of a project is, the more the number of elements that make up the project increases. Therefore, the number of layers in the tree display increases, and there is a problem of wasting time to grasp the information related to a specific element. However, according to this embodiment, a project with object-oriented elements and relationships can be displayed as a class diagram representing the structure of the project. In addition, if the user selects an element in the class diagram, it is displayed in a manner that can identify the strength of the relationship between the selected element and other elements. As a result, for a project with object-oriented elements and relationships, the structure of the project can be easily grasped, and the time to grasp the structure of the project can be shortened.
[0097] Furthermore, according to the present embodiment, by editing the class diagram, it is possible to update the element information and relationship information describing the items, thereby promoting structured programming.
[0098] Furthermore, according to the present embodiment, the generated class diagram can be output in a file format specified by the user, thereby enabling the class diagram to be checked in a device without a programming support device function or in a normal application, thereby improving user convenience.
[0099] (Implementation Method 2)
[0100] The programming assistance device involved in embodiment 2 is as follows Fig.15 As shown, the functions thereof include: a project information storage unit 101 for storing project information; a project information acquisition unit 102 for acquiring project information; an analysis unit 103 for acquiring analysis information representing the structure of the project based on the acquired project information; a generation unit 104 for generating a class diagram representing the structure of the project based on the acquired analysis information; a display unit 105 for displaying the class diagram on a screen; a display update unit 106 for updating the class diagram based on a selection operation from a user; an editing information acquisition unit 107 for acquiring editing information representing the content of an editing operation from a user; an information update unit 108 for updating the project information based on the acquired editing information; and a data output unit 109 for outputting data related to the class diagram.
[0101] The project information storage unit 101, project information acquisition unit 102, analysis unit 103, generation unit 104, display unit 105, display update unit 106, edit information acquisition unit 107 and information update unit 108 of Embodiment 2 are the same as those of Embodiment 1. Next, the data output unit 109 having a different function will be described.
[0102] Fig.15 The data output unit 109 receives a designation operation for designating a file format for outputting a class diagram with an updated display form, and outputs the class diagram with an updated display form as data in the file format designated by the designation operation. The data output unit 109 is implemented by the processor 11. In addition, the data output unit 109 is an example of a data output unit.
[0103] For example, the data output unit 109 receives a designated operation for designating a gif file format from a user, and receives a designated operation for converting a gif file format into a gif file format. Figure 6 The class diagram 201 output instructions are in the form of a gif file. Figure 6 The class diagram 201 is shown as output.
[0104] According to this embodiment, the class diagram with updated display form can be output in a file format specified by the user. Thus, the class diagram after the elements and relationships selected by the user are highlighted can be confirmed in a device without the function of a programming assistance device and a general application, which can improve the convenience of the user.
[0105] (Variation Example)
[0106] As mentioned above, although embodiment of this invention is described, when implementing this invention, various deformation|transformation and application are possible.
[0107] For example, the programming support device 100 may be a combination of Embodiment 1 and Embodiment 2. Specifically, the data output unit 109 may output the generated class diagram and the class diagram with updated display form as data in a file format specified by the specifying operation.
[0108] In addition, in the above-mentioned embodiment, when the user selects a relationship, the display update unit 106 updates the display form in a manner that enables identification of the strength of the relationship and identification of the selected relationship. Figure 6 As shown in the figure, the color of the frame and relationship line changes according to the strength of the relationship. Figure 7 As shown in FIG. 1 , the thickness of the frame line and the relationship line of the frame related to the selected relationship are changed. However, the method of updating the display form is not limited to this. For example, the display update unit 106 may update the display form in a manner that only the selected relationship can be identified. For example, Figure 7 As shown in the panel 409, if the "inherit" item is selected, the display update unit 106 changes the color of only the frame 403, the frame 406 having an "inheritance" relationship with the frame 403, and the relationship line connecting the frame 403 and the frame 406, and does not change the color of other frames and relationship lines relative to the frame 403. Figure 4 The color of class diagram 201 is changed.
[0109] Furthermore, by applying an operating program defining the operation of the programming support device 100 according to the above-described embodiment to an existing personal computer or information terminal device, the personal computer or information terminal device can also function as the programming support device 100 according to the embodiment.
[0110] Such a program may be distributed in any manner, for example, by being stored in a computer-readable recording medium such as a CD-ROM (Compact Disk Read-Only Memory), a DVD (Digital Versatile Disk), or a memory card, or distributed via a communication network such as the Internet.
[0111] The present invention can realize various embodiments and variations without departing from the broad spirit and scope of the present invention. In addition, the above-mentioned embodiments are used to illustrate the present invention and are not intended to limit the scope of the present invention. That is, the scope of the present invention is not shown by the embodiments but by the claims. Moreover, various variations implemented within the scope of the claims and within the scope of the meaning of the invention equivalent thereto are deemed to be within the scope of the present invention.
[0112] Industrial Applicability
[0113] According to the present invention, it is possible to provide a programming support program, a programming support device, and a programming support method that can easily grasp the structure of a project having object-oriented elements and relationships.
[0114] Description of the label
[0115] 11 processor, 12 main storage unit, 13 auxiliary storage unit, 14 communication unit, 15 input unit, 16 output unit, 17 RTC, 18 bus, 100 programming support device, 101 project information storage unit, 102 project information acquisition unit, 103 analysis unit, 104 generation unit, 105 display unit, 106 display update unit, 107 editing information acquisition unit, 108 information update unit, 109 data output unit, 201 class diagram, 202 legend, 300 screen, 401 to 408 frames, 409, 410 panels.
Claims
1. A computer-readable recording medium storing a programming assistance program, wherein the programming assistance program causes a computer to function as the following unit: a project information acquisition unit that acquires element information indicating a plurality of elements constituting a project and relationship information indicating a relationship between the plurality of elements, the project having object-oriented elements and relationships; a generating unit that generates a class diagram representing a structure of the project based on the element information acquired by the project information acquiring unit and the relationship information acquired by the project information acquiring unit; A display unit, which displays the class diagram generated by the generating unit on a screen; as well as a display updating unit that receives a selection operation for selecting an element included in the class diagram displayed on the screen, and updates the display form of the class diagram in a manner that can identify the strength of the relationship between the element selected by the selection operation and other elements; The display update unit calculates the number of elements to be passed from the element selected by the selection operation to the other element in the class diagram, and updates the display form of the class diagram in a manner indicating that the strength of the relationship decreases as the number of elements increases.
2. The computer-readable recording medium according to claim 1, wherein: The display update unit functions to receive a selection operation for selecting any of the relationships and to update the display form of the class diagram so that the elements having the relationship selected by the selection operation can be identified.
3. The computer-readable recording medium according to claim 1 or 2, wherein: The display updating unit updates the class diagram so that elements that do not have the relationship with the element selected by the selection operation are not displayed.
4. The computer-readable recording medium according to claim 1 or 2, wherein: The programming support program causes the computer to function as an analysis unit that acquires first analysis information indicating a structure of the project based on the element information acquired by the project information acquisition unit and the relationship information acquired by the project information acquisition unit. The generating unit generates the class graph based on the first analysis information acquired by the analyzing unit.
5. The computer-readable recording medium according to claim 4, wherein: The element information indicating the plurality of elements constituting the project and the relationship information indicating the relationship between the plurality of elements are stored in the storage unit. The item information acquisition unit acquires the element information and the relationship information from the storage unit, The programming support program causes the computer to function as an editing information acquisition unit that receives an editing operation on the class diagram displayed on the screen and acquires editing information indicating the content of the editing operation. The analyzing unit acquires second analyzing information indicating the structure of the item after the editing information acquired by the editing information acquiring unit is reflected, The programming support program causes the computer to function as information updating means for updating the element information and the relationship information stored in the storage means based on the second analysis information acquired by the analysis means.
6. The computer-readable recording medium according to claim 1 or 2, wherein: The programming auxiliary program enables the computer to function as a data output unit, which receives a specified operation for specifying a file format for outputting a class diagram generated by the generation unit or a class diagram with an updated display form, and outputs the class diagram generated by the generation unit or the class diagram with an updated display form as data in the file format specified by the specified operation.
7. The computer-readable recording medium according to claim 1 or 2, wherein: The elements shown in the element information include POU, FB, interface and structure. The relationships shown in the relationship information include reference, installation, inheritance, implementation, and namespace.
8. A programming assistance device, comprising: a project information acquisition unit that acquires element information indicating a plurality of elements constituting a project and relationship information indicating a relationship between the plurality of elements, the project having object-oriented elements and relationships; a generating unit that generates a class diagram representing a structure of the project based on the element information acquired by the project information acquiring unit and the relationship information acquired by the project information acquiring unit; A display unit, which displays the class diagram generated by the generating unit on a screen; as well as a display updating unit that receives a selection operation for selecting an element included in the class diagram displayed on the screen, and updates the display form of the class diagram in a manner that can identify the strength of the relationship between the element selected by the selection operation and other elements; The display update unit calculates the number of elements to be passed from the element selected by the selection operation to the other element in the class diagram, and updates the display form of the class diagram in a manner indicating that the strength of the relationship decreases as the number of elements increases.
9. A programming assistance method, in which: The project information acquisition unit acquires element information indicating a plurality of elements constituting a project and relationship information indicating a relationship between the plurality of elements, wherein the project has object-oriented elements and relationships. a generating unit generating a class diagram representing a structure of the project based on the element information acquired by the project information acquiring unit and the relationship information acquired by the project information acquiring unit, The display unit displays the class diagram generated by the generation unit on a screen, The display updating unit receives a selection operation for selecting an element included in the class diagram displayed on the screen, and updates the display form of the class diagram in a manner capable of identifying the strength of the relationship between the element selected by the selection operation and other elements. The display update unit calculates the number of elements to be passed from the element selected by the selection operation to the other element in the class diagram, and updates the display form of the class diagram in a manner indicating that the strength of the relationship decreases as the number of elements increases.
Citation Information
Patent Citations
Displaying / editing device, method for displaying, and program product
JP2004303217A
Providing method for search results, terminal, system and rendering method
CN103399931A
List displaying method and list displaying device
CN103885682A
Database node association relationship display method and apparatus
CN106445931A
A display method of a drop-down box and an education notebook
CN109445664A
