Method and development environment for generating control program for automation system
By converting the graphical representation of a graphical programming language line by line into an intermediate text representation, the compatibility issue between graphical programming languages and version management systems is resolved, enabling effective tracking of programming progress and clear display of discrepancies and conflicts, thus simplifying the programming process.
Patent Information
- Application Number
- CN202480050551.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-09-22
- Filing Date
- 2024-09-19
- Publication Date
- 2026-03-03
AI Technical Summary
In existing technologies, the conversion of graphical programming languages into intermediate representations is incompatible with version control systems, making it impossible to effectively track programming progress and restore older versions of program code during the programming process.
By converting the graphical representation of a graphical programming language line by line into an intermediate text representation and storing it in a display file, the version management system can track programming progress and display programming differences and conflicts in both graphical and textual form.
It simplifies the programming process, reduces storage space requirements, improves the efficiency of transmitting discrepancies, enhances the traceability and understandability of the programming process, and reduces the complexity of conflict resolution.
Smart Images

Figure CN121605385A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for generating control programs for automated systems and a development environment. Background Technology
[0002] In the prior art, graphical programming languages are known for graphical programming of programmable logic controllers (PLCs) in automation technology. The IEC 61131-3 standard defines three graphical programming languages: ladder diagram, functional block diagram, and sequence diagram. These graphical programming languages allow for user-friendly graphical programming, where graphical representations of the control program to be generated for the programmable logic controller can be created by adding and / or removing predefined graphical program objects.
[0003] For graphical programming languages, the conversion of graphical representations into intermediate representations is known in the prior art. However, the known transformations in the prior art are incompatible with version control systems (VHS). VHS provide valuable support for the programming process. Versions of code to be programmed created during the programming process can be managed within a VHS. Therefore, VHS allows tracking the programming process by comparing different versions of program code that have been created. Furthermore, managing program code within a VHS makes it possible to restore older versions of the program code. Summary of the Invention
[0004] Therefore, the object of the present invention is to provide an improved method for generating control programs for automated systems and an improved development environment.
[0005] This objective is achieved through the methods and development environment of the independent claims. Preferred embodiments are specified in the dependent claims.
[0006] According to one aspect of the present invention, a computer-implemented method for generating a control program for an automated system is provided, the method comprising:
[0007] In the first conversion step, the graphical representation of the graphical programming language is converted into a text-based intermediate representation of the graphical representation using the conversion module of the development environment. The graphical representation graphically represents at least a portion of the control program of the automation system according to the graphical programming language. The text-based intermediate representation provides a textual description of the graphical representation. The first conversion step includes:
[0008] In the line-by-line transformation step, a line-by-line transformation is performed, wherein in the line-by-line transformation, each graphical program object of the graph is assigned a text program object in the form of at least one text line of text representation, wherein the graphical program object is a part of the graph and represents a program object controlling the program, and wherein the text line of the text program object provides a unique description of the corresponding graphical program object; and
[0009] In the storage step, the intermediate representation of the text is stored in the display file.
[0010] This achieves the following technical advantages: providing an improved method for control programs in programmed automation systems. The method according to the invention allows for graphical programming of the control program using graphical programming languages known in the prior art. Furthermore, the method according to the invention enables the tracking of programming progress during the graphical programming process of the control program using a version controller. For this purpose, the graphical representation programmed according to the selected graphical programming language is first converted into a text-based intermediate representation.
[0011] This conversion is performed by a conversion module in the development environment for programming control programs. The graphical representation is a graphical representation of at least a portion of the control program to be programmed according to a graphical programming language known in the prior art. The graphical representation includes at least one graphical program object. Therefore, the graphical program object is a graphical representation of at least one program object in the control program to be programmed.
[0012] The conversion module converts the graphic representation into the aforementioned text intermediate representation. The text intermediate representation is a textual representation or description of the graphic representation. The text intermediate representation includes at least one text program object corresponding to the graphic representation. A text program object is a textual representation or description of the graphic program object representing the graphic representation.
[0013] According to the present invention, a graphical representation is converted into a text intermediate representation by performing a line-by-line transformation. For this purpose, the graphical program object of the graphical representation is transformed into a corresponding text program object in the text intermediate representation. The text program object is represented by at least one text line of the line-by-line structured text intermediate representation. Each text line fully describes each text program object and the graphical program object assigned to that text program object.
[0014] The intermediate text representation created in this way is then saved in a representation file. This representation file can be read by version control systems known in the prior art. The version control system can capture information from the line-by-line intermediate text representation, thereby allowing the version control system to track and control the programming progress based on the created intermediate text representation from a graphical perspective.
[0015] Version control systems can compare text program objects written in the form of text lines representing different graphical representations based on different versions of a programmed control program, in order to determine the differences between the different text representations. The programming progress of the aforementioned control program can be determined based on the differences between the various text representations.
[0016] By converting a graphical representation programmed using a graphical programming language line by line into an intermediate text representation, all the functionality of version management systems known in the prior art can also be used for program code created using a graphical programming language. This simplifies the programming process and facilitates programming control programs using graphical programming languages.
[0017] According to one implementation scheme, the method further includes:
[0018] In the first display step, a graphical diagram is displayed in the graphical editor unit of the development environment; and / or
[0019] In the second display step, the intermediate text representation of the graphic is displayed in the text editor unit of the development environment; and
[0020] In the generation step, there is a text intermediate representation of the graphical graph based on a graphical programming language and / or a graphical graph generation control program.
[0021] This achieves the following technical advantages: By displaying graphical representations in the graphical editor unit of the development environment, or by displaying intermediate text representations in the text editor unit of the development environment, programmed program code can be provided to the user at any time in both graphical and textual forms. Therefore, users can either trace the created program code controlling the program in the form of corresponding graphical representations in the graphical editor unit, or trace the created program code controlling the program in the form of intermediate text representations in the text editor unit, or be able to check its correctness.
[0022] Then, the control program can be generated based on both the graphical representation and the textual intermediate representation. Therefore, the textual intermediate representation is not merely used as a textual form of the graphical representation, which allows for the use of version management systems known in the prior art. Additionally, the graphical intermediate representation also serves as an intermediate representation of the graphical representation required by the compilation process to generate the control program. Therefore, the additional intermediate representation, upon which the compilation of the graphical representation is based, is omitted, allowing for the simplification of the programming process.
[0023] According to one implementation scheme, the method further includes:
[0024] In the receiving step, text difference information is received from the version management system via the development environment. This difference information describes the differences between a first version and a second version of the text intermediate representation, wherein the first and second versions of the text intermediate representation are corresponding representations of a first and second version of a graphical diagram, wherein the first and second versions of the graphical diagram are created during programming based on each other or on a common base diagram, and wherein the text difference information defines at least one text program object, which is contained only in one of the two versions of the text intermediate representation; and
[0025] In the text display step, at least one text program object displays text difference information in a text editor unit of the development environment; and / or
[0026] In the difference conversion step, text difference information is converted into graphical difference information by converting at least one text program object into a corresponding graphical program object; and
[0027] In the graphics display step, at least one graphics program object displays graphics difference information in the graphics editor unit of the development environment.
[0028] This achieves the following technical advantages: it allows the display of differences between at least two versions of a text intermediate representation to the user in the development environment. For this purpose, difference information from the version control system used is taken into account. As known in the prior art regarding version control systems, difference information includes information related to the differences between two versions of the text intermediate representation managed by the version control system. In this context, different versions of the text intermediate representation represent different versions of the control program programmed using a graphical programming language. In this context, the different versions were created at different times and / or by different authors during the graphical programming process.
[0029] In the illustrated implementation, the version control system's difference information is received and read by the development environment. The difference information includes information related to at least one text program object contained in only one of the two versions.
[0030] According to the present invention, changes to the graphic representation are performed by adding or deleting graphic program objects. Correspondingly, changes to the corresponding text intermediate representation are performed by adding or removing text program objects. Therefore, the differences between different versions of the text intermediate representation are provided by adding or deleting program objects in one intermediate representation relative to a certain version of another intermediate representation.
[0031] Then, the received text difference information is displayed in the text editor unit of the development environment. For this purpose, the corresponding added or deleted text program object can be displayed as the corresponding added or deleted text program object in a version represented in the middle of the text.
[0032] Alternatively, the textual difference information can be converted into corresponding graphical difference information. For this purpose, the aforementioned text program object, which contains only the textual difference information in one of the two versions of the text representation, is converted into a corresponding graphical program object. This conversion is performed by the conversion module in the same manner as the conversion process described above.
[0033] Then, the corresponding converted graphical program objects for the graphical difference information are displayed in the graphical editor unit of the development environment. For this purpose, the graphical program objects corresponding to the graphical difference information can be integrated into one of the two versions of the graphical diagram and displayed as the corresponding deleted or added graphical program objects.
[0034] By using the version control system to display the difference information in text or graphical form, users can immediately see the differences between two versions of the control program. These differences are represented by corresponding text within the text indicating the differences between the two versions. Therefore, users can immediately see the programming progress between the two versions of the control program, presented in both graphical and textual formats. This, in turn, facilitates the programming process.
[0035] If only a few graphical program objects are changed between two versions of a graph, then only a few lines (i.e., text program objects) will be changed between the corresponding versions represented by the text. In this case, the version control system's corresponding difference information will also only include a few changed lines.
[0036] Therefore, the difference information occupies only a small amount of storage space. Thus, converting the graphical representation line by line into a text-based intermediate representation reduces the storage space required by the version control system.
[0037] Furthermore, reduced-size difference information can be transmitted more quickly via media such as the Internet.
[0038] By converting graphical representations line by line into a text-based intermediate representation, discrepancy information can be transmitted, recorded, and displayed to the user in text form.
[0039] The text difference information shows developers in a concise and clear way which graphic elements have been affected.
[0040] Difference information can also be displayed using a graphical language. This type of display is easier for developers to understand and is familiar to them.
[0041] Meta-information about imported content (such as author and creation date) can be automatically displayed in graphical representations or graphs. This information does not need to be added to the program as explicit documentation. This reduces the amount of work involved and ensures consistency with information in the version control system.
[0042] Graphical diagrams can be displayed in the user interface of the machine to be controlled. The sequential control of the machine to be controlled can be displayed using SFC language.
[0043] In the user interface, changes to the control program can be made known to the machine operator through highlighting and / or annotation.
[0044] According to one embodiment, the second version of the graphic diagram includes a creation date later than the first version of the graphic diagram, wherein at least one text program object is added or removed from the corresponding second version of the text intermediate representation compared to the first version of the text intermediate representation, and wherein, in the text difference information, the at least one text program object is identified as a text program object added to or removed from the first version of the text intermediate representation.
[0045] This achieves the following technical advantage: the differences between two different versions of the control program can be immediately displayed to the user. For this purpose, text program objects containing textual differences are marked as added or deleted text program objects in the intermediate text representation. Similarly, graphical program objects containing graphical differences are marked as added or deleted graphical program objects in the graphical representation.
[0046] By marking program objects as added or deleted text or graphical program objects, users can not only see that the two versions of the control program are different, but also immediately see the actual differences in the form of added or deleted program objects due to the corresponding markings.
[0047] According to one implementation, the text display step and / or the graphic display step include:
[0048] In the characterization step, text program objects containing textual difference information and / or graphic program objects containing graphic difference information are marked as added text program objects or added graphic program objects, or as deleted text program objects or deleted graphic program objects.
[0049] This achieves the following technical advantages: by marking added or deleted program objects, the differences between two versions of the control program can be clearly displayed in both graphical and textual forms.
[0050] According to one implementation, a text program object that is changed from a first version of the text intermediate representation to a second version is represented as a pair in the difference information. The pair consists of a deleted text program object of the first version of the text intermediate representation and an added text program object of the second version of the text intermediate representation, wherein the deleted text program object represents the original version of the modified text program object, and the added text program object represents the modified version of the modified text program object.
[0051] This achieves the following technical advantage: it allows for a clear representation of a program object that has changed between two versions of the intermediate text representation or graphical representation. For this purpose, a text program object that has changed between two versions of the intermediate text representation is represented as a pair of text lines, particularly in the intermediate text representation. This pair of text lines includes the text lines that were deleted in the first version of the intermediate text representation and in the second version of the intermediate text representation.
[0052] These two lines describe the same text program object, or a text representation of the same graphical program object. The difference between the two lines primarily concerns the actual description of the corresponding graphical program object. However, both lines ultimately represent the same graphical program object.
[0053] By deleting one line of text in the first version of the intermediate text representation and adding another line of text in the second version, where both lines refer to the same graphical program object, changes in the text description of the graphical program object and, consequently, changes to the text program object can be indicated. Therefore, this representation of changes to the text program object in the form of a pair of deleted and added lines of text allows for a clear representation of the modified text program object. Thus, users can clearly and at a glance see which text program objects have been changed in different versions of the intermediate text representation.
[0054] According to one implementation, a deleted graphical program object corresponding to a deleted text program object and / or an added graphical program object corresponding to an added text program object and / or a modified graphical program object corresponding to a modified text program object are displayed in a graphical figure as deleted graphical program objects and / or added graphical program objects and / or modified graphical program objects, or as added graphical program objects and / or modified graphical program objects.
[0055] This achieves the following technical advantages: by displaying added or deleted text program objects in the current version represented in the text, or by displaying corresponding deleted or added graphical program objects in the corresponding graphical representation, users can clearly see the changes between the two versions of the text and the corresponding changes between the two versions of the associated graphical representation. For example, the corresponding deleted or added text and graphical program objects can be color-coded, making them easily identifiable.
[0056] According to one implementation scheme, the method further includes:
[0057] The system receives text conflict information from a version control system and performs a conflict check between a first version and a second version of the intermediate text representation during the conflict checking step. The text conflict information includes text program objects assigned to the first version of the intermediate text representation and text program objects associated with the second version of the intermediate text representation.
[0058] In the conflict determination step, a conflict is determined if at least one text program object associated with a first version of the text intermediate representation and a text program object associated with a second version of the text intermediate representation are detected to have the same identifier and are modified relative to each other.
[0059] This achieves the following technical advantages: by considering text conflict information from the version management system, conflicts between two existing versions of a text intermediate representation or control program can be identified. The text conflict information includes information related to text program objects assigned to a first version and a second version of the text intermediate representation and which have been modified relative to each other.
[0060] As described above, the modified text program object is represented by a pair of text lines, where the first line is a line deleted from the first version of the text intermediate representation, and the second line in the pair is a text line inserted into the second version of the text intermediate representation. Both lines refer to the same graphical program object. Therefore, both text lines contain the same identifier for the corresponding graphical program object, but are different from or modified relative to each other.
[0061] Such conflicts may occur when multiple developers work independently on the same program code, and therefore, the two versions of the text intermediate representation are created by different developers and are based on a common version of the text intermediate representation.
[0062] By considering conflict information, if the conflict information includes a first text line assigned to a first version of the intermediate text representation and a second text line assigned to a second version of the intermediate text representation, and if the two lines have the same identifier, thus referring to the same program object, and are modified or different relative to each other, then a conflict between two existing versions of the intermediate text representation can be determined by performing a conflict resolution exercise. By considering the conflict information, conflicts between two versions of the intermediate text representation can be identified and resolved accordingly.
[0063] According to one implementation plan, the conflict detection steps include:
[0064] In the conflict conversion step, the conversion module converts text conflict information into graphical conflict information, wherein the graphical conflict information includes a graphical program object corresponding to the text program object of the text conflict information; and
[0065] The conflict is resolved by deleting at least one graphical program object corresponding to a text program object assigned to the first version of the text intermediate representation, which has the same identifier as another graphical program object corresponding to a text program object assigned to the second version of the text intermediate representation.
[0066] This achieves the following technical advantages: converting textual conflict information into graphical conflict information allows for the display or resolution of conflicts between two versions of the text representation or between two corresponding graphical versions in a graphical diagram. For this purpose, the conflict can be resolved by deleting at least one of the two graphical objects corresponding to the two textual program objects containing the textual conflict information. By deleting one of the two graphical program objects, the conflict is resolved, thus retaining only one of the two graphical program objects.
[0067] Conflicts between at least two versions of the control program can be displayed using both text and graphics. The graphical representation is familiar to developers and aids in comparison and conflict resolution.
[0068] Graphical representations allow for the automatic resolution of conflicts. This reduces the amount of work involved and lowers the likelihood of incorrect solutions.
[0069] Suppose two identical machines are controlled by the same graphical control program. By modifying different parts of the control program, a first performance characteristic can be added to the first machine and a second performance characteristic to the second machine independently. The control programs for the two machines can then be automatically merged into a single control program that includes both performance characteristics. This control program can be transferred to the two machines and / or a third machine. Therefore, control of two or three machines can be consistent, and the control of said machines includes both performance characteristics.
[0070] According to one implementation scheme, the method further includes:
[0071] In the graphical programming step, the graphical editor unit of the development environment receives graphical input commands from the development environment user, wherein the graphical input commands include programming commands for adding and / or removing graphical program objects; and / or
[0072] The reading step reads the program file, which describes the graph and the graphical program object of the graph in a textual description.
[0073] In the second conversion step, the conversion module converts the text description into a graphical representation.
[0074] This achieves the following technical advantages: the method according to the invention allows for graphical programming of the control program.
[0075] An alternative describes a scenario where a user creates or modifies a graph by entering corresponding input commands in a graph editor unit, such as adding or removing corresponding graph program objects. Then, according to the above implementation, the graph modified or newly generated through the graph programming process is converted into a corresponding intermediate text representation and displayed to the user in a text editor unit.
[0076] Subsequently, the control program to be generated is created based on the graphical representation created during the graphical programming process and / or based on the corresponding textual intermediate representation. Therefore, users can create control programs by executing the graphical programming process and generating the corresponding graphical representation according to the rules of the selected graphical programming language.
[0077] In another alternative, the graphical representation is generated based on a pre-stored program file. This describes a scenario where a graphical representation, already generated in the previous graphical programming process and stored as text in a pre-stored program file, is read from the development environment and displayed to the user in graphical form and a text-based intermediate representation within the graphical editor unit. This text-based intermediate representation is generated through a conversion process and written in a form readable by the user in the corresponding text editor unit. Based on this, the user can perform another graphical programming operation according to the above implementation scheme and modify the graphical editor unit accordingly by adding or removing graphical program objects based on the described graphical input commands.
[0078] According to one implementation scheme, the method further includes:
[0079] In the text programming step, the text editor unit of the development environment receives text input commands from the user, wherein the text input commands add or remove text program objects as text representations of the corresponding graphical program objects of the graphical graph from the intermediate text representation of the graphical graph.
[0080] In the second generation step, a modified intermediate text representation is generated based on the text input command and the intermediate text representation of the graphical graph;
[0081] In the third conversion step, the conversion module converts the modified intermediate text representation into a corresponding modified graphical representation, and / or converts the text program object of the text input command into a corresponding graphical program object;
[0082] In the third display step, a modified graphic is displayed in the graphic editor unit instead of the graphic and / or a graphic program object converted from a text program object of a text input command in the graphic is displayed as the modified graphic.
[0083] In the generation step, a control program is generated based on a modified intermediate text representation of the modified graphical representation and / or based on the modified graphical representation; and
[0084] In the fourth display step, the modified intermediate text representation of the modified graphic is displayed in the text editor unit.
[0085] This achieves the following technical advantages: using the described method, users of the development environment can modify existing graphical representations based on text intermediate representations by performing text programming operations, thereby considering the text editor unit. Therefore, users can change the text intermediate representation of the graphical representation displayed in the text editor unit by performing text programming operations and thereby creating a modified text intermediate representation. For this purpose, users can input corresponding input commands into the text editor unit to modify the displayed text intermediate representation. Text input commands include adding or removing text program objects from the text intermediate representation. According to the invention, a text program object is a textual representation of a graphical program object of a graphical representation. Graphical program objects are predefined by the rules of a selected graphical programming language.
[0086] When the intermediate text representation is changed during text programming, the text editor unit receives the corresponding text input command from the user and modifies the intermediate text representation displayed in the text editor unit accordingly. This generates a modified intermediate text representation.
[0087] The conversion module then converts the modified text intermediate representation and generates a corresponding modified graphic. The graphic is then displayed to the user in the graphics editor unit.
[0088] Therefore, users can modify the graphical input commands previously executed during the graphical programming process or the graphical diagrams generated based on the program file by performing the text programming process in the text editor unit, and generate the modified intermediate text representation and the corresponding modified graphical diagram based on this.
[0089] The modified graphical representation and the modified text intermediate representation represent the graphical and textual equivalents of the same control program to be generated. This also applies to the graphical representation and the corresponding text intermediate representation described above.
[0090] Therefore, embodiments of the method according to the invention provide users with the option to generate control programs in a selected graphical programming language during both graphical and text-based programming processes. Users can switch between graphical and text-based programming as needed, because changes made in the graphical editor unit are immediately transmitted to the corresponding text intermediate representation, and conversely, changes made in the text intermediate representation are immediately reflected in the corresponding graphical representation. Thus, regardless of which editor unit the user makes changes in, the graphical representation and the text intermediate representation always clearly correspond to each other.
[0091] This further simplifies the programming process. Some programming tasks are easier to perform in the graphical editor unit, while others are easier to complete via text. For example, using copy and paste to multiply program objects in a text-based representation is much easier than in a graphical diagram, where each graphical program object must be multiplied individually and linked to existing graphical program objects.
[0092] Additionally, the resulting control program can be simplified by incorporating text programming (as appropriate) within the text editor unit to generate a simplified graphical representation, which can result in a simplified control program with reduced runtime and computational power.
[0093] In addition, the following technical advantages can be achieved: by displaying the intermediate text representation modified during the text programming process in the text editor unit, users can immediately identify errors or defects in the modified graphics corresponding to the modified intermediate text representation based on the displayed modified intermediate text representation.
[0094] According to one implementation plan, the first conversion step also includes:
[0095] In the behavior determination step, the graphical program object, the graphical behavior of the graphical diagram, and at least one behavior location are determined, wherein the graphical behavior describes a graphical representation of the program sequence of the control program, and wherein the behavior location defines the location where the behavior of the control program is to be located as predefined in the program code by the IEC61131-3 standard.
[0096] In the behavior conversion step, the graphical behavior of the graphical program object and the graphical graph is converted into the text behavior of the text program object and the text intermediate representation, wherein the text behavior represents the text intermediate representation of the sequence of control programs; and
[0097] In the placement step, the text behavior is placed at the behavior position within the middle representation of the text.
[0098] This achieves the following technical advantages: by considering graphical behavior within the intermediate text representation, the intermediate text representation provides an executable representation of the graphical graph. By arranging the corresponding generated text behaviors (the corresponding text representations of the graphical behaviors) within the intermediate text representation at the behavior locations specified for this purpose in the IEC 61131-3 standard, the code provided by the intermediate text representation conforms to the requirements of the IEC 61131-3 standard.
[0099] Graphical behaviors describe the program sequence of a graphical diagram. A graphical diagram can represent functions, methods, function blocks, or program segments with multiple functions, methods, and / or function blocks. Graphical behaviors describe the order of functions, methods, or function blocks. According to the present invention, text behaviors represent textual descriptions of graphical behaviors. The readable representation of the text intermediate allows users to immediately view the text behaviors. By arranging text behaviors within the text intermediate representation at the positions specified for the behaviors, users can immediately identify the text behaviors. This contributes to the readability of the text intermediate representation.
[0100] In the context of applications, behavior describes the functionality or operational patterns of a program. Behavior includes, for example, a program that calculates the result of a function based on its parameters.
[0101] In the context of an application, a behavior location defines the point in the program code where a particular behavior must occur. Behavior locations are defined by the specifications of the corresponding programming language. In the field of automation and the programming languages used, behavior locations can be defined in the IEC 61131-3 standard.
[0102] According to one implementation plan, the first conversion step also includes:
[0103] In the identifier determination step, an identifier for a graphical program object in the drawing is determined, wherein the identifier of the graphical program object allows for unique identification of the corresponding graphical program object; and
[0104] In the integration step, the identifiers of the graphical program objects are integrated into the corresponding text program objects in the text intermediate representation. These text program objects are assigned to the graphical program objects and written in text lines.
[0105] This approach offers the following technical advantages: Identifying the identifiers of graphical program objects and integrating these identifiers into their corresponding text program objects ensures a unique correspondence between the graphical program objects in the graph and the text program objects in the intermediate text representation. Furthermore, integrating the identifiers of graphical program objects into their corresponding text program objects ensures that the links between graphical program objects in the graph are correctly considered within the text program objects in the intermediate text representation. By explicitly specifying the identifiers in the text program objects (which not only identify the corresponding text program objects but also display links to other text program objects), users can easily determine the correctness of the intermediate text representation relative to the graph by viewing the intermediate text representation displayed in the text editor unit. This, in turn, facilitates the verification of the correctness of the intermediate text representation, which in turn aids the programming process and can lead to improved control procedures.
[0106] According to one implementation, a graphical program object includes graphically representable metadata, wherein the metadata includes at least one of the following: author, creation date, and version of the graphical representation.
[0107] This offers the following technical advantages: Additional user-visible information about the creation of the graph or the associated text intermediate representation can be provided within the graph. Since the metadata is directly visible to the user on the corresponding graphical program objects within the graph, the user can immediately read the metadata and draw conclusions about the graph's creation simply by viewing the graph. Furthermore, the user can directly see which version of the graph or text intermediate representation the corresponding graphical program object originates from. This allows the user to directly read the programming progress from the graph.
[0108] According to one implementation, the identifier of the linked graphical program object is integrated into the corresponding text program object of the linked graphical program object.
[0109] This achieves the following technical advantages: integrating the identifiers into the corresponding text lines of linked graphical program objects allows for clear structuring and arrangement of text lines within the intermediate text representation. The integrated identifiers also allow users to directly view the structure of the graphical diagram. Each link is immediately visible. Furthermore, the identifiers can be used to arrange text lines in the intermediate text representation based on the identifiers.
[0110] According to one implementation scheme, the method further includes:
[0111] In the summarization step, the text intermediate representation of a graphic is combined with at least one other intermediate representation of at least one other graphic to form a total text intermediate representation, wherein in the total intermediate representation, multiple different text intermediate representations of multiple different graphics are combined to form a coherent code in text form.
[0112] This approach offers the following technical advantages: the entire control program's coherent code can be provided in the form of a unified text intermediate representation. The individual executable objects of the control program can be represented or programmed using different graphical representations or different graphical programming languages (depending on the situation). The corresponding text intermediate representations can be combined into a unified text intermediate representation. This means that only one coherent code, presented as a unified text intermediate representation, is needed to represent the entire control program.
[0113] Users can also read the overall text intermediate representation as coherent text. Therefore, the entire control program is stored in a common file and is accessible to users in a readable form. The behavior of the corresponding graphical representations is arranged within the overall text intermediate representation according to the behavioral positions specified by the IEC 61131-3 standard. Thus, the overall text intermediate representation provides a textual form of an executable control program that conforms to the requirements of the IEC 61131-3 standard.
[0114] According to one implementation plan, the generation steps include:
[0115] In the debugging process, the text-based representation of the graphical representation indicates the execution of the debugging process; and / or
[0116] In the binary code generation step, a binary representation of the control program is generated.
[0117] This approach offers the following technical advantages: it allows for the debugging of the generated control program directly based on the intermediate text representation of the graphical representation. Therefore, the intermediate text representation is not merely a textual representation of the graphical representation that can be displayed to the user in a text editor unit for correction purposes. The intermediate text representation can also be directly used as the basis for further compilation of the control program. On the other hand, the graphical representation is simply a graphical representation of the intermediate text representation, which can be displayed to the user in a graphical editor unit and modified by the user using graphical programming processes of graphical programming languages known in the prior art. Furthermore, the intermediate text representation is the decisive representation for generating the control program during the compilation process.
[0118] In addition, the following technical advantages can be achieved: the binary representation of the control program provides an executable representation of the control program.
[0119] According to one implementation scheme, the graphical programming language is one of the following: touch point planning, function block language, or sequential language.
[0120] This achieves the following technical advantages: the method according to the invention can be applied to graphical programming languages commonly used in automation technology and defined in the IEC 61131-3 standard.
[0121] According to one implementation, the syntax of the text intermediate representation and the modified text intermediate representation does not conflict with the syntax of the graphics programming language.
[0122] This achieves the following technical advantages: the syntax of the text intermediate representation does not conflict with the syntax of the graphics programming language, enabling the provision of a clear text intermediate representation that can be reliably used for programming control programs based on the graphics programming language.
[0123] According to one aspect, the development environment includes a graphical editor unit, a text editor unit, and a conversion module, wherein the development environment is configured to execute a method for generating a control program for an automated system according to one of the foregoing implementation schemes.
[0124] This provides the following technical advantages: an improved development environment configured to execute the method according to the invention for generating control programs for automated systems with the aforementioned technical advantages. Attached Figure Description
[0125] The invention is described in more detail with reference to the accompanying drawings, in which:
[0126] Figure 1 A schematic diagram of a system for generating control programs for an automated system, according to one embodiment, is shown.
[0127] Figure 2 Another schematic diagram of a system for generating control programs for an automated system, according to yet another embodiment, is shown;
[0128] Figure 3 A graphical depiction of the steps of a method for generating a control program for an automated system according to one embodiment;
[0129] Figure 4 This is yet another graphical representation of other steps in a method for generating a control program for an automated system according to one embodiment;
[0130] Figure 5 A flowchart is shown for a method for generating a control program for an automated system according to one embodiment;
[0131] Figure 6 A further flowchart of a method for generating control programs for an automated system, according to yet another embodiment, is shown; and
[0132] Figure 7 This is yet another flowchart of a method for generating control programs for an automated system, according to yet another implementation scheme. Detailed Implementation
[0133] Figure 1A schematic representation of a system for generating a control program 209 for an automated system, according to one embodiment, is shown.
[0134] According to the present invention, a development environment 200 suitable for performing the method of generating a control program 209 for an automated system according to the present invention includes a graphical editor unit 201, a text editor unit 203, and a conversion module 205.
[0135] The graphics editor unit 201 is implemented to perform graphics programming operations according to a graphics programming language known in the prior art. The graphics editor unit 201 may have all the input devices and display devices known in the prior art for performing graphics programming operations.
[0136] The text editor unit 203 is implemented for a text programming process. For this purpose, the text editor unit 203 may include all display devices and input devices known in the prior art for performing a text programming process.
[0137] According to the present invention, the conversion module 205 is implemented to convert the conversion process between the graphic representations 211 of the predefined graphical programming language displayed or generated in the graphical editor unit 201 into the corresponding text intermediate representation 213. Additionally, the conversion module 205 is configured to perform a reverse conversion, wherein the text intermediate representation 213 displayed or generated in the text editor unit 203 is converted into the corresponding graphic representation 211 of the previously selected graphical programming language.
[0138] According to one embodiment, the graphical programming languages considered in the method according to the invention or in the development environment 200 according to the invention include language contact schemes, function block languages and sequential languages, each of which is predefined in the IEC 61131-3 standard for automation technology.
[0139] Therefore, the conversion module 205 can convert the above programming language into a text intermediate representation 213.
[0140] According to the present invention, the intermediate text representation 213 is written in a user-readable form. The intermediate text representation 213 is written in a form based on a known and readable language, such as English, German, Spanish, Mandarin, or similar universal languages. The letters, terms, or characters / special characters used are all derived from the aforementioned natural languages. Furthermore, the intermediate text representation 213 is displayed as lines and can be read from top left to bottom right within the display field of the text editor unit 203, or following another generally accepted readability convention.
[0141] In addition to the components shown in the figure, the development environment 200 may also include other components required to control the compilation or programming process of the program, but for clarity, these components are not shown in this representation. These components may include input or output interfaces, compilers, debugging modules, and other programming components known in the art.
[0142] In order to execute the method for generating a control program for an automated system according to the present invention, the conversion module 205 first converts the graphic figure 211 into a corresponding text intermediate representation 213.
[0143] Graphical figure 211 is a graphical representation of at least a portion of the control program 209 to be programmed. Graphical figure 211 includes at least one graphical program object 217. Graphical program object 217 represents a graphical representation of program object 219 of control program 209.
[0144] Figure 211 represents at least one executable structure of the control program 209, such as a function, method, or function block.
[0145] The conversion module 205 converts the graphic 211 to generate a text intermediate representation 213. The text intermediate representation 213 represents a text description of the graphic 211 and includes at least one text program object 225.
[0146] Text program object 225 corresponds to graphical program object 217 in graphic figure 211 and represents a textual description of graphical program object 217. Text program object 225 includes at least one description of the type and function of graphical program object 217. The type or operating mode of graphical program object 217 is defined by the IEC 61131-3 standard.
[0147] If graphic diagram 211 includes multiple connected graphic program objects 217, such as Figure 1 As shown, the corresponding text program object 225 also includes information related to connecting other text program objects 225.
[0148] According to the present invention, the conversion of the graphic representation 211 into a text intermediate representation 213 is performed line by line. In this process, each graphic program object 217 is assigned a corresponding text program object 225. The text program object 225 is represented by at least one text line 241 of the text intermediate representation 213. Preferably, the text program object 225 is typically represented by exactly one text line 241 of the text intermediate representation 213.
[0149] Therefore, the number of the corresponding generated intermediate text representation 213, based on the number of graphical program objects 217 of the graphic diagram 211, includes multiple text program objects 225 written as text lines 241.
[0150] exist Figure 1 In the example shown, graph 211 includes five graphics program objects 217. The five graphics program objects 217 include three node objects 249, each of which is interconnected via two edge objects 251.
[0151] The graphical diagram 211 shown in this context is only one example of a possible graphical diagram 211 for programming language touchpoint plans, function block languages, and sequential languages.
[0152] In a graphic diagram 211 having multiple graphic program objects 217, each graphic program object 217 has an identifier 243. The graphic program object 217 can be uniquely identified by the identifier 243. For example, the identifier 243 can be represented as a sequence of characters and / or numbers.
[0153] When the graphic representation 211 is converted to the intermediate text representation 213, the identifier 243 of the graphic program object 217 is integrated into the corresponding text program object 225. For this purpose, the identifier 243 is integrated into the text line 241 of the text program object 225. This allows for a unique assignment between the graphic object 217 and the corresponding text program object 225.
[0154] In the case of linked graphical program objects 217, in addition to including the identifier 243 of the corresponding graphical program object 217, the text program object 225 may also include the identifier 243 of the graphical program object 217 linked to the corresponding graphical program object 217. Thus, the user can directly read the links between various graphical program objects 217 from the text intermediate representation 213 using the identifier 243.
[0155] The text program object 225, represented in the form of text lines 241, can be arranged in the middle text representation 213 according to the corresponding identifier 243 of the graphic program object 217 integrated into the text program object 225.
[0156] In addition to information about the type and / or function of the corresponding graphical program object 217, the corresponding text program object 225 may also contain additional information.
[0157] For example, the position information of the graphics program object 217 can be integrated into the text program object 225. The position information describes the position information related to the location of the corresponding graphics program object 217 of the graphics diagram 211 in the display device of the graphics editor unit 201. The position information may include, for example, x and y coordinates.
[0158] In addition to position information, size information may also be included, which defines the size of the corresponding graphics program object 217 within the display device of the graphics editor unit 201 via x and y coordinates.
[0159] For example, position or size information specifically related to the graphical representation of the graphical program object 217 in the graphical editor unit 201 can be defined separately by the manufacturer.
[0160] According to the present invention, the corresponding generated intermediate text representation 213 is stored in the representation file 245.
[0161] The text intermediate representation 213 stored in the representation file 245 includes a plurality of text program objects 225 formed as text lines 241, which can be read by the version management system 207. Therefore, the control program 209 generated by the method for generating control programs according to the present invention and created according to a graphical programming language can be managed in the version management system 207 in the form of the corresponding text intermediate representation 213.
[0162] In an embodiment not shown herein, text lines 241 of the intermediate text representation 213 may be read into the version control system 207. This allows the version control system 207 to determine the variations between different versions of the intermediate text representation 213 uploaded to the version control system 207. The different versions of the intermediate text representation 213 describe different versions of the graphical representation 211, which in turn describe different versions of the control program 209.
[0163] According to one implementation plan, the development environment 200 can also receive text difference information 235.
[0164] According to the present invention, the intermediate text representation 213 is written in a readable form. The representation file 245 including the intermediate text representation 213 is stored in a format readable by the version management system 207.
[0165] According to one implementation, development environment 200 is configured to receive diff information 235 from version management system 207. Diff information 235 provides textual information describing the differences between a first and second version of text intermediate representation 213. The two versions of text intermediate representation 213 describe the program code of the control program to be generated, and may, for example, be written at different times or by different authors. Therefore, text diff information 235 allows version management system 207 to display, in a compact form, the differences between different versions of text intermediate representation 213 written at different times or by different authors. Thus, text diff information 235 provided by version management system 207 allows for the generation and tracking of the programming progress of control program 209 based on different versions of text intermediate representation 213 loaded into version management system 207.
[0166] As described above, the text intermediate representation 213 is generated by performing graphical programming operations using a graphical programming language. Different text intermediate representations 213 that describe common program code and are therefore based on a common graphical graph 211 differ in at least one text program object 225, which corresponds to a corresponding graphical program object 217 of the associated graphical graph 211, and is contained only in one of the two versions of the text intermediate representation 213.
[0167] To modify the graphical representation 211 during graphical programming, a graphical program object 217 can be added to or removed from the existing graphical representation 211. The newly added graphical program object 217 can be a new graphical program object 217 or a modified graphical program object 217. Therefore, the intermediate text representation 213 generated from the graphical representation 211 by means of the conversion process can be changed by adding or removing the corresponding text program object 225. Thus, the text difference information 235 includes at least one text program object 225 contained only in one of the two versions of the intermediate text representation 213. It is assumed here that the two versions of the intermediate text representation 213 represent a common control program.
[0168] In this application, changes to graphic and / or text program objects 217 and 225 include deleting the graphic and / or text program objects 217 and 225 to be changed and adding the corresponding changed graphic and / or text program objects 217 and 225. This also applies to other items to be changed in this application.
[0169] The development environment 200 is also configured to display text difference information 235 in one of two versions of the intermediate text representation 213 within the text editor unit 203. The corresponding deleted or added text program objects 225 can be displayed as deleted or added text program objects 217 with corresponding markers in one or both versions of the intermediate text representation 213 within the text editor unit 203. The deleted or added text program objects 225 can be marked, for example, using colors or graphics in the form of shading or other graphic markers.
[0170] Therefore, the corresponding deleted or added text program object 225 in the text difference information 235 can be displayed together with the corresponding version of the text intermediate representation 213 in one or both versions of the text intermediate representation 213 within the text editor unit 203. Thus, the text program object 225 in the text difference information 235 can be displayed with corresponding markers in the corresponding version of the text intermediate representation 213 inserted in the text editor unit 203.
[0171] Alternatively, the added or deleted text program object 225 of the text difference information 235 can be displayed independently in the text editor unit 203.
[0172] In another implementation, the text program object 225 with added or deleted text difference information 235 can be converted into a corresponding graphic program object 217 with added or deleted text difference information 235, thereby generating corresponding graphic difference information.
[0173] Then, the graphical program objects 265 and 267 with added or deleted graphical difference information can be displayed graphically in a version of the associated graphical diagram 211 corresponding to the text intermediate representation 213 in the graphical editor unit 201.
[0174] Similar to the deleted or added text program object 225, the corresponding deleted or added graphic program object 217 can be displayed using appropriate graphics or color markings. The added or deleted graphic program object 217 containing graphic difference information can be displayed in one or both versions of the graphic diagram 211 in the graphic editor unit 201 in a manner similar to that described above. The deleted or added graphic program object 217 can be integrated into the corresponding version of the graphic diagram 211. Alternatively, or additionally, the deleted or added graphic program object 217 containing graphic difference information can be displayed separately in the graphic editor unit 201.
[0175] By considering the textual difference information 235 or the corresponding graphical difference information, the user can immediately see the corresponding added or deleted text program objects 225 or graphical program objects 217. The corresponding color or graphical marker immediately indicates to the user whether the text or graphical program objects 225, 217 have been deleted or added. For example, this can be indicated to the user using the identifier 243 of the graphical or text program objects 217, 225. The user can thus clearly see the programming progress, i.e., the differences between two versions of the program code.
[0176] The two versions of text intermediate representation 213 can be based on each other, where, for example, the first version was created at an earlier point in time than the second version. For example, the change between the two versions can be represented by inserting modified text program objects 217, specifically by using a pair of text program objects, where the pair includes a deleted text program object and an added text program object. In this context, this pair can be identified based on the identifier 243 of the corresponding text program object 225.
[0177] The deleted text program object 225 is removed from the first version of the text intermediate representation 213, while the added text program object 225 is added to the second version of the text intermediate representation 213. These two program objects (the deleted and added program objects 225) describe the same program object 219 of the control program 209, respectively, under the same identifier 243 and based on the same graphical program object 217 of graphical diagram 211. The added text program object 217 represents a change to the original text program object 217, namely, the text program object 225 deleted from the first version of the text intermediate representation 213.
[0178] According to another implementation, the development environment 200 is also configured to receive text conflict information 269 from the version management system 207. The text conflict information 269 describes a possible conflict between two versions of the text intermediate representation 213. A conflict may occur between the versions of the text intermediate representation 213 if a text program object 225 is assigned to the first version of the text intermediate representation 213 and another text program object 225 is assigned to the second version of the text intermediate representation 213. The two program objects 225, in the sense of having the same identifier 243, and based on the same graphical program object 217 of the graphical diagram 211, each describe the same program object 219 of the control program 209. Therefore, the two text program objects 225 and their corresponding graphical program objects 217 have the same identifier 243, but are modified or different relative to each other.
[0179] The development environment 200 is also configured to determine corresponding conflicts between two versions of the intermediate text representation 213 based on text conflict information 269. For this purpose, a corresponding conflict check is performed, and if the text conflict information 269 lists a pair of text program objects 217 that both have the same identifier 243 as the corresponding graphical program object 217, but one is assigned to the first version of the intermediate text representation 213 while the other text program object 225 is assigned to the corresponding second version of the intermediate text representation 213, then an existing conflict between the two versions of the intermediate text representation 213 is determined.
[0180] For example, a corresponding conflict may occur in the modified text program object 225, as described above, which consists of a pair of deleted text program objects 225 and added text program objects 225, each of which refers to the same graphics program object 217.
[0181] Two versions of the text intermediate representation 213 can be edited and modified by two different developers. A corresponding version of the text intermediate representation 213 can be based on a common text intermediate representation 213, with the version of the text intermediate representation 213 modified relative to that common text intermediate representation. The modified text program objects 225 have the same identifier 243, but are defined differently from each other.
[0182] According to another embodiment, text conflict information 269 can be converted into graphic conflict information. In this context, the corresponding text program object 225 of text conflict information 269 is converted into the corresponding graphic program object 217.
[0183] Then, the corresponding generated graphic conflict information 271 can be displayed in the graphic editor unit 201.
[0184] The conflict can then be resolved by deleting one of the two versions of the graphic representation 213 or graphic diagram 211, either the text or the graphic program object 217, 225.
[0185] To generate the graphical diagram 211, the method for generating the control program for the automated system also includes taking into account graphical input commands 215 entered by the user into the development environment 200 during the graphical programming process, and / or information from the program file 221 used to create the graphical diagram 211.
[0186] The graphic 211 is stored in the program file 221 in text form. By reading the information from the program file 221, the development environment 200 allows the graphics editor unit 201 to generate the corresponding graphic 211 based on the information in the program file 221, and display it to the user in the graphics editor unit 201.
[0187] This alternative describes a situation where an existing graphical representation 211 stored in program file 221 is loaded by development environment 200 and displayed to the user in graphical editor unit 201 for further processing.
[0188] According to another alternative, the aforementioned graphical input command 215 can be used to generate graphical representation 211. Graphical input command 215 is a programming command sent by the user of development environment 200 to graphical editor unit 201 during graphical programming. For example, graphical input command 215 may include adding or removing graphical program objects 217 from graphical representation 211.
[0189] This alternative describes a situation where, during a graphical programming process performed by a user of the development environment 200 within the graphical editor unit 201, the graphical diagram 211 is modified or completely regenerated.
[0190] The invention also includes a combination of two alternatives, for example, an existing graphic 211 stored in program file 221 in text form is first uploaded to the graphics editor unit 201 by reading information from program file 221, and then displayed to the user in the graphics editor unit 201 for further processing.
[0191] By executing a graphical programming process, in which the user sends graphical input commands 215 to the graphical editor unit 201 in the form of adding or removing graphical program objects 217 from the graphical graph 211, the graphical graph previously loaded into the graphical editor unit 201 is modified or further developed based on information in the program file 221.
[0192] Based on the graphical input command 215 and / or the information in the program file 221, the graphical editor unit 201 then generates the graphical diagram 211.
[0193] According to one implementation, the graphic 211 generated in this way can also be displayed in the graphics editor unit 201.
[0194] Similarly, the intermediate text representation 213 generated by transforming the graphic 211 can be displayed in the text editor unit 203.
[0195] This allows users to detect and, if necessary, correct errors in Figure 211.
[0196] Then, control program 209 can be generated based on both graphical representation 211 and / or textual intermediate representation 213.
[0197] According to one implementation, in order to convert graphic representation 211 into text intermediate representation 213, the graphic program object 217 and graphic behavior 233 of graphic representation 211 and the behavior position 239 of graphic behavior 233 are first determined.
[0198] Graphical behavior 233 describes the program flow of graphical diagram 211. On the other hand, behavior location 239 describes the location in the program code where the corresponding behavior predefined in the IEC 61131-3 standard should be placed.
[0199] Graphical behavior can be determined by considering the volatile representation of the graphic 211. As is known in the prior art, the graphic 211, written in a graphics programming language, is represented in a volatile representation. This volatile representation is not permanently stored in memory, but exists only in the working memory of the computer executing the development environment 200, when the graphic is created or displayed in the graphics editor unit 201. The volatile representation is provided in the form of a bit sequence and represents the various components of the graphic 211, including the graphics program object 217 representing the graphical behavior.
[0200] By reading the volatile representation, development environment 200 can identify graphical program objects 217 and graphical behavior. Reading also allows determination of the position and size information of the graphical graph 211 and the graphical program objects 217 contained therein. The position and size information describes the position and size of each component (i.e., the graphical program objects 217) displayed in the graphical editor unit 201.
[0201] Considering the variability of the graphical representation 211, the corresponding intermediate text representation 213 (including text program object 225 and text behavior 237) can be derived from the graphical representation 211.
[0202] According to one implementation, after generating a text intermediate representation 213 based on a graphical representation 211 and / or a text intermediate representation 213 and displaying the text intermediate representation 213 in a text editor unit 203, a control program 209 represented by the graphical representation 211 and the text intermediate representation 213 is generated.
[0203] For this purpose, according to one implementation, a debugging process based on the text intermediate representation 213 can be performed first. For this purpose, the development environment 200 may include components configured to perform the debugging process, such as in the form of a compiler.
[0204] According to one implementation, control program 209 is generated in binary representation. The binary representation can then be stored in representation file 245.
[0205] Figure 2 Another schematic diagram of a system for generating control program 209 for an automated system, according to yet another embodiment, is shown.
[0206] Figure 2 The implementation plan in the document is based on Figure 1 The implementation scheme described herein, including all features described therein. Unless Figure 2 These changes were made in the implementation plan, otherwise they would not need to be described in detail.
[0207] In the illustrated implementation, development environment 200 provides users with the option of a text programming process. The text programming process is performed on a text intermediate representation 213. Therefore, the text programming process allows users to modify... Figure 1 The text intermediate representation 213 is generated by adding or removing text program objects 225 from the text intermediate representation 213, and a modified text intermediate representation 227 is generated.
[0208] For this purpose, the text editor unit 203 receives the corresponding text input command 223. The text input command 223 describes the programming commands entered by the user during the text programming process, by which text program objects 225 can be added or removed. The text input command 223 may depend individually on the language used to represent the text intermediate representation 213 or the modified text intermediate representation 227 or the text program object 225, and the corresponding text descriptions of the graphical program objects 217 in the text program object 225.
[0209] The syntax of text intermediate representation 213 or the modified text intermediate representation 227 corresponds to the syntax of the predefined graphical programming language in the aforementioned standard IEC 61131 / 3.
[0210] In the illustrated implementation, based on the user's text input command 223... Figure 1 The modifications made to the text in the middle of 213 include the addition of two other text program objects 247. The two other text program objects 247 are represented in text form by the text line 241 according to the above attributes, based on the original text program object 225.
[0211] The conversion process is performed by conversion module 205, generating a corresponding modified graphic diagram 231 from the modified text intermediate representation 227. In the modified graphic diagram 231, two other graphics program objects 229 are integrated according to the modified text intermediate representation 227. In the illustrated embodiment, the two other graphics program objects 229 are connected to graphics program object 217 to form a coherent graphic diagram.
[0212] In the illustrated implementation, the user can thus modify the previously generated graphical representation 217 by performing corresponding text-based programming operations. Therefore, the user can generate a control program 209 based on a previously selected graphical programming language, which can be accessed by executing operations such as... Figure 1 The aforementioned graphical programming operations can also be performed by executing, for example... Figure 2 The text-based programming operations shown are illustrated.
[0213] Therefore, users can freely choose the most convenient programming method and switch between various text and graphical programming operations during programming. Changes made during a programming process are immediately displayed in another representation via conversion. Changes made in graphical representation 211 are immediately displayed in text intermediate representation 213 or modified text intermediate representation 227 via conversion. Similarly, changes made in text intermediate representation 213 or modified text intermediate representation 227 are immediately displayed in graphical representation 211 or modified graphical representation 231 after conversion.
[0214] Newly added or deleted graphical program objects 217 in graphical figure 211 are correspondingly displayed as newly added or deleted text program objects 225 in the text intermediate representation 213, or are integrated into or removed from it.
[0215] Figure 3 A graphical depiction of the steps of a method 100 for generating a control program 209 for an automated system according to one embodiment is shown.
[0216] Figure 3 The diagram graphically illustrates how the development environment 200 considers the difference information 235 of the version management system 207. The difference information 235 includes information related to the differences between the first version 253 of the intermediate text representation 213 and the second version 255 of the intermediate text representation 213.
[0217] Figure a) shows a first version 253 of the text intermediate representation 213, Figure b) shows the text difference information 235, and Figure c) shows a second version 255 of the text intermediate representation 213.
[0218] In the first version 253 of the text middle representation 213, five text program objects 225 are shown as examples in the following form: first text program object 293, second text program object 295, third text program object 297, fourth text program object 299 and fifth text program object 301.
[0219] The second version 255 of the text intermediate representation 213 also includes five text program objects 225 in the following form: the sixth text program object 303, the fourth text program object 299, the fifth text program object 301, the seventh text program object 305 and the eighth text program object 307.
[0220] Text difference information 235 shows the differences between the first version 253 and the second version 255 of the text intermediate representation 213 in text form. In the illustrated embodiment, each text program object 225 of the first version 253 and the second version 255 of the text intermediate representation 213 is represented by a corresponding identifier ID1, ID2, ID3, ID4, ID5, ID6. Furthermore, the illustrated text program objects 225 are indicated by plus or minus signs, showing deleted or added text program objects 261, 263. Therefore, text difference information 235 is used to achieve the transition from the first version 253 of the text intermediate representation 213 to the second version 255 of the text intermediate representation 213 in the opposite direction.
[0221] The first text object 293 describes the first node object 273 of the graphic diagram 211. The second text object 295 describes the second node object 275, the fourth text object 299 describes the third node object 277, the third text object 297 describes the edge object 283 between the first node object 273 and the second node object 275, and the fifth text object 301 describes the edge object 285 between the first node object 273 and the third node object 277. The sixth text object 303 describes the fourth node object 279, and the seventh text object 305 describes the fifth node object 281. The eighth text object 307 describes the edge object 287 between the third node object 277 and the fifth node object 281.
[0222] and Figure 1 The implementation scheme is similar, and the text program object 225 of the first version 253 and the second version 255 of the text intermediate representation 213 has the identifier 243 of the corresponding graphic program object 217.
[0223] The first text program object 293 includes a first identifier ID1, the second text program object 295 includes a second identifier ID2, the third text program object 297 includes a third identifier ID3, the fourth text program object 299 includes a fifth identifier ID5, the sixth text program object 303 includes a sixth identifier ID6, the seventh text program object 305 includes a seventh identifier ID7, and the eighth text program object includes an eighth identifier ID8. Identifier 243 identifies the corresponding graphic program object 217 in graphic figure 211 referenced by text program object 225.
[0224] According to the present invention, the text program object 225 is represented by text lines 241 in the first version 253 and the second version 255 of the text intermediate representation 213.
[0225] In the first version 253 of the text intermediate representation 213, the first text program object 293, the second text program object 295, and the third text program object 297 are each marked as deleted text program objects 263. Therefore, the first to third text program objects 293, 295, and 297 are not listed in the second version 255 of the text intermediate representation 213 in the form of the first version 253 of the text intermediate representation 213.
[0226] On the other hand, the fourth text program object 299 and the fifth text program object 301 are transferred unchanged to the second version 255 of the text intermediate representation 213.
[0227] On the other hand, the seventh text program object 305 and the eighth text program object 307 represent text program objects 265 that have been added to the second version 255 of the text intermediate representation 213 (compared to the first version 253 of the text intermediate representation 213).
[0228] The sixth text program object 303 represents a text program object that has been modified in the second version 255 of the text intermediate representation 213 (compared to the first version 253 of the text intermediate representation 213). The sixth text program object 303 is based on the first text program object 293. Its characteristic is that the first identifier ID1 of the first text program object 293 has the same value as the sixth identifier ID6 of the sixth text program object 303.
[0229] The first text program object 293 and the sixth text program object 303 represent a pair, which consists of the deleted text program object 263 and the added text program object 261. The sixth text program object 303, which was newly added in the second version 255 of the text intermediate representation 213, is here modified relative to the first text program object 293 of the first version 253 of the text intermediate representation 213.
[0230] Figures d) to g) illustrate graphical diagram 211, representing different stages of the transition between a first version 253 and a second version 255 of the text intermediate representation 213. Graphical diagram 211 in Figure d) describes the first version 253 of the text intermediate representation 213. Graphical diagram 211 in Figure d) includes a first node object 273, a second node object 275, and a third node object 277. The first node object 273 and the second node object 275 are interconnected via edge objects 283. The first node object 273 and the third node object 277 are interconnected via edge objects 285. Graphical diagram 211 in Figure d) illustrates the first version 257 of graphical diagram 211.
[0231] On the other hand, graphic diagram 211 in Figure g) describes a second version 255 of the text intermediate representation 213, and therefore represents a second version 259 of graphic diagram 211. Thus, graphic diagram 211 includes a fourth node object 279, a third node object 277, and a fifth node object 281. The fourth node object 279 is connected to the third node object 277 via an edge object 285. The third node object 277 is connected to the fifth node object 281 via an edge object 287.
[0232] Figures e) and f) now illustrate the steps for creating a second version 259 of graphic graph 211 from a first version 257 of graphic graph 211. In figure e), relative to the first version 257 of graphic graph 211, a fifth node object 281 is first added and connected to a third node object 277 via an edge object 287.
[0233] In graph e), the first node object 273 is marked as a deleted graphics program object 267. The same applies to the second node object 275, which is also marked as a deleted graphics program object 267. Additionally, the fifth node object 281 and the edge object 287 are marked as the corresponding added graphics program objects 265.
[0234] In graph f), compared to graph e), the first node object 273 is replaced by the fourth node object 279. The fourth node object 279 is connected to the second node object 275 and the third node object 277 via edge objects 283 and 285 in the same manner as the first node object 273.
[0235] Starting from graph f), in order to obtain the second version 259 of graph g) of graph 211 (corresponding to the second version 255 of text middle representation 213), delete the second node object 275 and the edge object 283.
[0236] In Figures d) to g), the difference between the first node object 273 and the fourth node object 279 is mainly due to the position of the node objects in Figure 211. Further differences may exist in the function or effect of node objects 273 and 279.
[0237] Figure 3 The implementation of the graphic figure 211 and the text representation 213 in the figure is merely an example and is intended only to illustrate the function of this method.
[0238] Figure 4 Further graphical representation of other steps of a method 100 for generating a control program 209 for an automated system, according to one embodiment, is shown.
[0239] Figure 4 It shows Figure 3 The text intermediate representation 213 includes a first version 253 and a second version 255. Additionally, text conflict information 269 is shown. The text conflict information 269 shows various text program objects 225 of the different versions 253, 255 of the text intermediate representation in text form. Figure 3 Similar to the difference information 235, the text program object 225 is represented by its identifiers ID1, ID2, ID3, ID4, ID5, ID6, ID7, and ID8. Furthermore, the text conflict information 269 specifies the corresponding versions 253 and 255 of the intermediate text representation 213, assigning the corresponding text program object 225 to the corresponding version for each displayed text program object 225.
[0240] In Figure d), the graph includes all elements of the first version 253 and the second version 255 of the text intermediate representation 213, and thus shows the conflict between the two versions 253 and 255. Therefore, the graphical diagram 211 of Figure d) includes the first node object 273, the second node object 275, and the third node object 277, as well as the edge objects 283 and 285 of the first version 253 of the text intermediate representation 213. In addition, the graphical diagram 211 includes the fourth node object 279, the fifth node object 281, and the edge object 287 of the second version 255 of the text intermediate representation 213.
[0241] In the illustrated implementation, the first node object 273 and the fourth node object 279 are based on a common node object, but are different from each other. This could occur, for example, if the control program is developed by different developers, each creating different versions of the control program or graphical representation 211 and / or text intermediate representation 213. In the corresponding versions, the aforementioned node objects 273 and 279 are developed in different forms. Therefore, node objects 273 and 279 are both based on the same object and thus have the same identifier, with the first identifier ID1 of the first text program object 293 and the first node object 273 having the same value, and the sixth identifier ID6 of the sixth text program object 303 and the fourth node object 279 having the same value, but they are different from each other.
[0242] Therefore, the two node objects 273 and 279 represent a conflict because they have the same identifier and thus refer to the same program object 219 of the control program 209, but they are assigned different versions 253 and 255 of the text intermediate representation 213 and the program code of the control program 209, and are different from each other. For example, node objects 273 and 279 both describe functions or variables, but they are defined differently in their respective versions.
[0243] Furthermore, the graphic diagram 211 in Figure d) includes a third node object 277 and an edge object 285 connecting the first node object 273 and the third node object 277, as well as the fourth node object 279 and the third node object 277. Both the third node object 277 and the edge object 285 were transferred from the first version 253 of the text middle representation 213 to the second version 255 without any change, and therefore there is no conflict.
[0244] To resolve the conflict, the development environment 200 can identify each text program object 225 from the text conflict information 269 and assign them to different versions 253, 255 of the text intermediate representation 213.
[0245] In the example shown, development environment 200 is able to definitively determine that the first text program object 293 and the sixth text program object 303 are based on a common object.
[0246] Therefore, development environment 200 identifies the first text program object 293 of the first version 253 of the text intermediate representation 213 and the sixth text program object 303 of the second version 255 of the text intermediate representation 213 as being based on a common text program object 225, and as being modified independently of each other in the respective versions of the text intermediate representation 213. To resolve the conflict, in the example shown, development environment 200 deletes the first node object 273 corresponding to the first program object 293 from Figure 211 of graph d) and replaces it with the fourth node object 279 corresponding to the sixth text program object 303 of the second version 255.
[0247] Alternatively, the fourth node object 279 corresponding to the sixth text program object 303 can be deleted from figure 211.
[0248] Alternatively, the development environment 200 displays the program object 293 to be deleted to the user, allowing the user to manually delete the program object 293.
[0249] The fourth text program object 299 and the fifth text program object 301 are transferred unchanged to the second version 255 of the text intermediate representation 213, since there is no conflict here.
[0250] Therefore, a graphical representation 211 of graph e) is generated, in which the conflict is resolved and corresponds to a second version 255 of the intermediate text representation 213.
[0251] If other conflicts occur, the development environment 200 will handle the other objects in the text conflict information 269 accordingly, and delete the corresponding graphical program object 217 or retain it in the corresponding graphical diagram 211. Alternatively, the user can also perform this operation manually.
[0252] Figure 4 This illustrates the case where the text in the middle represents two versions, 253 and 255, based on a common version.
[0253] Alternatively, based on conflict information 269, the development environment 200 displays the conflict to the user, allowing the user to resolve the conflict manually.
[0254] Figure 5 A flowchart of a method 100 for generating a control program 209 for an automated system, according to one embodiment, is shown.
[0255] In order to generate the control program 209, the conversion module 205 of the development environment 200 first converts the graphical programming language graphic 213 into the text intermediate representation 213 of the graphical 211 in the first conversion step 101.
[0256] Graphical diagram 211 graphically represents at least a portion of the control program 209 to be generated according to a graphical programming language. Intermediate text representation 213 also provides a textual description of graphical diagram 211. For this purpose, the graphical diagram includes at least one graphical program object 217, each representing a graphical representation of a program object 219 of the control program 209. Therefore, intermediate text representation 213 represents at least one text program object 225, which is a textual description of the graphical program object 217 of graphical diagram 211.
[0257] To transform graphic representation 211, a line-by-line transformation from graphic representation 211 to intermediate representation 213 is performed in line transformation step 103. In this line-by-line transformation, each graphic program object 217 is assigned at least one text program object 225 in the form of a text line 241 of the text intermediate representation 213. The text line 241 represents a unique description of the corresponding graphic program object 217.
[0258] Graphical programming languages can be those defined by the IEC 61131-3 standard, such as contact diagrams, function block languages, and sequential languages.
[0259] The text in the middle represents 213, which is preferably written in a user-readable version for development environment 200.
[0260] Finally, in storage step 105, the text intermediate representation 213 on which the generated control program 209 is based is stored in representation file 245.
[0261] Preferably, the intermediate text representation 213 is stored in the representation file 245 in a form that can be read by a version management system known in the prior art.
[0262] Figure 6 A flowchart of a method 100 for generating a control program 209 for an automated system, according to one embodiment, is shown.
[0263] Figure 6 The implementation scheme shown is based on Figure 5 The implementation scheme described herein includes all method steps shown therein. Unless these contents have been changed, they will not be described further.
[0264] In the illustrated embodiment, in the first display step 107, the graphic diagram 211 is displayed in the graphics editor unit 201 of the development environment 200. For this purpose, the graphics editor unit 201 may include a corresponding display device.
[0265] In addition, in receiving step 113, the development environment 200 first receives text difference information 235 from the version management system 207.
[0266] Text difference information 235 describes the difference between the first version 253 and the second version 255 of the intermediate text representation 213. The first version 253 and the second version 255 of the intermediate text representation 213 are respectively representations of the first version 257 and the second version 259 of the graphical diagram 211. The first version 257 and the second version 259 of the graphical diagram 211 may be created sequentially during the programming process and / or created by different users.
[0267] Therefore, the text difference information 235 also defines at least one text program object 225 contained only in one of the two versions 253, 255 of the text intermediate representation 213. Thus, the text difference information 235 describes the differences between versions 253 and 255 of the text intermediate representation 213 in text form.
[0268] The different versions 253 and 255 of the text in the middle correspond to different versions of the graphic diagram 211, and the different versions of the graphic diagram further represent different versions of the program code generated by the control program 209.
[0269] In the second display step 109, the intermediate text representation 213 generated by transforming the graphic 211 is displayed in the text editor unit 203 of the development environment 200.
[0270] Therefore, users can check the functionality or correctness of the graphic diagram 211 or the control program 209 by examining the displayed graphic diagram 211 or the displayed text intermediate representation 213.
[0271] In the illustrated implementation, the method further includes a conflict detection step 123. In the conflict detection step 123, the development environment 200 receives text conflict information 269 from the version management system 207 and performs a conflict check between a first version 253 of the text intermediate representation 213 and a second version 255 of the text intermediate representation 213.
[0272] The text conflict information 269 includes a text program object 225 assigned to a first version 253 of the text intermediate representation 213 and a text program object 225 assigned to a second version 255 of the text intermediate representation 213. The two versions of the text intermediate representation 213 respectively describe two versions of the graphical diagram 211 and the control program 209. These two versions were written at different times and / or by different authors during the programming process.
[0273] Upon receiving text conflict information 269, conflict determination step 125 determines whether at least one text program object 225 assigned to the first version 253 of the text intermediate representation 213 and a text program object 225 assigned to the second version 255 of the text intermediate representation 213 have the same identifier 243 but different definitions. If the two text program objects 225 include different semantics, that is, if the text program objects 225 define different program technology objects, then the two text program objects 225 have different definitions.
[0274] This can happen, for example, when different developers independently program the same code.
[0275] The conflict detection step 125 includes a conflict conversion step 159. In the conflict conversion step 159, the conversion module 205 converts the text conflict information 269 into graphic conflict information 271. The graphic conflict information 269 includes a graphic program object 217 corresponding to the text program object 225 of the text conflict information 269.
[0276] In conflict resolution step 161, the conflict is resolved. For this purpose, at least one graphical program object 217 is deleted, the at least one graphical program object corresponding to the text program object 225 assigned to the first version 253 of the text intermediate representation 213, and including the same identifier 243 as the other graphical program objects 217, the other graphical program objects corresponding to the text program object 225 assigned to the second version 255 of the text intermediate representation 213.
[0277] Conflict resolution 200 can be implemented by the development environment or, alternatively, by the user.
[0278] In text display step 115, at least one text program object 225 that displays text difference information 235 is displayed in text editor unit 203.
[0279] For this purpose, in characterization step 121, the text program object 225 of text difference information 235 and / or the graphic program object 217 of graphic difference information 289, 291 are displayed as an added text program object 261 or an added graphic program object 265, or as a deleted text program object 263 or a deleted graphic program object 267.
[0280] In the difference conversion step 117, the text difference information 235 is converted into graphic difference information by converting at least one text program object 225 into a corresponding graphic program object 217.
[0281] In the graphics display step 119, at least one graphics program object 217 that displays graphics difference information 235 is displayed in the graphics editor unit 201 of the development environment 200.
[0282] For this purpose, in characterization step 121, the text program object 225 of text difference information 235 and / or the graphic program object 217 of graphic difference information 289, 291 are displayed as an added text program object 261 or an added graphic program object 265, or as a deleted text program object 263 or a deleted graphic program object 267.
[0283] For example, text or graphic program objects can be represented by coloring or shading the corresponding program objects 217, 225 within the graphic representation 211 or within the text representation 213.
[0284] In the text intermediate representation 213, the added or deleted text program objects 261, 263 can be displayed as the corresponding added or deleted text lines 241, optionally with corresponding graphic or color identifiers.
[0285] Similarly, the added or deleted graphical program objects 265, 267 can be represented in the graphical figure 211 by the aforementioned graphical or color identifiers, for example, as added or deleted node objects 249 and / or edge objects 251.
[0286] Subsequently, in generation step 111, control program 209 can be generated based on text intermediate representation 213 and / or based on graphic diagram 211.
[0287] Figure 7 Another flowchart of a method 100 for generating a control program 209 for an automated system, according to yet another embodiment, is shown.
[0288] Figure 7 The implementation plan in the document is based on Figure 6 The implementation scheme is described herein, including all method steps described therein. Detailed descriptions will be omitted unless these have been changed.
[0289] The illustrated implementation describes, among other things, two cases for providing graphic figure 211.
[0290] In one scenario, during step 129, the development environment 200 reads the program file 221. The description of the graphic 211 is stored in text form in the program file 221.
[0291] In the second conversion step 131, the text information of the program file 221 is converted into the graphic diagram 211.
[0292] This describes a situation where a previously generated graphical representation 211, temporarily stored as text in program file 221, is generated by the development environment 200 reading information from program file 221. This also covers situations where a graphical representation 211 generated at an earlier point in time is loaded into the development environment 200 for further processing or modification by performing corresponding programming operations.
[0293] In the second scenario, during graphical programming step 127, the graphical editor unit 201 first receives a graphical input command 215 from the user of the development environment 200. The graphical input command 215 includes programming commands for adding and / or removing graphical program objects 217. Graphical program objects 217 are sub-elements of the graphical diagram 211 and represent program objects 219 of the control program 209 to be generated.
[0294] This describes the graphical programming operation. Graphical input command 215 corresponds to the programming operation entered by the user during programming according to the graphical programming language. The graphical programming process allows modification of the existing graphic 211 displayed in the graphical editor unit 201 by adding or removing graphical program objects 217. Alternatively, a completely new graphic 211 can be generated by executing the graphical programming process.
[0295] Furthermore, the first conversion step 101 includes a behavior determination step 143. In the behavior determination step 143, the graphics program object 217 and graphics behavior 233 of the graphic graph 211 are determined. In addition, the behavior position 239 of the graphics behavior 233 of the graphic graph 211 is determined.
[0296] Graphical behavior 233 is a graphical representation of the program sequence of control program 209. The behavior position 239 of graphical behavior 233 describes the position of graphical figure 211 within the corresponding program code that includes at least graphical figure 211.
[0297] Then, in behavior conversion step 145, the graphical program object 217 and graphical behavior 233 are converted into a text program object 225 and a text behavior 237 of the text intermediate representation 213. The text behavior 237 represents a textual representation of the program flow of the control program 209.
[0298] In placement step 147, text behavior 237 is placed at behavior position 239 within the text middle representation 213. Behavior position 239 defines the placement of text behavior 237 within the text middle representation 213.
[0299] The individual text program objects 225, represented as text lines 241, can be arranged according to the integrated identifier 243.
[0300] In the identifier determination step 149, an identifier 243 is determined for the graphic program object 217 of the graphic figure 211. The identifier 243 allows for the unique identification of the corresponding graphic program object 217.
[0301] Then, in integration step 151, the defined identifier 243 of the graphical program object 217 is integrated into the corresponding text program object 225 represented by the text line 241. Conversely, the identifier 243 of the text program object 225 can also be integrated into the graphical program object 217.
[0302] In the illustrated implementation, the text editor unit 203 of the development environment 200 first receives a text input command 223 from the user in text programming step 133. The text input command 223 adds a text program object 225 to the intermediate text representation 213 as a text representation of the corresponding graphical program object 217 of the graphic figure 211, or removes it from it. The text program object 225 is the text representation of the graphical program object 217 of the graphic figure 211.
[0303] In the second generation step 135, a modified text intermediate representation 227 is generated based on the text input command 223 and the text intermediate representation 213.
[0304] Then, in the third conversion step 137, the modified text intermediate representation 227 is converted into a corresponding modified graphic representation 231. Alternatively, or additionally, text modifications to the text intermediate representation 213 caused by text input commands can be converted into graphic modifications to the graphic representation 211. The text modification includes at least one text program object 225, which is either newly added to or deleted from the text intermediate representation 213. Therefore, the graphic modification converted from the text modification includes at least one graphic program object 217, which is either newly added to or deleted from the graphic representation 211.
[0305] In the third display step 139, the modified text intermediate representation 227 of the modified graphic 231 is displayed in the text editor unit 203.
[0306] In the fourth display step 141, the modified graphic 231 is displayed in the graphic editor unit 201 instead of the graphic 211.
[0307] As an alternative or additional method, the graphical modifications are displayed in graphical diagram 211. For this purpose, graphical diagram 211 in the graphical editor unit 210 is modified according to the modifications by inserting at least one newly added graphical program object 217 of the graphical modifications into the existing graphical diagram 211.
[0308] Therefore, the newly added graphics program object 217 can be marked as a new graphics program object 217, for example by color.
[0309] Therefore, the graphic program object 217 that is deleted from graphic figure 211 is marked with color as appropriate, based on the graphic modification.
[0310] Furthermore, in the summarization step 153, the text intermediate representation 213 of graphic figure 211 and at least one other intermediate representation of at least one other graphic figure are combined to form a total text intermediate representation. Thus, in the total intermediate representation, multiple different text intermediate representations 213 of multiple different graphic figures 211 are combined into a coherent code in text form.
[0311] The text behaviors of multiple text intermediate representations 213 are arranged at the corresponding behavior positions in the overall text intermediate representation.
[0312] Additional text information is placed between the text behaviors 237 of various graphics within the overall text intermediate representation. This additional information may include, for example, data types, variable types, or other information. The additional information placed between the behaviors of various graphics within the overall intermediate representation can be written using a basic language predefined by the IEC 61131-3 standard.
[0313] The basic language describes that any additional information must be written in accordance with standard specifications.
[0314] On the other hand, the behavior of various graphical diagrams is written in a sub-language whose syntax corresponds to the syntax of programming languages defined by the IEC 61131-3 standard: contact diagrams, function block languages, or sequential languages.
[0315] This sub-language represents the aforementioned graphical programming language in text form and is presented in a user-readable format.
[0316] In the overall intermediate representation of the text, the basic language represents the framework of coherent code, while the sub-language is the textual representation of the graph and, in particular, the behavior of the graph 211.
[0317] According to one implementation, the intermediate text representation 213 representing only the graphic 211 may further include a basic text language predefined by the IEC 61131-3 standard, wherein additional information possesses basic conditions such as the data type and / or variable type of the text behavior 237 representing the graphic behavior 233. The corresponding text behavior 237 is written in a sub-language corresponding to one of the programming languages ladder logic, function block language, or sequential language, as described above.
[0318] In the illustrated implementation, in generation step 111, control program 209 is generated based on modified text intermediate representation 227 or based on overall text intermediate representation and / or based on modified graphic diagram 231 or multiple modified graphic diagrams 231.
[0319] The illustrated implementation describes the following scenario: a user performs a text programming operation based on the text intermediate representation 213, thereby modifying the text intermediate representation 213 and modifying the graphic diagram 211 accordingly.
[0320] For this purpose, the user removes a text program object 225 from the text intermediate representation 213 or adds other text program objects 247 to the text intermediate representation 213 in the form of a text input command 223. By modifying the text intermediate representation 213 through text programming operations performed by the user, a corresponding modified graphical representation 231 can be generated after transforming the modified text intermediate representation 227 generated by performing the modifications.
[0321] Therefore, users can advance the programming of the control program 209 based on the graphical programming language by performing graphical programming operations and by performing text programming operations.
[0322] Furthermore, the generation step 111 in the illustrated embodiment includes a debugging step 155. In the debugging step 155, the debugging process of the control program 209 is performed based on the intermediate text representation 213 or based on the modified intermediate text representation 227.
[0323] Furthermore, generation step 111 includes binary code generation step 157. In binary code generation step 157, a binary representation of control program 209 is generated in order to generate control program 209.
[0324] Reference Number List
[0325] 100 method 101 First conversion step 103 Line conversion steps 105 Storage steps 107 First display step 109 Second display step 111 Generation steps 113 Receiving steps 115 Text display steps 117 Difference conversion steps 119 Graphical display steps 121 Characterization steps 123 Conflict checking steps 125 Conflict identification steps 127 Graphical programming steps 129 Reading steps 131 Second conversion step 133 Text programming steps 135 Second generation step 137 Second conversion step 139 Third display step 141 Fourth display step 143 Behavior determination steps 145 Behavior transformation steps 147 Arrangement steps 149 Identification steps 151 Integration steps 153 Summary of steps 155 Debugging steps 157 Binary code generation steps 159 Conflict conversion steps 161 Conflict resolution steps 200 Development Environment 201 Graphics Editor Unit 203 Text Editor Unit 205 Conversion Module 207 Version Management System 209 Control Program 211 Graphics 213 Text intermediate representation 215 Graphical input commands 217 Graphical Program Objects 219 Executable object 221 Program File 223 Text input command 225 Text program object 227 Modified text intermediate representation 229 Another graphical program object 231 Modified graphic diagram 233 Graphical Behavior 235 Textual Difference Information 237 Text behavior 239 Behavioral location 241 text lines 243 logo 245 Represents a file 247 Another text program object 249 Node objects 251 Edge objects 253 The first version of the text in the middle 255 The second version of the text intermediate representation 257 The first version of the graphic diagram 259 The second version of the graphic diagram 261 Added text program object 263 Deleted text program object 265 Added graphics program objects 267 Deleted graphics program objects 269 Text conflict information 271 Graphical conflict information 273 First node object 275 Second node object 277 Third node object 279 Fourth node object 281 Fifth node object 283 The edge object between the first node object and the second node object 285 The edge object between the first node object and the third node object 287 The edge object between the third node object and the fifth node object 289 First graphic difference information 291 Second graphic difference information 293 First text program object 295 Second text program object 297 Third text program object 299 Fourth text program object 301 Fifth text program object 303 Sixth text program object 305 Seventh Text Program Object 307 Eighth text program object ID1 The identifier of the first text program object ID2 The identifier of the second text program object ID3 The identifier of the third text program object ID4 The identifier of the fourth text program object ID5 The identifier of the fifth text program object ID6 The sixth text program object identifier ID7 The identifier of the seventh text program object ID8 The identifier of the eighth text program object
Claims
1. A computer-implemented method (100) for generating a control program (209) for an automated system, comprising: In the first conversion step (101), the graphical diagram (211) of the graphical programming language is converted into a text intermediate representation (213) of the graphical diagram (211) by means of the conversion module (205) of the development environment (200), wherein the graphical diagram (211) is at least a part of the control program (209) of the automated system according to the graphical programming language, wherein the text intermediate representation (213) provides a textual description of the graphical diagram (211), and wherein the first conversion step (101) includes: In the line conversion step (103), a line-by-line conversion is performed, wherein in the line-by-line conversion, each of the graphical program objects (217) of the graphical diagram (211) is assigned a text program object (225) in the form of at least one text line (241) of the intermediate text representation (213), wherein the graphical program object (217) is a partial element of the graphical diagram (211) and represents a program object (219) of the control program (209), and wherein the text line (241) of the text program object (225) provides a unique description of the corresponding graphical program object (217); and In the storage step (105), the intermediate text representation (213) is stored in the representation file (245).
2. The method (100) according to claim 1, further comprising: In the first display step (107), the graphic diagram (211) is displayed in the graphic editor unit (201) of the development environment (200); and / or In the second display step (109), the intermediate text representation (213) of the graphic (211) is displayed in the text editor unit (203) of the development environment (200); and In the generation step (111), the control program (209) is generated based on the text intermediate representation (213) of the graphical graph (211) of the graphical programming language and / or based on the graphical graph (211).
3. The method (100) according to claim 1, further comprising: In the receiving step (113), text difference information (235) is received from the version management system (207) via the development environment, wherein the text difference information (235) describes the difference between a first version (253) and a second version (255) of the text intermediate representation (213), wherein the first version (253) and the second version (255) of the text intermediate representation (213) are each representations of a first version (257) and a second version (259) of the graph (211), wherein the first version (257) and the second version (259) of the graph (211) are created based on each other or based on a common base graph during programming, and wherein the text difference information (235) defines at least one text program object (225), wherein the at least one text program object is contained only in one of the two versions (253, 255) of the text intermediate representation (213); as well as In the text display step (115), at least one text program object (225) that displays the text difference information (235) in the text editor unit (203) of the development environment (200); and / or In the difference conversion step (117), the text difference information (235) is converted into graphic difference information by converting the at least one text program object (225) into a corresponding graphic program object (217); and In the graphics display step (119), at least one graphics program object (217) that displays the graphics difference information (235) is displayed in the graphics editor unit (201) of the development environment (200).
4. The method (100) according to claim 1, wherein the second version of the graphic graph (200) includes a generation date later than the first version of the graphic graph (211), wherein at least one text program object (225) is added or removed in the corresponding second version (255) of the text intermediate representation (213) compared to the first version of the text intermediate representation (213), and wherein in the text difference information (235), the at least one text program object (225) is identified as a text program object (225) added to or deleted from the first version (253) of the text intermediate representation (213).
5. The method (100) according to claim 4, wherein the text display step (115) and / or the graphics display step (119) comprises: In the characterization step (121), the text program object (225) of the text difference information (235) and / or the graphic program object (217) of the graphic difference information (289, 291) are marked as added text program objects (261) or added graphic program objects (265), or marked as deleted text program objects (263) or deleted graphic program objects (267).
6. The method (100) according to any one of claims 3 to 5, wherein text program objects changed from the first version (253) of the text intermediate representation (213) to the second version (255) of the text intermediate representation (213) are stored as a pair in the difference information (235), the pair consisting of a deleted text program object (263) of the first version (253) of the text intermediate representation (213) and an added text program object (261) of the second version (255) of the text intermediate representation (213), wherein the deleted text program object (263) represents the original version of the modified text program object, and the added text program object (261) represents the modified version of the modified text program object.
7. The method (100) according to claim 6, wherein the deleted graphical program object (267) corresponding to the deleted text program object (263) and / or the added graphical program object (265) corresponding to the added text program object (261) and / or the modified graphical program object corresponding to the modified text program object are represented in the graphical diagram (211) as deleted graphical program object (267) and / or added graphical program object (265) and / or modified graphical program object.
8. The method (100) according to any one of claims 3 to 7, further comprising: Text conflict information (269) is received from the version management system (207), and in the conflict checking step (123), a conflict check is performed between the first version (253) and the second version (255) of the text intermediate representation (213), wherein the text conflict information (269) includes a text program object (225) associated with the first version (253) of the text intermediate representation (213), and also includes a text program object (225) associated with the second version (255) of the text intermediate representation (213); and In the conflict determination step (125), a conflict is determined if at least one text program object (225) of the first version (253) assigned to the text intermediate representation (213) and at least one text program object (225) of the second version (255) assigned to the text intermediate representation (213) are identified as having the same identifier (243) and are modified relative to each other.
9. The method (100) according to claim 8, wherein the conflict determination step (125) comprises: In the conflict conversion step (159), the text conflict information (269) is converted into graphic conflict information (271) by means of the conversion module (205), wherein the graphic conflict information (269) includes a graphic program object (217) corresponding to the text program object (225) of the text conflict information (269). as well as In the conflict resolution step (161), the conflict is resolved by deleting the at least one graphical program object (217), which corresponds to a text program object (225) of the first version (253) of the text intermediate representation (213) and includes the same identifier (243) as the other graphical program objects (217), which correspond to text program objects (225) associated with the second version (255) of the text intermediate representation (213).
10. The method (100) according to any one of the preceding claims, further comprising: In the graphical programming step (127), a graphical input command (215) from a user of the development environment (200) is received via the graphical editor unit (201) of the development environment (200), wherein the graphical input command (215) includes programming commands for adding and / or removing graphical program objects (217) of the graphical graph (211); and / or In the reading step (129), the program file (221) is read, wherein the program file (221) describes the graphic diagram (211) and the graphic program object (217) of the graphic diagram (211) in a textual description manner; In the second conversion step (131), the conversion module (205) converts the text description into the graphic diagram (211).
11. The method (100) according to any one of the preceding claims, further comprising: In the text programming step (133), the text editor unit (203) of the development environment (200) receives a text input command (223) from the user, wherein the text input command (223) adds or removes a text program object (225) as a text representation of the corresponding graphic program object (217) of the graphic graph (211) from the text intermediate representation (213) of the graphic graph (211); In the second generation step (135), a modified text intermediate representation (227) is generated based on the text input command (223) and the text intermediate representation (213) of the graphic graph (211); In the third conversion step (137), the conversion module (205) converts the modified text intermediate representation (227) into a corresponding modified graphic representation (231), and / or converts the text program object (225) of the text input command into a corresponding graphic program object (217). In the third display step (139), the modified graphic diagram (231) of the graphic diagram (211) is displayed in the graphic editor unit (201) instead of the graphic diagram (211) and / or the graphic program object (217) converted from the text program object (225) of the text input command in the graphic diagram (211) is displayed as the modified graphic diagram (231); In the generation step (111), the control program (209) is generated based on the modified text intermediate representation (227) of the modified graphic diagram (231) and / or based on the modified graphic diagram (231). as well as In the fourth display step (141), the modified intermediate text representation (227) of the modified graphic (231) is displayed in the text editor unit (203).
12. The method (100) according to any one of the preceding claims, wherein the first conversion step (101) further comprises: In the behavior determination step (143), the graphical behavior (233) of the graphical diagram (211) and at least one behavior position (239) are determined, wherein the graphical behavior (233) is a graphical representation of the program sequence of the control program (209), and wherein the behavior position (239) defines the location where the behavior of the control program is to be located as predefined in the program code by the IEC 61131-3 standard; In the behavior conversion step (145), the graphical behavior (233) of the graphical program object (217) and the graphical graph (211) is converted into the text behavior (237) of the text program object (225) and the text intermediate representation (213), wherein the text behavior (237) represents the text intermediate representation (213) of the execution of the control program (209); and In the placement step (147), the text behavior is placed at the behavior position (239) within the text intermediate representation (213).
13. The method (100) according to any one of the preceding claims, wherein the first conversion step (101) further comprises: In the identification determination step (149), an identifier (243) of the graphics program object (217) in the graphics diagram (211) is determined, wherein the identifier (243) of the graphics program object (217) allows the corresponding graphics program object (217) to be uniquely identified; as well as In the integration step (151), the identifier (243) of the graphical program object (217) is integrated into the corresponding graphical program object (217) assigned to the graphical program object (217) and into the text program object (225) of the text intermediate representation (213) written in text lines (241).
14. The method (100) according to claim 13, wherein for a linked graphical program object (217), the identifier (243) of the linked graphical program object (217) is integrated into the corresponding text program object (225).
15. The method (100) according to any one of the preceding claims, wherein the graphical program object (217) includes graphically representable meta-information, and wherein the meta-information includes at least one of the following: author, creation date, and version (257, 259) of the graphical diagram (211).
16. The method (100) according to any one of the preceding claims, further comprising: In the summarization step (153), the text intermediate representation (213) of the graphic graph (211) is combined with at least one other intermediate representation of at least one other graphic graph to form a total text intermediate representation, wherein the total intermediate representation combines multiple different text intermediate representations (213) of multiple different graphic graphs (211) into coherent code in text form.
17. The method (100) according to any one of the preceding claims, wherein the generation step (111) comprises: In the debugging step (155), the debugging process is performed based on the intermediate text representation (213) of the graphical diagram (211); and / or In the binary code generation step (157), a binary representation of the control program (209) is generated.
18. The method (100) according to any one of the preceding claims, wherein the graphical programming language is one of: contact planning, function block programming, or sequential language.
19. The method (100) according to any one of the preceding claims, wherein the syntax of the text intermediate representation (213) and the modified text intermediate representation (213) is not conflicting with the syntax of the graphics programming language.
20. A development environment (200) having a graphical editor unit (201), a text editor unit (203) and a conversion module (205), wherein the development environment (200) is configured to perform the method (100) according to any one of claims 1 to 19.