METHOD FOR GENERATING A CONTROL PROGRAM FOR AN AUTOMATION SYSTEM AND DEVELOPMENT ENVIRONMENT

DE502024001369D1Active Publication Date: 2026-06-25BECKHOFF AUTOMATION GMBH

Patent Information

Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
BECKHOFF AUTOMATION GMBH
Filing Date
2024-05-28
Publication Date
2026-06-25

AI Technical Summary

Technical Problem

Existing development environments for graphical programming of programmable logic controllers (PLCs) are limited to graphical representation and programming, restricting user flexibility and efficiency, and do not allow seamless integration with textual programming for error detection and correction.

Method used

A method and development environment that enables translation between graphical and textual representations of control programs, allowing users to switch between graphical and textual programming, with a translation module converting graphical diagrams into textual intermediate representations for error detection and code generation.

Benefits of technology

Facilitates efficient and accurate programming by enabling error detection and correction in graphical diagrams, reduces computing power and runtime, and supports seamless integration with version control systems, enhancing user flexibility and control program quality.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The patent application claims priority over German patent application 10 2023 126 332.

[0002] The invention relates to a method for generating a control program for an automation system and a development environment.

[0003] Graphical programming languages ​​are known from the state of the art for the graphical programming of programmable logic controllers (PLCs) in automation technology. The IEC 61131-3 standard defines three graphical programming languages: ladder logic, function block diagram, and sequenced function chart (SFC). These graphical programming languages ​​allow for user-friendly graphical programming, in which graphical diagrams can be generated as graphical representations of the control programs to be created for programmable logic controllers by adding and / or removing predefined graphical program objects.

[0004] Various development environments for such graphical programming are known from the prior art. These development environments each include a graphical editor unit in which the user can create graphical diagrams by adding and / or removing graphical program objects predefined by the graphical programming language.

[0005] However, the development environments known from the state of the art only allow graphical representation and programming for the aforementioned graphical programming languages. The user is therefore limited to graphical programming within the graphical editor unit.

[0006] Graphical programming has many advantages over textual programming, such as a comparatively simpler learning process. However, graphical programming also has some disadvantages compared to textual programming.

[0007] German patent application DE 10 2020 115 028 A1 discloses a method for creating and executing a control program for controlling an automation system. German patent application US 2002 / 0004804 A1 discloses a method for storing and transferring a graphical programming language for an automation system. From the publication YE YIN ET AL: "Research and Implementation of Embedded Soft PLC System", INTELLIGENT NETWORKS AND INTELLIGENT SYSTEMS (ICINIS), 2012 FIFTH INTERNATIONAL CONFERENCE ON, IEEE, November 1, 2012 (2012-11-01), pages 166-169, XP032278264, DOI:10.1109 / ICINIS.2012.57 ISBN: 978-1-4673-3083-1, a method for embedding a soft PLC for an automation system is known.

[0008] It is therefore an object of the invention to provide an improved method for generating a control program for an automation system and an improved development environment.

[0009] The problem is solved by the method and development environment of the independent claims. Preferred embodiments are specified in the dependent claims.

[0010] According to one aspect of the invention, a computer-implemented method for generating a control program for an automation system is provided, comprising: Receiving input data for a control program of an automation system by a development environment in a receive step, wherein the input data describes a graphical diagram of a graphical programming language, and wherein the graphical diagram graphically represents at least a part of a control program for an automation system according to the graphical programming language; generating the graphical diagram of the graphical programming language based on the input data by a graphical editor unit of the development environment in a first generation step; displaying the graphical diagram in the graphical editor unit of the development environment in a first display step;In a first translation step, a translation module of the development environment translates the graphical diagram of the graphical programming language into an intermediate textual representation of the graphical diagram, where the intermediate textual representation provides a textual description of the graphical diagram; in a second display step, the intermediate textual representation of the graphical diagram is displayed in a textual editor unit of the development environment; and in a second generation step, the control program is generated based on the intermediate textual representation of the graphical diagram of the graphical programming language and / or based on the graphical diagram itself.

[0011] This allows for the technical advantage of providing an improved computer-implemented method for generating a control program for an automation system. The method according to the invention is executed using a suitably designed development environment comprising a graphical editor unit, a textual editor unit, and a translation module. The graphical editor unit enables graphical programming using a graphical programming language. The textual editor unit enables textual programming of the control program using the graphical programming language.

[0012] The translation module enables translation between graphical diagrams created using graphical programming and textual intermediate representations of the graphical diagrams.

[0013] The procedure involves generating a graphical diagram, valid according to a selected graphical programming language, based on input data using the graphical editor unit, and displaying this diagram to a user of the development environment within the graphical editor unit. According to the rules of the selected graphical programming language, the graphical diagram represents at least a part of the control program to be generated for the automation system.

[0014] The graphical diagram includes graphical program objects that correspond to program objects of the control program.

[0015] The translation module translates the graphical diagram into a corresponding textual intermediate representation. This textual intermediate representation is a textual description of the graphical diagram, including the graphical program objects it contains. According to the invention, the textual intermediate representation is implemented in a form readable by the user of the development environment.

[0016] The intermediate textual representation generated by the translation module is then displayed to the user in the textual editor. By viewing this intermediate textual representation in the textual editor, the user can verify the accuracy of the graphical diagram and thus immediately identify any errors. This enables improved programming of control programs for automation systems based on graphical programming languages.

[0017] In particular, if the user identifies errors in the graphical diagram by viewing the intermediate textual representation, they can correct or modify the graphical diagram accordingly, thereby reducing, for example, the computing power and runtime required to execute the control program. This enables not only simplified programming but also improved control programs.

[0018] Furthermore, a user unfamiliar with textual programming languages ​​can more easily interpret the program code based on its graphical representation and identify and correct errors in the code or on the machine more quickly. This can substantially reduce downtime of the automation system being controlled. Conversely, a skilled user, such as a software developer familiar with all textual and graphical programming languages ​​used, has more options for generating code more efficiently and effectively when using a textual programming language.

[0019] Finally, the method according to the invention provides for generating the correspondingly programmed control program based on the graphical diagram and / or based on the textual intermediate representation of the graphical diagram. The control program can thus be generated directly based on the textual intermediate representation of the graphical diagram. Therefore, no additional textual intermediate representation for the graphical diagram is required, which is needed solely for saving or compiling the control program based on the graphical diagram.

[0020] Instead, the textual intermediate representation, which was previously displayed to the user in the textual editor unit for review and is written in a user-readable form, is used directly as an intermediate representation for saving the control program created based on the graphical diagram of the graphical programming language and for compiling the control program.

[0021] This further simplifies the programming of the control program based on the graphical programming language, which uses only a textual intermediate representation of the graphical diagrams, both for saving the control program and for compiling the control program, and additionally for displaying and checking the corresponding graphical diagram by the user.

[0022] Furthermore, the use of textual intermediate representation ensures good compatibility of the generated program code with version control systems. In particular, the generated program code can be saved in textual form using this intermediate representation. Program code saved in this way can be easily managed within version control systems.

[0023] Furthermore, storing the program code in textual form can reduce the required storage space.

[0024] The method according to the invention also allows a seamless switch between textual and graphical programming and representation: The developer can, according to preference or depending on the case at hand, carry out the development of the program code in textual or graphical programming.

[0025] Even if the sequence control of the automation system is programmed textually, it and its current progress can be displayed graphically to the user, for example on a human-machine interface (HMI). This facilitates an easier understanding of the program code and the processes within the automation system.

