Method and system for assisting programming, and computer-readable storage medium

The method and system for assisting programming in programmable logic controllers improve visualization and efficiency by using a drawing interface to generate inclusion relationships between objects, addressing the limitations of current programming methods.

WO2025129576A1PCT designated stage expired Publication Date: 2025-06-26SIEMENS AG +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/140719
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-12-21
Publication Date
2025-06-26

AI Technical Summary

Technical Problem

Current programming methods for programmable logic controllers lack effective visualization of modeling, leading to low programming efficiency and accuracy.

Method used

A method and system for assisting programming that includes a drawing interface for inserting patterns associated with objects, generating inclusion relationships between objects based on user-inserted patterns, and providing predefined classes and attribute editing interfaces to enhance programming efficiency.

Benefits of technology

Improves visualization of modeling during programming, facilitating better understanding of models and enhancing programming efficiency and accuracy by clearly defining inclusion relationships between objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023140719_26062025_PF_FP_ABST
    Figure CN2023140719_26062025_PF_FP_ABST
Patent Text Reader

Abstract

A method for assisting programming is applicable to object-oriented programming by a programmable logic controller. The method includes: providing a drawing interface, the drawing interface being configured for inserting patterns by a user, wherein each of the patterns is associated with an object; and generating inclusion relationships between the associated objects according to inclusion relationships between the patterns inserted by the user into the drawing interface. The method improves visualization of modeling during programming by a programmable logic controller. In addition, a system for assisting programming, and a computer-readable storage medium are further provided.
Need to check novelty before this filing date? Find Prior Art

Description

METHOD AND SYSTEM FOR ASSISTING PROGRAMMING, AND COMPUTER-READABLE STORAGE MEDIUMTECHNICAL FIELD

[0001] The present disclosure relates to methods for assisting programming, and in particular, relates to a method for assisting programming applicable to a programmable logic controller, a system for assisting programming, and a computer-readable storage medium.BACKGROUND

[0002] At present, visualization of modeling during current programming by a programmable logic controller is poor. Consequently, during control logic editing upon modeling, it is hard for a programmer to understand a model, and thus programming efficiency and accuracy are low.SUMMARY

[0003] One object of the present disclosure is to provide a method for assisting programming, which is favorable to improving visualization of modeling during programming by a programmable logic controller.

[0004] Another object of the present disclosure is to provide a computer-readable storage medium, which is favorable to improving visualization of modeling during programming by a programmable logic controller.

[0005] Still another object of the present disclosure is to provide a system for assisting programming, which is favorable to improving visualization of modeling during programming by a programmable logic controller.

[0006] The present disclosure provides a method for assisting programming is applicable to object-oriented programming by a programmable logic controller. The method includes:  providing a drawing interface, the drawing interface being configured for inserting patterns by a user, wherein each of the patterns is associated with an object; and generating inclusion relationships between the associated objects according to inclusion relationships between the patterns inserted by the user into the drawing interface.

[0007] With the method for assisting programming, the inclusion relationships between the associated objects are generated according to the inclusion relationships between the patterns inserted by the user into the drawing interface, such that visualization of modeling during programming by the programmable logic controller is improved. This not only implements visual modeling, but also facilitates understanding of a model by a programmer during controlling logic editing, which is favorable to improving programming efficiency and accuracy.

[0008] In an exemplary embodiment, the method further includes: providing predefined classes, wherein each of the predefined classes is associated with one of the patterns; and when the user selects one of the predefined classes to generate a corresponding object, generating an object corresponding to the selected predefined class, generating a pattern the same as a pattern associated with the selected predefined class, associating the generated pattern with the generated object, and inserting the generated pattern associated with the generated pattern into the drawing interface. Predefining classes is favorable to improving the programming efficiency.

[0009] In an exemplary embodiment, the method further includes: when the user selects one of the predefined classes, providing an attribute editing interface which displays the attributes of the selected predefined class through natural language, wherein the displayed attributes can be edited by the user; and generating an object according to the attributes edited by the user, wherein the generated object corresponds to the selected predefined class. Attribute editing interface makes it easy to set the attributes of object.

[0010] In an exemplary embodiment, the method further includes: when the user draws a pattern in the drawing interface, duplicating the pattern, generating a class associated with the duplicated pattern, generating an object corresponding to the generated class, and associating the drawn pattern with the generated object. Drawing patterns is favorable to improving adaptability and flexibility.