[0026] Furthermore, the textual intermediate representation enables closed copying, deletion, and moving of complete executable program objects.

[0027] For example, a user can modify the behavior of a machine control system by changing an executable program object, with the changes being implemented graphically. The user can then transmit the modified executable program object as a continuous text, for example via email, fax, letter, dictation, telegram, or even a stone tablet, to a colleague. The colleague can then replace the active executable program object with the transmitted one, thus consistently changing the machine's behavior in a single step.

[0028] Furthermore, the textual intermediate representation allows for good clarity for the user, e.g. through the complete representation of a class in a text editor, including the behavior of all methods of the class.

[0029] Furthermore, the method enables the simple generation of program code containing executable program objects with textualized behavior.

[0030] For example, a machine manufacturer offers a machine in a wide variety of variants, resulting from combinations of different parameters specified by the customer. These variants differ both in the physical construction of the machine and in the control program.

[0031] Based on the parameters, the variant-specific parts of the control program are generated as text by a code generator. This can also include graphical behavior, such as variant-specific sequence control in AS Sequence Sequence Language or a variant-specific control algorithm in FBS Function Block Language. Unlike manual adjustments, code generation is automated and can be integrated into an ordering process.

[0032] Furthermore, the method enables simple and quick changes to a graphical program code by modifying the textualized program code, for example through a textual search / replace function.

[0033] According to the invention, the input data of the graphical diagram describes properties of the graphical program objects of the graphical diagram and is suitable for being read by the graphical editor unit, enabling the graphical editor unit to generate a corresponding graphical diagram.

[0034] For the purposes of this application, a graphical diagram of a graphical programming language is a graphical representation, according to the rules of the respective graphical programming language, of a control program that can be created using that language. The graphical diagram comprises at least one graphical program object.

[0035] The graphical program object is a graphical representation of a program object of the respective control program.

[0036] The graphical diagram can be displayed graphically in a corresponding display unit of a graphical editor unit according to the rules of the graphical programming language. The display unit is designed as a software module of the graphical editor unit.

[0037] According to one embodiment, the receiving step comprises: receiving graphical input commands from a user of a development environment by the graphical editor unit of the development environment in a first programming step, wherein the input data includes the graphical input commands, wherein the graphical input commands include programming commands to add and / or remove graphical program objects of the graphical diagram, and wherein the graphical program objects are sub-elements of the graphical diagram and represent executable program objects of the control program.

[0038] This allows for the technical advantage that the inventive method enables graphical programming of the control program. Here, the input data is provided by the user of the development environment through graphical programming commands. The present embodiment describes the case in which the user creates or modifies the graphical diagram by entering corresponding input commands in the graphical editor unit, for example, by adding or removing corresponding graphical program objects.

[0039] The input data is thus created, possibly exclusively, by the user's input commands during the graphical programming process. This occurs when the user modifies an existing graphical diagram or creates a new one from scratch, according to the rules of the graphical programming language within the graphical editor unit. This graphical diagram, modified or newly created through the graphical programming process, is then translated into a corresponding intermediate textual representation, as described above, and displayed to the user in the textual editor unit.

[0040] Subsequently, the control program is generated based on the graphical diagram created during the graphical programming process and / or on the corresponding textual intermediate representation. In the illustrated implementation, the user can thus modify or regenerate a corresponding graphical diagram by executing the graphical input commands in the graphical editor unit according to the rules of the selected graphical programming language.

[0041] The graphical diagram, modified or newly created in the graphical programming process, is subsequently translated into a user-readable intermediate textual representation and displayed to the user of the textual editor unit for review.

[0042] According to one embodiment, the receiving step comprises: reading a program file in a read step, wherein the input data of the graphical diagram is contained in the program file in textual form, wherein the graphical program objects of the graphical diagram are textually described by the input data; and wherein the first generation step comprises: translating the textual input data into the graphical diagram by the translation module in a second translation step.

[0043] This achieves the technical advantage that, in the embodiment described, the graphical diagram is generated based on a pre-stored program file containing the input data. The embodiment thus describes the case in which a graphical diagram, already generated in a previous graphical programming process and stored in textual form in the pre-stored program file, is read by the development environment and displayed to the user in the graphical editor unit as the graphical diagram itself, and in the corresponding textual editor unit as the intermediate representation generated by the translation process and rendered in a readable format for the user.

[0044] Based on this, the user can, according to the embodiment described above, perform a further graphical programming operation and modify the intermediate graphical representation accordingly by adding or removing graphical program objects, in accordance with the described graphical input commands.

[0045] According to one embodiment, the method further comprises: Receiving textual input commands from the user by the textual editor unit of the development environment in a textual programming step, wherein textual program objects are added to or removed from the textual intermediate representation of the graphical diagram as textual representations of corresponding graphical program objects of the graphical diagram by means of the textual input commands; generating a modified textual intermediate representation based on the textual input commands and the textual intermediate representation of the graphical diagram in a third generation step;Translating the modified textual intermediate representation into a correspondingly modified graphical diagram of the graphical programming language and / or translating textual modifications of the textual intermediate representation caused by the textual input commands into graphical modifications of the graphical diagram by the translation module in a third translation step, wherein the textual modifications include at least one newly added or deleted textual program object, and wherein the graphical modifications include at least one newly added or deleted graphical program object; displaying the modified graphical diagram instead of the graphical diagram and / or displaying the graphical modifications in the graphical diagram in the graphical editor unit (201) in a third display step;and generating the control program based on the modified textual intermediate representation of the modified graphical diagram and / or based on the modified graphical diagram in the second generation step.

[0046] This achieves the technical advantage that the described method allows the user of the development environment to modify the existing graphical diagram based on the textual intermediate representation by executing a textual programming operation within the textual editor unit. The user can thus make changes to the textual intermediate representation of the graphical diagram displayed in the textual editor unit by executing a textual programming operation and thereby create a modified textual intermediate representation.

[0047] This allows for substantial practical and time-saving benefits in the programming process, as program parts can be automatically renamed, replaced, or modified in the textual representation of the program code. Such operations are considerably more complex in the graphical representation, since there is no automatic search / replace function.

[0048] The user can enter corresponding commands into the textual editor to modify the displayed intermediate textual representation. These commands include adding or removing textual program objects from the intermediate textual representation. According to the invention, these textual program objects are textual representations of the graphical program objects of the graphical diagram. The graphical program objects are predefined by the rules of the selected graphical programming language.

[0049] When the intermediate textual representation is changed during the textual programming process, the textual editor unit receives the corresponding textual input commands entered by the user and executes a corresponding change to the intermediate textual representation displayed in the textual editor unit. This generates a modified intermediate textual representation.

[0050] The translation module then translates the modified textual intermediate representation and generates a correspondingly modified graphical diagram. This graphical diagram is then displayed to the user in the graphical editor unit.

[0051] The user can thus modify the graphical diagram previously generated based on the input data, i.e., on the graphical input commands executed in the graphical programming process or based on the program file, by executing a textual programming operation in the textual editor unit and thereby create a modified textual intermediate representation and a correspondingly modified graphical diagram.

[0052] The modified graphical diagram and the modified textual intermediate representation represent graphical and textual equivalents of one and the same control program to be generated. The same applies to the graphical diagram and the corresponding textual intermediate representation described above.

[0053] The embodiment of the method according to the invention described above thus provides the user with the possibility of generating the control program in the selected graphical programming language in both a graphical and a textual programming process. The user can switch between graphical and textual programming at will, since changes made in the graphical editor unit are immediately reflected in the corresponding textual intermediate representation, and conversely, changes made by the user in the textual intermediate representation are immediately reflected in the corresponding graphical diagram.

[0054] The graphical diagram and the textual intermediate representation thus represent a unique correspondence of each other at all times, regardless of which editor unit the user has used to make changes.

[0055] This further simplifies the programming process considerably. For example, some operations involved in generating the control program are easier to perform in the graphical editor, while others are easier to accomplish textually. For instance, duplicating program objects in the textual intermediate representation is much simpler using copy and paste than in the graphical diagram, where each graphical program object must be duplicated individually and linked to the existing graphical program objects.

[0056] Furthermore, this can lead to a simplification of the resulting control program by taking the textual programming into account in the textual editor unit, which may result in a simplified graphical diagram, leading to a simplified control program with reduced runtime and reduced computing capacity.

[0057] According to one embodiment, the method further comprises: displaying the modified textual intermediate representation of the modified graphical diagram in the textual editor unit in a fourth display step.

[0058] This provides the technical advantage that by displaying the modified textual intermediate representation in the textual editor unit, the user is given the opportunity to identify errors or weaknesses in the modified graphical diagram generated by the textual programming and corresponding to the modified textual intermediate representation, based on the displayed modified textual intermediate representation.

[0059] According to one embodiment, the first translation step further comprises: Determining the graphical program objects and the graphical behavior of the graphical diagram in a behavior determination step, wherein the graphical behavior describes a graphical representation of a program flow of the control program; and translating the graphical program objects and the graphical behavior of the graphical diagram into textual program objects and the textual behavior of the intermediate textual representation in a behavior translation step, wherein the textual behavior represents a textual intermediate representation of the flow of the control program.

[0060] This allows for the technical advantage of precise translation between graphical diagrams and their corresponding textual representations. To achieve this, the graphical program objects of the diagram are first identified and then individually translated into corresponding textual program objects during the translation process.

[0061] As explained above, the graphical program objects are predefined by the rules of the selected graphical programming language and correspond to program objects of the control program to be generated. The corresponding textual program objects are textual representations of the respective graphical program objects of the graphical diagram and thus represent the executable program objects of the control program in textual form.

[0062] The textual program objects are therefore not independent program objects, but are primarily textual equivalents of the graphical program objects of the graphical diagram, which, as mentioned, are predefined by the rules of the graphical programming language.

[0063] Furthermore, the graphical behavior is determined within the graphical diagram. This graphical behavior describes the program flow of the graphical diagram and defines the relationships between the individual graphical program objects within the diagram. Thus, the graphical behavior defines the programmatically timed execution of the individual graphical program objects and their interaction within the graphical diagram.

[0064] Based on the graphical behavior, a corresponding textual behavior is generated. This textual behavior describes a program flow within the intermediate textual representation and is a textual equivalent of the graphical behavior. In the textual behavior, the programmatic timing of the individual textual program objects and the linking of these objects to one another within the intermediate textual representation are defined, mirroring the graphical behavior.

[0065] In determining the graphical behavior, graphical object positions can also be determined for the graphical program objects. These graphical object positions describe the positions of the individual graphical objects within the graphical diagram or the graphical behavior. Thus, the graphical object positions of the individual graphical program objects assign each object a location within the flow of the graphical diagram, thereby defining the arrangement of the individual graphical program objects relative to one another.

[0066] The graphical object positions of the graphical program objects allow for the definition of an execution order within the graphical diagram or graphical behavior. These positions enable the individual graphical program objects to be assigned to one another, and a program flow can be defined in which the execution of the graphical program objects occurs according to their respective assigned graphical object positions.

[0067] During the translation process, the graphical object positions of the graphical program objects can be converted into corresponding textual object positions of the respective textual program objects.

[0068] The textual object positions of the respective textual program objects define accordingly a sequence of the arrangement of the textual program objects within the textual behavior and a corresponding program sequence of the control program.

[0069] For the purposes of this application, "behavior" is a description of the functionality or mode of operation of a program function. Behavior includes, for example, the procedure for calculating a function's result based on its parameters.

[0070] According to one embodiment, the first translation step comprises: performing a line-by-line translation in a line translation step, wherein in the line-by-line translation each graphical program object is assigned at least one textual program object in the form of at least one textual line of the textual intermediate representation, and wherein the textual lines provide unique descriptions of the respective graphical program objects.

[0071] This achieves the technical advantage that, through line-by-line translation, the textual program objects corresponding to the graphical program objects of the graphical diagram are each represented by at least one textual line. The line-by-line representation of the textual program objects in the intermediate textual representation ensures easy readability for the user. Thus, the textual program objects are preferably represented in exactly one textual line within the intermediate textual representation.

[0072] This improves the readability of the intermediate textual representation by clearly separating the individual textual program objects and making them easy to understand through line-by-line division. Besides readability, this also facilitates programming, particularly within textual programming. Furthermore, line-by-line translation allows the intermediate textual representation of the program code to be managed within a version control system.

[0073] According to one embodiment, the first translation step comprises: arranging the textual behavior at a behavior position within the textual intermediate representation in an arrangement step, wherein the behavior position defines a position predefined by a standard IEC 61131-3 in a program code at which a behavior of a control program is to be positioned.

[0074] This achieves the technical advantage that, by arranging the textual behavior within the intermediate textual representation at its designated behavioral position, the intermediate textual representation complies with the requirements of the IEC 61131-3 standard. Furthermore, the coherent code of the intermediate textual representation is easier for the user to read because the behavior is located at its intended position.

[0075] A behavioral position, in the context of registration, defines a location within the program code where the behavior must be implemented. The behavioral position can be defined by the guidelines of the respective programming language. In the field of automation and the programming languages ​​used there, the behavioral position may be defined in the IEC 61131-3 standard.

[0076] According to one embodiment, the first generation step comprises: determining the identities of the graphical program objects of the graphical diagram in an identity determination step, wherein the identities of the graphical program objects enable a unique identification of the respective graphical program objects; and wherein the line translation step comprises: integrating the identities of the graphical program objects into the respective textual lines of the textual intermediate representation assigned to the graphical program objects in an integration step.

[0077] This achieves the technical advantage that by determining the identities of the graphical program objects and integrating these identities into the corresponding textual program objects, a unique correspondence between the graphical program objects of the graphical diagram and the textual program objects of the intermediate textual representation is ensured. Furthermore, by integrating the identities of the graphical program objects into the corresponding textual program objects, it can be ensured that links between the graphical program objects in the graphical diagram are correctly reflected in the textual program objects of the intermediate textual representation.

[0078] By clearly specifying the identities within the textual program objects, which not only identifies the respective textual program objects but also indicates their linkage to other textual program objects, the user can easily determine the correctness of the textual intermediate representation in relation to the graphical diagram by examining the textual intermediate representation displayed in the textual editor unit.

[0079] This in turn facilitates the verification of the correctness of the textual intermediate representation, which in turn enables a simplified programming process, which in turn can lead to improved control programs.

[0080] According to one embodiment, the method further comprises: combining the textual intermediate representation of the graphic diagram with at least one further intermediate representation of at least one further graphic diagram to form a total textual intermediate representation in a combination step, wherein in the total intermediate representation a plurality of different textual intermediate representations of a plurality of different graphic diagrams are combined into a coherent code in textual form.

[0081] This achieves the technical advantage that a coherent code for the entire control program can be provided in the form of a single textual intermediate representation. Individual executable objects of the control program can be represented or programmed using different graphical diagrams, possibly even using different graphical programming languages. The respective textual intermediate representations can be combined into the overall textual intermediate representation. Therefore, only one coherent code in the form of the overall textual intermediate representation is needed to represent the entire control program.