[0011] In an exemplary embodiment, the method further includes: providing a programming interface, the programming interface being configured for editing an attribute and / or method of  the object by the user; and when the user selects a drawn pattern in the drawing interface and edits the attribute and / or method in the programming interface, assigning the edited attribute and / or method to a class corresponding to an object corresponding to the selected pattern, generating an object corresponding to the generated class, and associating the drawn pattern with the generated object. In this way, the programming efficiency is improved.

[0012] In an exemplary embodiment, the method further includes: providing a graphical programming interface, the graphical programming interface being configured for editing an attribute and / or method of the object by the user; and generating a building block according to the object associated with the pattern in the drawing interface, the building block being configured for selecting an object and an attribute and / or method of the selected object, and displaying the building block in the programming interface. In this way, the programming efficiency is improved.

[0013] In an exemplary embodiment, the method further includes: when the user duplicates a pattern in the drawing interface, generating a new object of a same class corresponding to an object associated with the duplicated pattern, and associating the duplicated pattern with the new object. In this way, the programming efficiency is improved.

[0014] In an exemplary embodiment, a tree-structured list is generated according to the inclusion relationships of the objects, and a presentation interface is provided to present the tree-structured list. This helps the user to acknowledge the inclusion relationships between the objects by the tree-structured list.

[0015] The present disclosure further provides a computer-readable storage medium. The computer-computer-readable storage medium stores a computer program therein. The computer program, when running on a processor, causes the processor to perform the steps of the method for assisting programming as described above. In this way, visualization of modeling during programming by the programmable logic controller is improved. This not only implements visual modeling, but also facilitates understanding of a model by a programmer during controlling logic editing, which is favorable to improving programming efficiency and accuracy.

[0016] The present disclosure further provides a system for assisting programming, applicable to object-oriented programming by a programmable logic controller. The system includes a memory and a processor. The memory stores storing a computer program therein, and  the processor, when running the computer program, is caused to perform the steps of the method for assisting programming as described above. The system for assisting programming is applicable to object-oriented programming by a programmable logic controller. With the system for assisting programming, the inclusion relationships between the associated objects are generated according to the inclusion relationships between the patterns inserted by the user into the drawing interface, such that visualization of modeling during programming by the programmable logic controller is improved. This not only implements visual modeling, but also facilitates understanding of a model by a programmer during controlling logic editing, which is favorable to improving programming efficiency and accuracy.BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings are merely for schematic and illustrative description and demonstration of the present disclosure, instead of limiting the scope of the present disclosure.

[0018] FIG. 1 is a schematic flowchart of a method for assisting programming according to an exemplary embodiment of the present disclosure;

[0019] FIG. 2, FIG. 3, and FIG. 5 exemplarily illustrate a specific implementation of the method for assisting programming as illustrated in FIG. 1;

[0020] FIG. 4 illustrates predefined classes and associated patterns; and

[0021] FIG. 6 is a schematic structural block diagram of a system for assisting programming according to an exemplary embodiment of the present disclosure.

[0022] Reference numerals and denotations thereof:

[0023] 10-drawing interface

[0024] 11-pattern

[0025] 20-programming interface

[0026] 21-building block

[0027] 30-presentation interface

[0028] 31-tree-structured list

[0029] 100-system for assisting programming

[0030] 101-memory

[0031] 102-processorDETAILED DESCRIPTION

[0032] For clearer descriptions of the technical features, objects, and the technical effects of the present disclosure, the specific embodiments of the present disclosure are hereinafter described with reference to the accompanying drawings. In the drawings, like reference numerals denote elements having the same structure or having the similar structure but the same function.

[0033] In this text, the term "exemplary" or "schematic" is used herein to mean "serving as an example, instance, or illustration, " and any illustration or embodiment described herein as "exemplary" shall not be necessarily construed as preferred or advantageous over other illustrations or embodiments.

[0034] In this context, the terms "first, " "second, " and the like do not represent degrees of importance or a sequence, but only for differentiation, and for ease of description.

[0035] For brevity, parts relevant to the present disclosure are merely illustrated in the drawings, and these parts do not denote the actual structure of the product.

[0036] Object-oriented programming is programming which implements modularization and reusability based on concepts such as encapsulation, inheritance, and Polymorphism. Object-oriented programming improves maintainability and scalability of a program.

[0037] Object-oriented programming by the programmable logic controller includes modeling and control logic editing. During modeling, inclusion relationships between objects are defined. During control logic editing, control logic between objects is edited.

[0038] FIG. 1 is a schematic flowchart of a method for assisting programming according to an exemplary embodiment of the present disclosure. The method for assisting programming is applicable to object-oriented programming by a programmable logic controller. As illustrated in FIG. 1, the method for assisting programming includes S10 and S20.