[0082] Furthermore, the text of the overall textual intermediate representation is readable by the user as a coherent text. The entire control program is thus stored in a single file and is available to the user in a readable form. The behavior of the respective graphical diagrams is arranged within the overall textual intermediate representation at the behavioral positions defined by the IEC 61131-3 standard. The overall textual intermediate representation therefore provides a textual form of an executable control program that meets the requirements of the IEC 61131-3 standard.

[0083] According to one embodiment, the second generation step comprises: performing a debugging operation based on the textual intermediate representation of the graphical diagram in a debugging step.

[0084] This offers the technical advantage of enabling debugging of the created control program directly based on the intermediate textual representation of the graphical diagram. The intermediate textual representation thus not only provides a textual representation of the graphical diagram, which can be displayed to the user in the textual editor for correction purposes, but is also used directly as a basis in subsequent compilation processes of the control program.

[0085] The graphical diagram, on the other hand, merely represents a graphical representation of the intermediate textual representation, which can be displayed to the user in the graphical editor unit and which the user can modify through the graphical programming process, as known for graphical programming languages ​​in the prior art. The intermediate textual representation, however, is the representation that is decisive for generating the control program during the compilation process.

[0086] According to one embodiment, the second generation step comprises: generating a binary representation of the control program in a binary code generation step.

[0087] This allows the technical advantage to be achieved that an executable representation of the control program can be provided through the binary representation of the control program.

[0088] According to one embodiment, the method further comprises: storing the textual representation in a representation file in a storage step.

[0089] This offers the technical advantage that by saving the intermediate textual representation in a display file, the control program can be saved. As explained above, by reading the display file as a program file, the development environment can convert the corresponding intermediate textual representation into a suitable graphical diagram and display it to the user for further processing in the graphical editor.

[0090] According to one embodiment, the graphical programming language is one of the following groups: ladder diagram, function block language, sequence language.

[0091] This allows the technical advantage to be achieved that the method according to the invention is applicable to the graphical programming languages ​​commonly used in automation technology and defined in the standard IEC 61131-3.

[0092] According to one embodiment, the syntax of the textual intermediate representation and the modified textual intermediate representation are conflict-free with the syntax of the graphical programming language.

[0093] This allows for the technical advantage that, due to the conflict-free syntax of the textual intermediate representation with the syntax of the graphical programming language, a unique textual intermediate representation can be provided that is reliably usable for programming a control program based on the graphical programming language.

[0094] According to one aspect, a development environment is provided with a graphical editor unit, a textual editor unit and a translation module, wherein the development environment is set up to execute the method for generating a control program for an automation system according to one of the preceding embodiments.

[0095] This allows the technical advantage to be achieved that an improved development environment can be provided, which is set up to execute the inventive method for generating a control program for an automation system with the aforementioned technical advantages.

[0096] The invention is explained in more detail with reference to the accompanying figures. These show: Fig. 1 a schematic representation of a system for generating a control program for an automation system according to one embodiment; Fig. 2 a further schematic representation of a system for generating a control program for an automation system according to a further embodiment; Fig. 3 a flowchart of a method for generating a control program for an automation system according to one embodiment; Fig. 4 a further flowchart of the method for generating a control program for an automation system according to a further embodiment; Fig. 5 a further flowchart of the method for generating a control program for an automation system according to a further embodiment; and Fig. 6 a further flowchart of the method for generating a control program for an automation system according to a further embodiment.

[0097] Fig. 1 shows a schematic representation of a system for generating a control program 209 for an automation system according to one embodiment.

[0098] According to the invention, a development environment 200 suitable for carrying out the inventive method for generating a control program for an automation system comprises a graphical editor unit 201, a textual editor unit 203 and a translation module 205.

[0099] The graphical editor unit 201 is designed to perform a graphical programming process according to a graphical programming language known from the prior art. The graphical editor unit 201 can be equipped with all input and display devices known from the prior art that are required to execute a graphical programming process.

[0100] The textual editor unit 203 is designed for a textual programming process. For this purpose, the textual editor unit 203 can include all display and input devices known from the prior art that are required for executing a textual programming process.

[0101] According to the invention, the translation module 205 is configured to perform a translation operation between the graphical diagrams 211 displayed or generated in the graphical editor unit 201 of a predefined graphical programming language into corresponding textual intermediate representations 213. Furthermore, the translation module 205 is configured to perform a reverse translation, in which corresponding textual intermediate representations 213 displayed or generated in the textual editor unit 203 are translated into corresponding graphical diagrams 211 of a previously selected graphical programming language.

[0102] According to one embodiment, the graphical programming languages ​​considered by the inventive method or the inventive development environment 200 include the languages ​​ladder diagram, function block language and sequence language, each of which is predefined in the standard IEC 61131-3 for automation technology.

[0103] The translation module 205 is accordingly able to convert the aforementioned programming languages ​​into textual intermediate representations 213.

[0104] According to the invention, the textual intermediate representations 213 are written in a user-readable form. For this purpose, the textual intermediate representations 213 are written in a known and readable form that is similar to natural languages, such as English, German, Spanish, Mandarin, or a similar common world language.

[0105] The letters, terms, or symbols / special characters used are taken from the aforementioned natural languages. Furthermore, the intermediate textual representations 213 are presented in line form and allow readability within a display field of the textual editor unit 203 from top left to bottom right, or follow another recognized convention of readability.

[0106] In addition to the components shown, the development environment can include 200 additional components required for compiling or programming a control program, but these are not shown here for clarity. These can include input and output interfaces, a compiler, a debugging module, and other components known from prior art programming.

[0107] To execute the procedure for generating a control program for an automation system, the development environment 200 first receives input data 207 for a control program 209. The input data 207 comprises descriptions of the graphical diagram 211 of a previously selected graphical programming language.

[0108] Based on the input data 207, the graphical editor unit 201 then generates a graphical diagram 211 corresponding to the input data 207 and displays it in the graphical editor unit 201. The graphical editor unit 201 includes a corresponding display unit for this purpose.

[0109] If the input data 207 is in textual form, the input data 207 is first translated into a graphical diagram 211 by the translation module 205 before being displayed in the graphical editor unit 201.

[0110] In the Fig. 1 The example shown includes the graphical diagram 211 comprising five graphical program objects 217. The five graphical program objects 217 comprise three node objects 249, each of which is connected to each other via two edge objects 251.

[0111] The graphical program objects 217 represent graphical representations of program objects 219 of the control program 209.

[0112] The graphical diagram 211 shown here is merely an example of possible graphical diagrams 211 of the programming languages ​​ladder diagram, function block language and sequence language.

[0113] In a subsequent translation step, the graphical diagram 211 displayed in the graphical editor unit 201 is translated by the translation module 205 into a corresponding intermediate textual representation 213. The intermediate textual representation 213 is then displayed in the textual editor unit 203. For this purpose, the textual editor unit 203 includes a corresponding display device.

[0114] In the textual intermediate representation 213, five textual program objects 225 of the textual intermediate representation 213 are defined for the five graphical program objects 217 of the graphical diagram 211. The textual program objects 225 represent textual representations or textual descriptions of the graphical program objects 217 of the graphical diagram.

[0115] The intermediate textual representation 213 can be viewed by the user of the development environment 200 in the textual editor unit 203. This allows errors in the graphical diagram 211 to be detected and, if necessary, corrected.

[0116] The control program 209 can then be generated based on the graphic diagram 211 and / or based on the textual intermediate representation 213.

[0117] According to one embodiment, the input data 207 includes a program file 221. A graphical diagram 211 is stored in textual form in the program file 221.

[0118] By reading the information from program file 221, the development environment 200 can generate a graphical diagram 211 corresponding to the input data of program file 221 and display it to the user in the editor unit 201. For this purpose, the translation module 205 can first translate the information stored in textual form in program file 221 into a corresponding graphical diagram 211.

[0119] In the aforementioned embodiment, the case is described in which an already existing graphical diagram 211, stored in the program file 221, is loaded by the development environment 200 and displayed to the user in the graphical editor unit 201 for further processing.

[0120] According to another embodiment, the input data 207 comprise graphical input commands 215. These graphical input commands 215 are programming commands that are transmitted by a user of the development environment 200 to the graphical editor unit 201 in a graphical programming process. The graphical input commands 215 can, for example, include adding or removing graphical program objects 217 from the graphical diagram 211. In this embodiment, the case is described in which, during a graphical programming process, a user of the development environment 200 modifies a graphical diagram 211 or completely regenerates a graphical diagram 211 within the graphical editor unit 201.

[0121] The present invention also includes a combination of the two embodiments, in which, for example, by first reading the information from the program file 221, an already existing graphic diagram 211, which is stored in textual form in the program file 221, is uploaded to the graphic editor unit 201 and displayed to the user in this unit for further processing.

[0122] By executing a graphical programming operation in which the user transmits graphical input commands 215 in the form of adding or removing graphical program objects 217 to or from the graphical diagram 211 to the graphical editor unit 201, the graphical diagram 211, which was previously loaded into the graphical editor unit 201 based on the information from the program file 221, is modified or further developed.

[0123] According to one embodiment, to translate the graphical diagram 211 into the textual intermediate representation 213, the graphical program objects 217 and a graphical behavior 233 of the graphical diagram 211 are first determined. The graphical behavior is given here by the entirety of all graphical program objects 217.

[0124] Graphical behavior 233 describes the program flow of graphical diagram 211. Graphical diagram 211 is a graphical formal description of the behavior of the program code.

[0125] The translation of the graphical diagram 211 into the textual intermediate representation 213 results in the translation of at least one graphical program object 217 into at least one corresponding textual program object 225. The at least one textual program object 225 represents a textual representation of the at least one graphical program object 217 and describes the same program object 219 of the control program 209 as the corresponding graphical program object 217 of the graphical diagram 211.

[0126] The graphical behavior can be determined by considering ephemeral representations of the graphical diagram 211. As is known from the prior art, graphical diagrams 211 written in graphical programming languages ​​are represented in ephemeral representations. These ephemeral representations are not permanently stored in memory but exist only during the creation or display of the graphical diagrams in the graphical editor unit 201 in the main memory of the computer running the development environment 200.

[0127] The transient representations exist as bit sequences in the RAM of the computer executing the development environment 200 during the processing of the graphical diagram 211 in the development environment 200 and represent the individual components, including the graphical program objects 217 of the graphical behavior of the graphical diagram 211.

[0128] By reading the volatile representations through the development environment 200, the graphical program objects 217 and their graphical behavior can be identified. Furthermore, the position and size information of the graphical diagram 211 and the graphical program objects 217 contained within it can be determined by reading this information. The position and size information describes the positions and sizes at which the individual components, i.e., the graphical program objects 217, are displayed in the graphical editor unit 201.

[0129] Taking into account the transient representations of the graphic diagram 211, the corresponding textual intermediate representation 213, including the textual program objects 225 and the textual behavior 237, can be translated from the graphic diagram 211.

[0130] According to one embodiment, the translation of the graphical diagram 211 into the intermediate textual representation 213 is performed line by line. In this process, a corresponding textual program object 225 is assigned to the at least one graphical program object 217. The textual program object 225 is given by at least one textual line 241 of the intermediate textual representation 213. Preferably, the textual program objects 225 are represented by exactly one textual line 241 within the intermediate textual representation 213.

[0131] The textual program objects 225 represented in the form of textual lines 241 can be arranged in the textual intermediate representation 213 according to the respective identities 243 of the graphical program objects 217 integrated into the textual program objects 225.

[0132] According to one embodiment, to translate the graphical diagram 211 into the intermediate textual representation 213, identities 243 of the graphical program objects 217 are determined. These identities 243 enable the unique identification of each individual graphical program object 217. During the line-by-line translation of the graphical diagram 211 into the intermediate textual representation 213, the identities 243 of the graphical program objects 217 are integrated into the corresponding textual program objects 225.

[0133] The identities 243 can, for example, be designed as sequences of numbers or letters, by means of which a unique identification of the graphical program objects 217 or the textual program objects 225 is made possible.

[0134] Furthermore, during translation, graphical object positions 235 of the graphical program objects 217 within the graphical diagram 211 can be determined. The graphical object positions 235 assign positions within the graphical behavior to the respective graphical program objects 217 and assign the graphical program objects 217 to each other. The execution order of the graphical program objects 217 within a program flow of the graphical diagram 211 can thus be defined via the graphical object positions 235.

[0135] In the translation process, the graphic object positions 235 assigned to the graphic program objects 217 can be converted into corresponding textual object positions 253 and assigned to the respective textual program objects 225. The textual program objects 225 can be assigned to each other via the textual object positions 253, and a corresponding execution sequence for the textual program objects 225 can be defined. This allows for the definition of a corresponding program sequence for the textual behavior.

[0136] The textual program objects 225 thus provide a unique textual description of the respective graphical program objects 217. The textual description can include information regarding the type of the respective graphical program object 217, information regarding links of the respective graphical program object 217 with other graphical program objects 217, the identities 243, and other relevant information.

[0137] For example, position information for the graphical program objects 217 can be integrated into the textual program objects 225. This position information describes the positioning of the respective graphical program objects 217 of the graphical diagram 211 within the display device of the graphical editor unit 201. The position information can include, for example, x and y coordinates.

[0138] In addition to position information, size information can be included, which also defines the size of the respective graphical program object 217 within the display device of the graphical editor unit 201 via the x and y coordinates.

[0139] In addition to the type of the respective graphical program object 217, the corresponding textual program objects 225 may also include functionalities or limitations of the respective graphical program objects 217. The types or functionalities of the graphical program objects 217 are defined by the aforementioned standard IEC 61131-3.

[0140] The position and size information, which exclusively concerns the graphical representation of the graphical program objects 217 in the graphical editor unit 201, can, for example, be individually defined by the manufacturer.

[0141] In addition to the textual program objects 225 of the textual behavior 237, the textual intermediate representation 213 includes additional textual information 255. This additional textual information 255 can include, for example, data types, variable types, interfaces, or other information.

[0142] The additional textual information can be written in a basic language predefined by the IEC 61131-3 standard. The basic language describes the form specified by the standard in which the additional information must be written.

[0143] In the embodiment shown, the textual behavior 237 is embedded in the text of the additional textual information 255 at the predefined behavior position 239. The behavior position 239 defines the position in the intermediate textual representation 213 where the textual behavior 237 is to be placed.

[0144] The basic language of the textual additional information 255 can be based on known natural languages ​​and written in a form readable by the user.

[0145] According to one embodiment, the correspondingly generated textual intermediate representation 213 can be stored in a representation file 245.

[0146] According to the invention, after generating the textual intermediate representation 213 and displaying the textual intermediate representation 213 in the textual editor unit 203 based on the graphic diagram 211 and / or based on the textual intermediate representation 213, the control program 209 represented by the graphic diagram 211 and / or the textual intermediate representation 213 is generated.