[0039] In S10, a drawing interface is provided, wherein the drawing interface is configured for inserting patterns by a user, wherein each of the patterns is associated with an object.

[0040] FIG. 2 and FIG. 3 exemplarily illustrate a specific implementation of the method for assisting programming. FIG. 2 and FIG. 3 both illustrate an application interface, wherein the application interface includes a drawing interface 10. In FIG. 2, no patterns are inserted into the drawing interface 10. In FIG. 3, nine patterns are inserted by a user into the drawing interface 10. FIG. 3 merely exemplarily illustrates a pattern 11 corresponding to a temperature sensor. The  nine patterns are respectively associated with nine objects:

[0041] "pattern-area" is associated with "object-area" ;

[0042] "pattern-environment control unit" is associated with "object-environment control unit" ;

[0043] "pattern-window" is associated with "object-window" ;

[0044] "pattern-heater" is associated with "object-heater" ;

[0045] "pattern-temperature sensor" is associated with "object-temperature sensor" ;

[0046] "pattern-fan 1" is associated with "object-fan 1" ;

[0047] "pattern-fan 2" is associated with "object-fan 2" ;

[0048] "pattern-fan 3" is associated with "object-fan 3" ;

[0049] "pattern-fan 4" is associated with "object-fan 4" .

[0050] In S20, inclusion relationships between the associated objects are generated according to inclusion relationships between the patterns inserted by the user into the drawing interface.

[0051] For example, in the drawing interface 10 as illustrated in FIG. 3, "pattern-window" , "pattern-heater" , "pattern-temperature sensor" , "pattern-fan 1" , "pattern-fan 2" , "pattern-fan 3" , and "pattern-fan 4" are included in "pattern-environment control unit" , and "pattern-environment control unit" is included in "pattern-area" . According to the inclusion relationships between these nine patterns, the inclusion relationships between the nine objects are generated as follows: "object-window" , "object-heater" , "object-temperature sensor" , "object-fan 1" , "object-fan 2" , "object-fan 3" , and "object-fan 4" are included in the "object-environment control unit" , and "object-environment control unit" is included in "object-area" . As such, during modeling, the objects are defined, and the inclusion relationships between the objects are established.

[0052] In this way, during control logic editing upon modeling, a programmer is capable of understanding the inclusion relationships between the objects by observing the inclusion relationships between the patterns inserted into the drawing interface, which is favorable to improving programming efficiency and accuracy.

[0053] With the method for assisting programming according to this exemplary embodiment, the inclusion relationships between the associated objects are generated according to the inclusion relationships between the patterns inserted by the user into the drawing interface, such  that improving visualization of modeling during programming by the programmable logic controller and the inclusion relationship between objects. This not only implements visual modeling, but also facilitates understanding of a model by a programmer during controlling logic editing, which is favorable to improving programming efficiency and accuracy.

[0054] In an exemplary embodiment, S10 further includes: providing predefined classes, wherein each of the predefined classes is associated with a pattern. FIG. 4 exemplarily illustrates the predefined classes. As illustrated in FIG. 4, the provided predefined classes include: predefined "class-window" , predefined "class-heater" , predefined "class-temperature sensor" , predefined "class-window" , and predefined "class-fan" . Each of the predefined class is associated with the pattern on the left.

[0055] S20 further includes: when the user selects one of the predefined classes to generate a corresponding object, generating an object corresponding to the selected predefined class, generating a pattern the same as a pattern associated with the selected predefined class, associating the generated pattern with the generated object, and inserting the generated pattern associated with the generated pattern into the drawing interface.

[0056] Description is given hereinafter using "pattern-window" in the drawing interface 10 in FIG. 3 as an example. When the user selects "class-window" to generate a corresponding object, generating "object-window" corresponding to "class-window" , a pattern the same as a pattern associated with "class-window" is generated, the generated pattern is associated with the generated "object-window" , and the generated pattern associated with the generated "object-window" is inserted into the drawing interface 10. Predefining classes is favorable to reducing programming difficulty and improving the programming efficiency. In an exemplary embodiment, the user may, for example, change the inclusion relationships between the patterns by moving the patterns.

[0057] In an exemplary embodiment, for example, the user can select one of the predefined classes by browsing or searching.