[0147] Furthermore, according to one embodiment, a debugging operation can first be performed based on the intermediate textual representation 213. For this purpose, the development environment 200 can include a component set up for executing a debugging operation, for example in the form of a debugger.

[0148] According to one embodiment, when the control program 209 is generated, the control program 209 is created in a binary representation. The binary representation can in turn be stored in the representation file 245.

[0149] Fig. 2 shows another schematic representation of a system for generating a control program 209 for an automation system according to a further embodiment.

[0150] The embodiment in Fig. 2 based on the embodiment in Fig. 1 and includes all features described therein. Provided these are included in the embodiment in Fig. 2 Since it will remain unchanged, a further detailed description will be omitted.

[0151] In the embodiment shown, the development environment 200 is able to provide the user with the possibility of a textual programming process. The textual programming process is carried out on the textual intermediate representation 213. Through the textual programming process, the user can thus access the textual intermediate representation 213 of the Fig. 1 , for example by adding or removing textual program objects 225 to or from the textual intermediate representation 213, modifying the textual intermediate representation 213 and creating a modified textual intermediate representation 227.

[0152] For this purpose, the textual editor unit 203 receives corresponding textual input commands 223. These textual input commands 223 describe the programming commands entered by the user during the textual programming process, by which textual program objects 225 are added, removed, or modified.

[0153] Modifying textual program objects 225 can involve removing the textual program object to be modified and adding the corresponding modified textual program object. The textual input commands 223 can depend individually on the language used to represent the textual intermediate representations 213, 227, or the textual program objects 225, and on the respective individual textual descriptions of the graphical program objects 217 within the textual program objects 225.

[0154] The syntax of the textual intermediate representation 213, 227 can at least partially correspond to the syntax of the graphical programming language predefined in the above-mentioned standard IEC 61131-3.

[0155] In the embodiment shown, the modifications of the textual intermediate representation 213 based on the user's textual input commands 223 comprise the Fig. 1 the addition of two further textual program objects 247. The two further textual program objects 247 are represented textually by textual lines 241 according to the properties described above, in accordance with the original textual program objects 225.

[0156] By executing a translation process by the translation module 205, a correspondingly modified graphical diagram 231 is generated from the modified textual intermediate representation 227. Two further graphical program objects 229 are integrated into the modified graphical diagram 231, corresponding to the modified textual intermediate representation 227. In the embodiment shown, the two further graphical program objects 229 are connected with the graphical program objects 217 to form a coherent graphical diagram.

[0157] In the embodiment shown, the user is thus able to modify a previously generated graphical diagram 211 by executing a corresponding textual programming operation. The user is therefore able to modify the control program 209 based on the previously selected graphical programming language both by executing a graphical programming operation, as is necessary for Fig. 1 as described, as well as in the execution of a text-based programming process, as this leads to Fig. 2 as described, to generate.

[0158] The user can thus select the most convenient programming method and can switch between different textual and graphical programming processes even while programming. Changes made during one programming process are immediately reflected in the other representation through translation. Changes made in graphical diagram 211 are immediately reflected in the textual intermediate representations 213 and 227. Similarly, changes made in textual intermediate representations 213 and 227 are immediately reflected in graphical diagrams 211 and 231 after translation.

[0159] In the graphical diagram 211, newly added or deleted graphical program objects 217 are displayed as newly added or deleted textual program objects 225 in the textual intermediate representation 213, or integrated into it or deleted from it.

[0160] Fig. 3 shows a flowchart of a method 100 for generating a control program 209 for an automation system according to an embodiment.

[0161] To generate a control program for an automation system, input data 207 for a control program 209 of the automation system is first received by a development environment 200 in a receive step 101. The input data 207 describes a graphical diagram 211 of a graphical programming language. The graphical diagram, in turn, graphically represents at least a part of the control program 209 to be programmed, according to the graphical programming language.

[0162] According to one embodiment, the graphical programming language can be one of the programming languages ​​defined in the IEC 61131-3 standard: ladder diagram, function block language or sequence of functions.

[0163] In a first generation step 103, a corresponding graphical diagram 211 is subsequently generated based on the input data 207 by a graphical editor unit 201 of the development environment 200.

[0164] In a first display step 105, the graphic diagram 211 is displayed in the graphic editor unit 201.

[0165] Subsequently, in a first translation step 107, the graphical diagram 211 of the graphical programming language is translated by a translation module 205 of the development environment 200 into a textual intermediate representation 213 of the graphical diagram 211. The textual intermediate representation 213 is a textual description of the graphical diagram 211.

[0166] The textual description of the intermediate textual representation 213 is designed in such a way as to ensure that the intermediate textual representation 213 is readable by a user of the development environment 200. The intermediate textual representation 213 thus comprises the complete information of the graphical diagram 211 in a textual form that is easily readable by the user.

[0167] Subsequently, in a second display step 109, the intermediate textual representation 213 generated by translating the graphical diagram 211 is displayed in a textual editor unit 203 of the development environment 200. The user can thus check the functionality and / or error-free operation of the corresponding graphical diagram 211 by inspecting the displayed intermediate textual representation 213.

[0168] Finally, in a second generation step 111, the control program 209 is generated based on the textual intermediate representation 213 and / or based on the graphic diagram 211.

[0169] Fig. 4 shows another flowchart of the method 100 for generating a control program 209 for an automation system according to a further embodiment.

[0170] The embodiment in Fig. 4 based on the embodiment in Fig. 3 and includes all the procedural steps described therein. If these remain unchanged, a further detailed description is omitted.

[0171] In the embodiment shown, two cases for providing the input data 207 for generating the graphical diagram 211 are described.

[0172] In one instance, during a read step 115, a program file 221 is read by the development environment 200. The program file 221 contains a textual description of the graphical diagram 211. The input data 207 corresponds to the textual information in the program file 221.

[0173] In a second translation step 117, the textual information of the program file 221 is translated into the graphical diagram 211 by the translation module 205.

[0174] This describes the case where, to generate the graphical diagram 211 based on the input data 207, a previously generated graphical diagram 211, which is temporarily stored in textual form in the program file 221, is created by the development environment 200 by reading the information from the program file 221. When the program file 221 is read, the information stored in textual form in the program file 221 is first deconstructed and accordingly converted into a graphical diagram 211, which can be displayed in the graphical editor unit 201.

[0175] This includes the case where a previously generated graphic diagram 211 is loaded into the development environment 200 in order to be further processed or modified by executing appropriate programming operations.

[0176] In the second case, in a graphical programming step 113, graphical input commands 215 from a user of the development environment 200 are first received by the graphical editor unit 201. The input data 207 comprise the graphical input commands 215. The graphical input commands 215, in turn, comprise programming commands for adding and / or removing and / or modifying graphical program objects 217. The 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.

[0177] This describes the case of a graphical programming process. The graphical input commands 215 correspond to programming actions that are entered by the user during programming according to the graphical programming language.

[0178] The graphical programming process allows an existing graphical diagram 211, displayed in the graphical editor unit 201, to be modified by adding or removing graphical program objects 217. Alternatively, a completely new graphical diagram 211 can be created by executing the graphical programming process.

[0179] Fig. 5 shows another flowchart of the method 100 for generating a control program 209 for an automation system according to a further embodiment.

[0180] The in Fig. 5 The embodiment shown is based on the embodiment in Fig. 4 and includes all process steps described therein. Should these remain unchanged in the embodiment shown, a further detailed description is omitted.