[0058] In an exemplary embodiment, the method further includes: when the user selects one of the predefined classes, providing an attribute editing interface which displays the attributes of the selected predefined class through natural language, wherein the displayed attributes can be edited (e.g. via drop-down menus, radio boxes, checkboxes, input boxes, etc. ) by the user; and  generating an object according to the attributes edited by the user, wherein the generated object corresponds to the selected predefined class. Attribute editing interface makes it easy to set the attributes of object.

[0059] For example, the attribute editing interface of the predefined "class-fan" provides a radio box for the fan type whose options include "Constant Current Fan" and "Inverter Fan" . The generated "object-fan" has the Inverter Fan attribute, if the user selects "Inverter Fan" .

[0060] In an exemplary embodiment, S20 further includes: when the user draws a pattern in the drawing interface, duplicating the pattern, generating a class associated with the duplicated pattern, generating an object corresponding to the generated class, and associating the drawn pattern with the generated object.

[0061] Description is given hereinafter using "pattern-environment control unit" in the drawing interface 10 in FIG. 3 as an example. When the user draws a rectangle and names the rectangle as "environment control unit" , the rectangle is duplicated, "class-environment control unit" associated with the duplicated rectangle is generated, "object-environment control unit" corresponding to "class-environment control unit" is generated, and the drawn pattern is associated with " "object-environment control unit" . Drawing patterns is favorable to improving adaptability and flexibility. In an exemplary embodiment, the user may, for example, change the inclusion relationships between the patterns by moving the patterns and adjusting dimensions of the drawn patterns.

[0062] In an exemplary embodiment, S10 further includes: providing a graphical programming interface, the graphical programming interface being configured for editing an attribute and / or method of the object by the user. The application interface illustrated in FIG. 2 and FIG. 3 includes a programming interface 20.

[0063] S20 further includes: generating a building block according to the object associated with the pattern in the drawing interface, the building block being configured for selecting an object and an attribute and / or method of the selected object, and displaying the building block in the programming interface. In this way, the programming efficiency is improved.

[0064] For example, as illustrated in FIG. 3, "pattern-fan 1" , "pattern-fan 2" , "pattern-fan 3" , and "pattern-fan 4" in the drawing interface 10 are associated with "object-fan 1" , "object-fan 2" , "object-fan 3" , and "object-fan 4" respectively. "Object-fan 1" , "object-fan 2" , "object-fan  3" , and "object-fan 4" all correspond to "class-fan" . The attribute of "class-fan" include "start " and "turn off" , and the method includes "is running" and "is not running " . Therefore, as illustrated in FIG. 3, two building blocks 21 are generated in the programming interface 20. An upper one of the two building blocks 21, is configured to select an object and a method of the object, and a lower one of the building blocks 21 is configured to select an object and an attribute of the object. Application of the building block 21 is as illustrated in FIG. 5:

[0065] In an exemplary embodiment, S20 further includes: when the user selects a drawn pattern in the drawing interface and edits the attribute and / or method in the programming interface, assigning the edited attribute and / or method to a class corresponding to an object corresponding to the selected pattern. In this way, the programming efficiency is improved.

[0066] For example, as illustrated in FIG. 5, when the user selects the drawn "pattern-environment control unit" in the drawing interface 10 and edits a method "if the current temperature (℃) of the temperature sensor is greater than 20℃, fan 1 start " in the programming interface, the edited method is assigned to "class-environment control unit" corresponding to "object-environment control unit" associated with "pattern-environment control unit" .

[0067] In an exemplary embodiment, S20 further includes: when the user duplicates a pattern in the drawing interface, generating a new object of a same class corresponding to an object associated with the duplicated pattern, and associating the duplicated pattern with the new object. In this way, the operations are simplified, and the programming efficiency is improved.

[0068] In an exemplary embodiment, S10 further includes: providing a presentation interface. The application interface illustrated in FIG. 2 and FIG. 3 further includes a presentation interface 30. S20 further includes: generating a tree-structured list according to the inclusion relationships of the objects, and providing a presentation interface to present the tree-structured list. For the specific instance, reference may be made to FIG. 3. As illustrated in FIG. 3, a tree-structured list 31 is generated according to the inclusion relationships of the nine objects in the drawing interface 10, and the presentation interface 30 is provided to present the tree-structured list 31. This helps the user to acknowledge the inclusion relationships between the objects by the tree-structured list.

[0069] The present disclosure further provides a computer-readable storage medium. In an exemplary embodiment, the computer-readable storage medium stores a computer program  therein. The computer program, when running on a processor, causes the processor to perform the steps of the method for assisting programming as described above. In this way, visualization of modeling during programming by the programmable logic controller is improved. This not only implements visual modeling, but also facilitates understanding of a model by a programmer during controlling logic editing, which is favorable to improving programming efficiency and accuracy.

[0070] FIG. 6 is a schematic structural block diagram of a system 100 for assisting programming according to an exemplary embodiment of the present disclosure. As illustrated in FIG. 6, the system 100 includes a memory 101 and a processor 102. The memory 101 stores a computer program therein. The processor 102, when running the computer program, is caused to perform the steps of the method for assisting programming as described above. The system for assisting programming is applicable to object-oriented programming by a programmable logic controller. With the system for assisting programming, the inclusion relationships between the associated objects are generated according to the inclusion relationships between the patterns inserted by the user into the drawing interface, such that visualization of modeling during programming by the programmable logic controller is improved. This not only implements visual modeling, but also facilitates understanding of a model by a programmer during controlling logic editing, which is favorable to improving programming efficiency and accuracy.

[0071] It should be understood that, although this specification is described based on the embodiments, not each of the embodiments discloses an independent technical solution. Such description manner of the specification is only for clarity. A person skilled in the art should consider the specification as an entirety. The technical solutions according to the embodiments may also be suitably combined to derive other embodiments that may be understood by a person skilled in the art.

[0072] A series of detailed descriptions given in this specification are merely intended to illustrate feasible embodiments of the present disclosure, instead of limiting the protection scope of the present disclosure. Any equivalent embodiments or modifications, for example, combinations, segmentations, or repetition of features, derived without departing from the spirit of the present disclosure shall fall within the protection scope of the present disclosure.

Claims

1.A method for assisting programming, applicable to object-oriented programming by a programmable logic controller, the method comprising:providing a drawing interface, the drawing interface being configured for inserting patterns by a user, wherein each of the patterns is associated with an object; andgenerating inclusion relationships between the associated objects according to inclusion relationships between the patterns inserted by the user into the drawing interface.2.The method according to claim 1, further comprising:providing predefined classes, wherein each of the predefined classes is associated with one of the patterns; andwhen the user selects one of the predefined classes to generate a corresponding object, generating an object corresponding to the selected predefined class, generating a pattern the same as a pattern associated with the selected predefined class, associating the generated pattern with the generated object, and inserting the generated pattern associated with the generated pattern into the drawing interface.3.The method according to claim 1, further comprising:when the user selects one of the predefined classes, providing an attribute editing interface which displays the attributes of the selected predefined class through natural language, wherein the displayed attributes can be edited by the user; andgenerating an object according to the attributes edited by the user, wherein the generated object corresponds to the selected predefined class.4.The method according to claim 1, further comprising:when the user draws a pattern in the drawing interface, duplicating the pattern, generating a class associated with the duplicated pattern, generating an object corresponding to the generated class, and associating the drawn pattern with the generated object.5.The method according to claim 4, further comprising:providing a programming interface, the programming interface being configured for editing an attribute and / or method of the object by the user; andwhen the user selects a drawn pattern in the drawing interface and edits the attribute and / or method in the programming interface, assigning the edited attribute and / or method to a class corresponding to an object corresponding to the selected pattern.6.The method according to claim 1, further comprising:providing a graphical programming interface, the graphical programming interface being configured for editing an attribute and / or method of the object by the user; andgenerating a building block according to the object associated with the pattern in the drawing interface, the building block being configured for selecting an object and an attribute and / or method of the selected object, and displaying the building block in the programming interface.7.The method according to claim 1, further comprising:when the user duplicates a pattern in the drawing interface, generating a new object of a same class corresponding to an object associated with the duplicated pattern, and associating the duplicated pattern with the new object.8.The method according to claim 1, wherein a tree-structured list is generated according to the inclusion relationships between the objects, and providing a presentation interface to present the tree-structured list.9.A non-transitory computer-readable storage medium storing a computer program therein, wherein the computer program, when running on a processor, causes the processor to perform the method for assisting programming as defined in any one of claims 1 to 8.10.A system for assisting programming, applicable to object-oriented programming by a programmable logic controller, the system comprising: a memory (101) and a processor (102) , wherein the memory (101) stores storing a computer program therein, and the processor (102) , when running the computer program, is caused to perform the method for assisting programming as defined in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Visual editing method and device for data association relationship, equipment and storage medium

    CN111782651A

  • Visual programming method and its system

    CN1219252A

  • Methods, systems, and computer readable media for automatically generating customizable user interfaces using programming patterns

    US20100138778A1

  • System and method for implementing proxy objects in a visual application builder framework

    US6038395A