[0181] In the embodiment shown, in a textual programming step 119, the textual editor unit 203 of the development environment 200 first receives textual input commands 223 from the user. These textual input commands 223 add or remove textual program objects 225, which are textual representations of corresponding graphical program objects 217 of the graphical diagram 211, from the intermediate textual representation 213. The textual program objects 225 are textual representations of the graphical program objects 217 of the graphical diagram 211.

[0182] In a third generation step 121, a modified textual intermediate representation 227 is generated based on the textual input commands 223 and the textual intermediate representation 213.

[0183] In a third translation step 123, the modified textual intermediate representation 227 is subsequently translated into a correspondingly modified graphical diagram 231. Alternatively or additionally, the textual modifications of the textual intermediate representation 213 caused by the textual input commands can be translated into graphical modifications of the graphical diagram 211.

[0184] The textual modifications comprise at least one textual program object 225 that is newly added to or deleted from the textual intermediate representation 213. The graphical modifications translated from the textual modifications comprise, accordingly, at least one graphical program object 217 that is newly added to or deleted from the graphical diagram 211.

[0185] In a fourth display step 127, the modified textual intermediate representation 227 of the modified graphic diagram 231 is displayed in the textual editor unit 203.

[0186] In a third display step 125, the modified graphical diagram 231 is displayed in the graphical editor unit 201 instead of the graphical diagram 211.

[0187] Alternatively or additionally, the graphical modifications are displayed in graphical diagram 211. For this purpose, graphical diagram 211 is modified in the graphical editor unit 210 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.

[0188] The newly added graphical program object 217 can be marked accordingly as a new graphical program object 217, for example by color.

[0189] Accordingly, the graphical program object 217 deleted from graphical diagram 211 according to the graphical modifications can be marked accordingly, possibly also with a color. Alternatively, the deleted graphical program object 217 can also be no longer displayed in graphical diagram 211.

[0190] Furthermore, in a summarization step 141, the textual intermediate representations 213 of the graphic diagram (211) and at least one further intermediate representation of at least one further graphic diagram are summarized into a single textual intermediate representation. In the single intermediate representation, a plurality of different textual intermediate representations 213 of a plurality of different graphic diagrams 211 are thus summarized into a coherent code in textual form.

[0191] The textual behaviors of the several textual intermediate representations 213 are arranged at the corresponding behavioral positions in the overall textual intermediate representation.

[0192] Between the textual behaviors 237 of the various graphical diagrams, the textual supplementary information 255 is arranged in the overall textual intermediate representation. As described above, the textual supplementary information 255 can include, for example, data types, variable types, interfaces, or other information. The textual supplementary information arranged in the overall intermediate representation between the behaviors of the various graphical diagrams can be written in a basic language predefined by the IEC 61131-3 standard.

[0193] The base language here describes the form specified by the standard in which the additional information must be written.

[0194] The behavior of the various graphical diagrams, on the other hand, is described in a textual sublanguage with a syntax that corresponds to the graphical structure of the programming languages ​​ladder diagram, function block language or sequence language defined by the IEC 61131-3 standard.

[0195] The sublanguage represents the aforementioned graphical programming languages ​​in textual form and is designed in a user-readable format.

[0196] In the overall textual intermediate representation, the base language provides the framework of the coherent code, while the sublanguages ​​are textual representations of the graphical diagrams, and in particular of the behavior of the graphical diagrams 211.

[0197] According to one embodiment, the intermediate textual representation 213, which represents only a graphical diagram 211, can also include a section written in the basic textual language predefined by the IEC 61131-3 standard, in which the additional information, including basic conditions such as data types and / or variable types, of the textual behavior 237 representing the graphical behavior 233 is provided. The corresponding textual behavior 237 is written in the sublanguage corresponding to one of the programming languages ​​ladder logic, function block programming language, or sequence programming language, as described above.

[0198] In the embodiment shown, the control program 209 is generated in the second generation step 111 based on the modified textual intermediate representation 227 or based on the total textual intermediate representation and / or based on the modified graphic diagram 231 or the plurality of modified graphic diagrams 231.

[0199] In the embodiment shown, the case is described in which, by executing a textual programming operation by the user based on the textual intermediate representation 213, a modification of the textual intermediate representation 213 and, based on this, a modification of the graphical diagram 211 is effected.

[0200] For this purpose, the user removes textual program objects 225 from the textual intermediate representation 213 or adds further textual program objects 247 to the textual intermediate representation 213 by means of textual input commands 223. By modifying the textual intermediate representation 213 by the user through the textual programming process, a correspondingly modified graphical diagram 231 can be generated after the modified textual intermediate representation 227, created by executing the modification, has been translated.

[0201] The user can thus advance the programming of the control program 209 based on the graphical programming language by executing both a graphical programming operation and a textual programming operation.

[0202] Fig. 6 shows another flowchart of the method 100 for generating a control program 209 for an automation system according to a further embodiment.

[0203] The embodiment in Fig. 6 based on the embodiment in Fig. 5 and includes all process steps described therein. Should these remain unchanged in the embodiment shown, a further detailed description is omitted.

[0204] In the embodiment shown, the first generation step 103 comprises an identity determination step 137. In the identity determination step 137, identities 243 of the graphical program objects 217 of the graphical diagram 211 are determined. The identities 243 enable a unique identification of the respective graphical program objects 217.

[0205] Furthermore, the first translation step 107 includes a behavior determination step 129. In the behavior determination step 129, the graphical program objects 217 and a graphical behavior 233 of the graphical diagram 211 are determined.

[0206] The graphical behavior 233 is, according to the invention, a graphical representation of a program flow of the control program 209.

[0207] In a behavior translation step 131, the graphical program objects 217 and the graphical behavior 233 are subsequently translated into textual program objects 225 and a textual behavior 237 of the textual intermediate representation 213. The textual behavior 237 represents a textual representation of the program flow of the control program 209.

[0208] In a line translation step 133, a line-by-line translation of the graphical diagram 211 into the intermediate representation 213 is subsequently performed. In the line-by-line translation, each graphical program object 217 is assigned at least one textual program object 225 in the form of a textual line 241 of the textual intermediate representation 213. The textual lines 241 represent a unique description of the respective graphical program objects 217.

[0209] In an integration step 139, the previously determined identities 243 of the graphical program objects 217 are integrated into the respective textual program objects 225 represented by the textual lines 241.

[0210] In an ordering step 135, the textual behavior 237 is subsequently arranged within the textual intermediate representation 213 at the behavior position 239. The behavior position 239 defines the arrangement of the textual behavior 237 within the textual intermediate representation 213.

[0211] The individual textual program objects 225, represented as textual lines 241, can be arranged according to the integrated identities 243.

[0212] Furthermore, in the embodiment shown, a debugging operation of the control program 209 is carried out in a debugging step 143 based on the textual intermediate representation 213 or the modified textual intermediate representation 227.

[0213] Furthermore, the second generation step 111 includes a binary code generation step 145. In the binary code generation step 145, a binary representation of the control program 209 is generated to create the control program 209.

[0214] Finally, in a storage step 147, the textual intermediate representation 213 or the modified textual intermediate representation 227, on which the generated control program 209 is based, is stored in a representation file 245. Reference symbol list

[0215] 100 Procedure 101 Receive step 103 First generation step 105 First display step 107 First translation step 109 Second display step 111 Second generation step 113 Graphical programming step 115 Read step 117 Second translation step 119 Textual programming step 121 Third generation step 123 Third translation step 125 Third display step 127 Fourth display step 129 Behavior determination step 131 Behavior translation step 133 Line translation step 135 Arrangement step 137 Identity determination step 139 Integration step 141 Summary step 143 Debugging step 145 Binary code generation step 147 Storage step 200 Development environment 201 Graphical editor unit 203 Textual editor unit 205 Translation module 207 Input data 209 Control program 211 Graphical diagram 213 Textual intermediate representation 215 Graphical input command 217 Graphical program object 219 Executable program object 221 Program file 223 Textual input command 225 Textual program object 227 Modified textual intermediate representation 229 Another graphical program object 231 Modified graphical diagram 233 Graphical behavior 235 Graphical object position 237 Textual behavior 239 Behavior position 241 Textual line 243 Identity 245 Display file 247 Another textual program object 249 Node object 251 Edge object 253 Textual object position 255 Textual additional information

Claims

1. A computer-implemented method (100) for generating a control program for an automation system, comprising: receiving input data (207) for a control program (209) of an automation system from a development environment (200) in a receiving step (101), wherein the input data (207) describe a graphical diagram (211) of a graphical programming language, and wherein the graphical diagram (211) graphically represents at least a part of a control program (209) for an automation system according to the graphical programming language; generating the graphical diagram (211) of the graphical programming language based on the input data (207) by a graphical editor unit (201) of the development environment (200) in a first generating step (103); displaying the graphical diagram (211) in the graphical editor unit (201) of the development environment (200) in a first displaying step (105), characterized by: translating the graphical diagram (211) of the graphical programming language into a textual intermediate representation (213) of the graphical diagram (211) by a translation module (205) of the development environment (200) in a first translating step (107); wherein the textual intermediate representation (213) provides a textual description of the graphical diagram (211); displaying the textual intermediate representation (213) of the graphical diagram (211) in a textual editor unit (203) of the development environment (200) in a second displaying step (109), wherein the textual intermediate representation (213) is displayed in the textual editor unit (203) in a form readable for a user of the development environment (200); and generating the control program (209) based on the textual intermediate representation (213) of the graphical diagram (211) of the graphical programming language and / or based on the graphical diagram (211) in a second generating step (111).

2. The method (100) according to claim 1, wherein the receiving step (101) comprises: receiving graphical input commands (215) from a user of a development environment (200) via the graphical editor unit (201) of the development environment (200) in a graphical programming step (113), wherein the input data (207) comprise graphical input commands (215), wherein the graphical input commands (215) comprise programming commands for adding and / or removing graphical program objects (217) of the graphical diagram (211), and wherein the graphical program objects (217) are partial elements of the graphical diagram (211) and represent program objects (219) of the control program (209).

3. The method (100) according to claim 1 or 2, wherein the receiving step (101) comprises: reading in a program file (221) in a reading step (115), wherein the program file (221) contains the input data (207) of the graphical diagram (211) in textual form, wherein the graphical program objects (217) of the graphical diagram (211) are described textually by the input data (207); translating the textual input data (207) into the graphical diagram (211) by the translation module (205) in a second translating step (117).

4. The method (100) according to any one of the preceding claims, further comprising: receiving textual input commands (223) from the user via the textual editor unit (203) of the development environment (200) in a textual programming step (119), wherein textual program objects (225) as textual representations of corresponding graphical program objects (217) of the graphical diagram (211) are added to the textual intermediate representation (213) of the graphical diagram (211) or removed therefrom with the aid of the textual input commands (223) generating a modified textual intermediate representation (227) based on the textual input commands (223) and the textual intermediate representation (213) of the graphical diagram (211) in a third generating step (121); translating the modified textual intermediate representation (227) into a correspondingly modified graphical diagram (231) of the graphical programming language and / or translating textual modifications of the textual intermediate representation (213) caused by the textual input commands into graphical modifications of the graphical diagram (211) with the aid of the translation module (205) in a third translating step (123), wherein the textual modifications comprise at least one newly added or deleted textual program object (225), and wherein the graphical modifications comprise at least one newly added or deleted graphical program object (217); displaying the modified graphical diagram (231) instead of the graphical diagram (211) and / or displaying the graphical modifications in the graphical diagram (211) in the graphical editor unit (201) in a third displaying step (125); and generating the control program (209) based on the modified textual intermediate representation (227) of the modified graphical diagram (231) and / or based on the modified graphical diagram (231) in the second generating step (111).

5. The method (100) according to claim 4, further comprising: displaying the modified textual intermediate representation (227) of the modified graphical diagram (231) in the textual editor unit (203) in a fourth displaying step (127).

6. The method (100) according to any one of the preceding claims, wherein the first translating step (107) further comprises: determining the graphical program objects (217) and a graphical behavior (233) of the graphical diagram (211) in a behavior determining step (129), wherein the graphical behavior (233) describes a graphical representation of a program flow of the control program (209); and translating the graphical program objects (217) and the graphical behavior (233) of the graphical diagram (211) into textual program objects (225) and a textual behavior (237) of the textual intermediate representation (213) in a behavior translating step (131), wherein the textual behavior (237) represents a textual intermediate representation (213) of the execution of the control program (209).

7. The method (100) according to any one of the preceding claims, wherein the first translating step (107) comprises: carrying out a line-by-line translation in a line translating step (133), wherein in the line-by-line translation, each graphical program object (217) is assigned at least one textual program object (225) in the form of at least one textual line (241) of the textual intermediate representation (213), and wherein the textual lines (241) contain unique descriptions of the respective graphical program objects (217).

8. The method (100) according to claim 7, wherein the first translating step (107) comprises: arranging the textual behavior at a behavior position (239) within the textual intermediate representation (213) in an arranging step (135), wherein the behavior position (239) defines a position predefined by an IEC 61131-3 standard in a program code at which a behavior of a control program is to be positioned.

9. The method (100) according to claim 7, wherein the first generating step (103) comprises: determining identities (243) of the graphical program objects (217) of the graphical diagram (211) in an identity determining step (137), wherein the identities (243) of the graphical program objects (217) allow for unique identification of the respective graphical program objects (217); and wherein the line translating step (133) comprises: integrating the identities (243) of the graphical program objects (217) into the respective program objects (225) of the textual intermediate representation (213) assigned to the graphical program objects (217) and written in textual lines (241) in an integrating step (139).

10. The method (100) according to any one of the preceding claims, further comprising: summarizing the textual intermediate representation (213) of the graphical diagram (211) with at least one further intermediate representation of at least one further graphical diagram to form a textual overall intermediate representation in a summarizing step (141), wherein the overall intermediate representation summarizes a plurality of different textual intermediate representations (213) of a plurality of different graphical diagrams (211) into a coherent code in textual form.

11. The method (100) according to any one of the preceding claims, wherein the second generating step (111) comprises: carrying out a debugging process based on the textual intermediate representation (213) of the graphical diagram (211) in a debugging step (143).

12. The method (100) according to any of the preceding claims, wherein the second generating step (111) comprises: generating a binary representation of the control program (209) in a binary code generating step (145).

13. The method (100) according to any one of the preceding claims, further comprising: storing the textual representation in a representation file (245) in a storing step (147), and / or wherein the graphical programming language is any one of the following: contact diagram, function block language, flowchart language.

14. The method (100) according to any one of preceding claims 4 to 5, wherein a syntax of the textual intermediate representation (227) and the modified textual intermediate representation (213) is conflict-free with a syntax of the graphical programming language.

15. A development environment (200) having a graphical editor unit (201), a textual editor unit (203) and a translation module (205), wherein the development environment (200) is set up to carry out the method (100) according to any one of the preceding claims 1 to 14.