Method for generating a control program for an automation system, and development environment

EP4689814A1Active Publication Date: 2026-02-11BECKHOFF AUTOMATION GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
EP2024729829
Authority / Receiving Office
EP · EP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-27
Filing Date
2024-05-28
Publication Date
2026-02-11
Estimated Expiration
2044-05-28

AI Technical Summary

Technical Problem

Existing development environments for automation systems are limited to graphical programming, restricting users to only graphical representations and lacking the ability to easily switch between graphical and textual programming.

Method used

A computer-implemented procedure and development environment that allows generating a control program for an automation system by receiving input data for a graphic diagram, translating it into a textual intermediate representation, and enabling both graphical and textual programming, allowing users to switch between the two.

Benefits of technology

This approach simplifies the programming process by allowing users to easily identify and correct errors, reduces downtime of automation systems, and enables more efficient control programs by allowing both graphical and textual representations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure EP2024064629_03042025_PF_FP_ABST
    Figure EP2024064629_03042025_PF_FP_ABST
Patent Text Reader

Abstract

The invention relates to 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 by a development environment (200) in a receipt step (101); generating a graphical diagram (211) in the graphical programming language based on the input data (207) by a graphical editor unit (201) of the development environment (200) in a first generation step (103); displaying the graphical diagram (211) in the graphical editor unit (201) of the development environment (200) in a first display step (105); translating the graphical diagram (211) in 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 translation step (107); 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 display step (109); 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 generation step (111).
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Description

[0002] Method for generating a control program for an automation system and development environment

[0003] The patent application claims priority from German patent application 10 2023 126 332.3, the disclosure of which is hereby incorporated by reference.

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

[0005] Graphic programming languages ​​are well-known for the graphical programming of programmable logic controllers (PLCs) in automation technology. The IEC 61131-3 standard defines three graphical programming languages: ladder diagram, function block diagram, and sequential function chart. These graphical programming languages ​​enable user-friendly graphical programming by adding and / or removing predefined graphical program objects to graphically generate graphical diagrams as graphical representations for control programs to be created for programmable logic controllers.

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

[0007] 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 thus limited to graphical programming in the graphical editor unit.

[0008] Graphical programming has many advantages over textual programming, such as comparatively easy learning of the programming language. At the same time, however, graphical programming also has some disadvantages compared to textual programming. Therefore, it is 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] This object is achieved 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:

[0011] Receiving input data for a control program of an automation system by a development environment in a receiving step, wherein the input data describe a graphical diagram of a graphical programming language, and wherein the graphical diagram graphically depicts at least part of a control program for an automation system according to the graphical programming language;

[0012] 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;

[0013] Displaying the graphical diagram in the graphical editor unit of the development environment in a first display step;

[0014] Translating the graphical diagram of the graphical programming language into a textual intermediate representation of the graphical diagram by a translation module of the development environment in a first translation step, wherein the textual intermediate representation provides a textual description of the graphical diagram; displaying the textual intermediate representation of the graphical diagram in a textual editor unit of the development environment in a second display step; and generating the control program based on the textual intermediate representation of the graphical diagram of the graphical programming language and / or based on the graphical diagram in a second generation step.

[0015] This makes it possible to achieve 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 by a correspondingly configured development environment with a graphical editor unit, a textual editor unit, and a translation module. The graphical editor unit enables graphical programming according to a graphical programming language. The textual editor unit enables textual programming of the control program according to the graphical programming language.

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

[0017] The method provides for the generation of a valid graphical diagram based on input data by the graphical editor unit according to a selected graphical programming language and for displaying this diagram in the graphical editor unit to a user of the development environment. The graphical diagram represents at least part of the control program to be generated for the automation system according to the rules of the selected graphical programming language.

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

[0019] The translation module translates the graphical diagram into a corresponding textual intermediate representation. The textual intermediate representation represents a textual description of the graphical diagram, including the graphical program objects contained therein. According to the invention, the textual intermediate representation is implemented in a form that is readable by the user of the development environment.

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

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

[0022] Furthermore, a user unfamiliar with textual programming languages ​​can interpret the program code more easily using the graphical representation and can identify and correct errors in the program code or on the machine more quickly. Downtimes of the automation system being controlled can thus be substantially reduced. Conversely, an experienced user, such as a software developer who is familiar with all textual and graphical programming languages ​​used, has more options for generating code more efficiently and effectively if the user can generate code in a textual programming language.

[0023] 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. Thus, no additional textual intermediate representation for the graphical diagram is required, which is required exclusively for saving or compiling the control program based on the graphical diagram.

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

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

[0026] By taking the textual intermediate representation into account, the created program code is also well-compatible with version control systems. In particular, the created program code can be saved in the textual form of the textual intermediate representation. Program code saved in this way can be easily managed in version control systems.

[0027] In addition, storing the program code in text form can reduce the storage space required.

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

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

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

[0031] For example, a user can change the behavior of a machine control system by making changes to an executable program object, with the changes being implemented graphically, for example. The user can then transmit the modified executable program object to a coworker as a coherent text, for example, via email, fax, letter, dictation, telegram, or stone tablet. The coworker is then able to replace the active executable program object with the transferred program object, thus consistently changing the machine's behavior in a single step.

[0032] Furthermore, the textual intermediate representation provides a good overview for the user, e.g. by displaying a complete class in a text editor, including the behavior of all methods of the class.

[0033] Furthermore, the method enables the easy generation of program code containing executable program objects with textualized behavior. For example, a mechanical engineer offers a machine in a variety of variants, resulting from combinations of various parameters, with the parameters specified by a customer. The variants differ both in the physical structure of the machine and in the control program.

[0034] 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, e.g., a variant-specific sequential control in AS sequential function chart or a variant-specific control algorithm in FBD function block diagram. Unlike manual adaptation, code generation is automated and can be integrated into an ordering process.

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

[0036] According to the invention, the input data of the graphical diagram describe properties of the graphical program objects of the graphical diagram and are suitable for being read in by the graphical editor unit and enable the graphical editor unit to generate a corresponding graphical diagram.

[0037] For the purposes of the 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 created using the graphical programming language. The graphical diagram comprises at least one graphical program object. The graphical program object is a graphical representation of a program object of the respective control program.

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

[0039] According to one embodiment, the receiving step comprises:

[0040] 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 comprise the graphical input commands, wherein the graphical input commands comprise programming commands for adding and / or removing 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.

[0041] This allows the technical advantage of allowing graphical programming of the control program to be taken into account by the method according to the invention. The input data is provided by graphical programming commands from the user of the development environment. The present embodiment thus 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.

[0042] The input data is thus created, possibly exclusively, by the user's input commands during the graphical programming process, whereby the user modifies an existing graphical diagram or creates a new graphical diagram from scratch according to the rules of the graphical programming language of the graphical editor unit. This graphical diagram, modified or newly created by the graphical programming process, is subsequently translated into a corresponding textual intermediate representation according to the above-described explanations, and this is displayed to the user in the textual editor unit.

[0043] Subsequently, the control program to be generated is created based on the graphical diagram created in the graphical programming process and / or based on the corresponding textual intermediate representation. Thus, in the illustrated embodiment, the user can 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.

[0044] The graphical diagram modified or newly created in the graphical programming process is then translated into a corresponding textual intermediate representation that is readable by the user and displayed to the user of the textual editor unit for review.

[0045] According to one embodiment, the receiving step comprises:

[0046] Reading a program file in a reading step, wherein the program file contains the input data of the graphical diagram in textual form, wherein the input data describe the graphical program objects of the graphical diagram in textual form; and wherein the first generation step comprises:

[0047] Translating the textual input data into the graphical diagram by the translation module in a second translation step.

[0048] This allows the technical advantage to be achieved that, in the embodiment mentioned, the graphical diagram is generated based on a pre-stored program file containing the input data. Thus, in the embodiment mentioned, the case is described in which a graphical diagram already generated in a previous graphical programming process, which is stored in a textual form in the pre-stored program file, is read in by the development environment and displayed to the user in the form of the graphical diagram in the graphical editor unit and in the form of the textual intermediate representation generated by the translation process and written in a readable form for the user in the corresponding textual editor unit.

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

[0050] According to one embodiment, the method further comprises:

[0051] Receiving textual input commands from the user by the textual editor unit of the development environment in a textual programming step, wherein the textual input commands add or remove textual program objects as textual representations of corresponding graphical program objects of the graphical diagram to or from the textual intermediate representation of the graphical diagram;

[0052] 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;

[0053] 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 comprise at least one newly added or deleted textual program object, and wherein the graphical modifications comprise at least one newly added or deleted graphical program object;

[0054] 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

[0055] 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.

[0056] This can achieve the technical advantage that the described method enables the user of the development environment to modify the existing graphical diagram based on the textual intermediate representation by executing a textual programming operation while taking the textual editor unit into account. Thus, by executing a textual programming operation, the user can make changes to the textual intermediate representation of the graphical diagram displayed in the textual editor unit and thereby create a modified textual intermediate representation.

[0057] This can provide substantial practical and time-saving benefits in the programming process, for example, by automatically renaming, replacing, or modifying program sections in the textual representation of the program code. Such processes are considerably more complex in the graphical representation, as there is no automatic search / replace function.

[0058] To do this, the user can enter appropriate input commands into the textual editor unit to modify the displayed textual intermediate representation. The textual input commands include adding or removing textual program objects from the textual intermediate representation. According to the invention, the 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.

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

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

[0061] 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 process in the textual editor unit and, based thereon, generate a modified textual intermediate representation and a correspondingly modified graphical diagram.

[0062] 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 described above and the corresponding textual intermediate representation.

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

[0064] The graphical diagram and the textual intermediate representation thus represent a unique equivalent of each other at all times, regardless of the editor unit in which changes were made by the user.

[0065] This further substantially simplifies the programming process. Some processes involved in generating the control program are easier to perform in the graphical editor unit, while others are easier to accomplish textually. For example, replicating program objects in the textual intermediate representation using simple copy and paste is significantly easier than in the graphical diagram, where each graphical program object must be replicated individually and linked to the existing graphical program objects.

[0066] In this way, a simplification of the resulting control program can also be achieved by taking the textual programming into account in the textual editor unit, where appropriate, a simplified graphical diagram can be generated, which can lead to a simplified control program with reduced runtime and reduced computing capacity.

[0067] According to one embodiment, the method further comprises:

[0068] Displaying the modified textual intermediate representation of the modified graphical diagram in the textual editor unit in a fourth display step.

[0069] This makes it possible to achieve the technical advantage that by displaying the textual intermediate representation modified in the textual programming process in the textual editor unit, the user is provided with the possibility of identifying errors or weaknesses in the modified graphical diagram generated via the textual programming and corresponding to the modified textual intermediate representation based on the displayed modified textual intermediate representation.

[0070] According to one embodiment, the first translation step further comprises:

[0071] Determining the graphical program objects and a 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

[0072] Translating the graphical program objects and the graphical behavior of the graphical diagram into textual program objects and a textual behavior of the textual intermediate representation in a behavior translation step, where the textual behavior represents a textual intermediate representation of the control program flow. This can achieve the technical advantage of enabling precise translation between the graphical diagrams and the corresponding textual intermediate representations. For this purpose, the graphical program objects of the graphical diagram are first determined and then individually translated into corresponding textual program objects during the translation process.

[0073] As already 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 corresponding executable program objects of the control program in textual form.

[0074] 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.

[0075] Furthermore, a graphical behavior is determined in the graphical diagram. The graphical behavior describes a program flow within the graphical diagram and defines the connections between the individual graphical program objects within the graphical diagram. The graphical behavior thus defines the programmatically temporal execution of the individual graphical program objects and the interaction of the individual graphical program objects within the graphical diagram.

[0076] Based on the graphical behavior, a corresponding textual behavior is generated. The textual behavior describes a program flow within the textual intermediate representation and is a textual equivalent of the graphical behavior. The textual behavior defines the programmatic temporal execution of the individual textual program objects and the interrelationships between the textual program objects in the textual intermediate representation, corresponding to the graphical behavior.

[0077] In the course of determining the graphical behavior, graphical object positions can also be determined for the graphical program objects. The graphical object positions describe the positions of the individual graphical objects within the graphical diagram or the graphical behavior. The graphical object positions of the individual graphical program objects thus assign the individual graphical program objects positions within the flow of the graphical diagram, which define the arrangement of the individual graphical program objects relative to one another.

[0078] The graphical object positions of the graphical program objects can be used to define an execution sequence of the graphical program objects within the graphical diagram or the graphical behavior. The graphical object positions can be used to assign the individual graphical program objects to one another, and a program flow can be defined in which the graphical program objects are executed according to the respective graphical object positions assigned to the graphical program objects.

[0079] 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.

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

[0081] In the context of the application, a behavior is a description of the functionality or effect of a program function. The behavior includes, for example, a procedure for calculating the function's result based on the function's parameters.

[0082] According to one embodiment, the first translation step comprises:

[0083] Executing 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. This makes it possible to achieve the technical advantage that, through the 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 textual intermediate representation ensures easy readability of the textual intermediate representation by the user.The textual program objects are therefore preferably represented in exactly one textual line within the textual intermediate representation.

[0084] This facilitates the readability of the textual intermediate representation by clearly separating the individual textual program objects from each other and making them easy to understand thanks to the line-by-line division. This not only improves readability but also facilitates programming, especially within textual programming. Line-by-line translation also allows the textual intermediate representation of the program code to be managed in a version control system.

[0085] According to one embodiment, the first translation step comprises:

[0086] Arranging the textual behavior at a behavior position within the textual intermediate representation in an arrangement step, wherein the behavior position defines a position in a program code predefined by an IEC 61131-3 standard at which a behavior of a control program is to be positioned.

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

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

[0089] According to one embodiment, the first generation step comprises: determining 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:

[0090] 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 one integration step.

[0091] This can achieve the technical advantage that by determining the identities of the graphical program objects and integrating the respective identities into the corresponding textual program objects, a clear correspondence between the graphical program objects of the graphical diagram and the textual program objects of the textual intermediate 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 incorporated into the textual program objects of the textual intermediate representation.

[0092] By clearly specifying the identities within the textual program objects, which not only identify the respective textual program objects but also indicate the link to other textual program objects, the correctness of the textual intermediate representation with respect to the graphical diagram can in turn be easily determined by the user by inspecting the textual intermediate representation displayed in the textual editor unit.

[0093] 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.

[0094] According to one embodiment, the method further comprises:

[0095] Combining the textual intermediate representation of the graphical diagram 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, wherein in the overall intermediate representation, a plurality of different textual intermediate representations of a plurality of different graphical diagrams are combined to form a coherent code in textual form. This makes it possible to achieve the technical advantage that a coherent code of the entire control program can be provided in the form of the textual overall intermediate representation. Individual executable objects of the control program can be represented or programmed using different graphical diagrams, optionally also using different graphical programming languages.The respective textual intermediate representations can be combined into the overall textual intermediate representation. This means that only one coherent code in the form of the overall textual intermediate representation is required to represent the entire control program.

[0096] 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 common file and is available to the user in a readable form. The behavior of the respective graphical diagrams is arranged in the overall textual intermediate representation at the behavior positions specified by the IEC 61131-3 standard. The overall textual intermediate representation thus provides a textual form of an executable control program that meets the requirements of the IEC 61131-3 standard.

[0097] According to one embodiment, the second generation step comprises:

[0098] Performing a debugging operation based on the intermediate textual representation of the graphical diagram in a debugging step.

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

[0100] The graphical diagram, on the other hand, merely represents a graphical representation of the textual intermediate 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 is known for graphical programming languages ​​in the prior art. The textual intermediate representation, on the other hand, represents the representation relevant for generating the control program during the compilation process. According to one embodiment, the second generation step comprises:

[0101] Generating a binary representation of the control program in a binary code generation step.

[0102] This can achieve the technical advantage that the binary representation of the control program can provide an executable representation of the control program.

[0103] According to one embodiment, the method further comprises:

[0104] Saving the textual representation in a representation file in one save step.

[0105] This provides the technical advantage of saving the textual intermediate representation in a display file, allowing the control program to be saved. As explained above, by reading the display file in the form of a program file into the development environment, the corresponding textual intermediate representation can be converted into a corresponding graphical diagram and displayed to the user for further processing in the graphical editor unit.

[0106] According to one embodiment, the graphical programming language is one of the following group: ladder diagram, function block diagram, sequential function chart.

[0107] This makes it possible to achieve the technical advantage that the method according to the invention can be applied to the graphical programming languages ​​commonly used in automation technology and defined in the IEC 61131-3 standard.

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

[0109] This allows the technical advantage to be achieved that, due to the lack of conflict between the syntax of the textual intermediate representation and the syntax of the graphical programming language, a unique textual intermediate representation can be provided that can be reliably used to program a control program based on the graphical programming language. 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 configured to execute the method for generating a control program for an automation system according to one of the preceding embodiments.

[0110] This makes it possible to achieve the technical advantage that an improved development environment can be provided which is configured to carry out the method according to the invention for generating a control program for an automation system with the above-mentioned technical advantages.

[0111] The invention is explained in more detail with reference to the accompanying figures. Herein:

[0112] Fig. 1 is a schematic representation of a system for generating a control program for an automation system according to an embodiment;

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

[0114] Fig. 3 is a flowchart of a method for generating a control program for an automation system according to an embodiment;

[0115] Fig. 4 shows a further flowchart of the method for generating a control program for an automation system according to a further embodiment;

[0116] Fig. 5 shows a further flowchart of the method for generating a control program for an automation system according to a further embodiment; and

[0117] Fig. 6 shows a further flowchart of the method for generating a control program for an automation system according to another embodiment. Fig. 1 shows a schematic representation of a system for generating a control program 209 for an automation system according to one embodiment.

[0118] According to the invention, a development environment 200 suitable for executing the method according to the invention 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.

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

[0120] The textual editor unit 203 is designed for a textual programming process.

[0121] For this purpose, the textual editor unit 203 can comprise all display devices and input devices known from the prior art that are required to execute a textual programming process.

[0122] According to the invention, the translation module 205 is configured to translate a translation process between the graphical diagrams 211 of a predefined graphical programming language displayed or generated in the graphical editor unit 201 into corresponding textual intermediate representations 213. Furthermore, the translation module 205 is configured to perform an opposite translation, in which the 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.

[0123] According to one embodiment, the graphical programming languages ​​taken into account by the method according to the invention or the development environment 200 according to the invention include the ladder diagram, function block diagram and sequential function chart languages, which are each predefined in the IEC 61131-3 standard for automation technology.

[0124] The translation module 205 is accordingly capable of converting the aforementioned programming languages ​​into textual intermediate representations 213. According to the invention, the textual intermediate representations 213 are written in a form readable by the user. For this purpose, the textual intermediate representations 213 are written in a known and readable form that is based on natural languages, such as English, German, Spanish, Mandarin, or a similar common world language.

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

[0126] In addition to the components shown, the development environment 200 may include additional components required for a compilation process or a programming process of a control program, which, however, are not shown in this illustration for reasons of clarity. These may include input or output interfaces, a compiler, a debugging module, and other components known from the prior art for programming.

[0127] To execute the method 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 comprise descriptions of the graphical diagram 211 of a previously selected graphical programming language.

[0128] Based on the input data 207, the graphical editor unit 201 subsequently 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.

[0129] 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. In the example shown in Fig. 1, the graphical diagram 211 comprises five graphical program objects 217. The five graphical program objects 217 comprise three node objects 249, each of which is connected to one another via two edge objects 251.

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

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

[0132] 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 textual intermediate representation 213. The textual intermediate representation 213 is subsequently displayed in the textual editor unit 203. For this purpose, the textual editor unit 203 comprises a corresponding display device.

[0133] 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.

[0134] The textual intermediate 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.

[0135] The control program 209 can subsequently be generated based on the graphical diagram 211 and / or based on the textual intermediate representation 213.

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

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

[0138] In the above-mentioned 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.

[0139] According to a further embodiment, the input data 207 includes graphical input commands 215. The graphical input commands 215 are programming commands that are transmitted to the graphical editor unit 201 by a user of the development environment 200 during a graphical programming process. The graphical input commands 215 can include, for example, the addition or removal of graphical program objects 217 of the graphical diagram 211. In the aforementioned 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.

[0140] The present invention also encompasses a combination of the two embodiments in which, for example, an already existing graphical diagram 211 stored in text form in the program file 221 is first uploaded into the graphical editor unit 201 by reading in the information of the program file 221 and is displayed to the user in the graphical editor unit 201 for further processing.

[0141] By executing a graphical programming process 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 previously loaded into the graphical editor unit 201 based on the information of the program file 221 is modified or further developed.

[0142] 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 by the totality of all graphical program objects 217.

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

[0144] The translation of the graphical diagram 211 into the textual intermediate representation 213 results in a 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.

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

[0146] The volatile representations are present as bit sequences in the RAM of the computer executing the development environment 200 during 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.

[0147] By reading in the volatile representations by the development environment 200, the graphical program objects 217 and the graphical behavior can be identified. Furthermore, by reading in, the position information and size information of the graphical diagram 211 and the graphical program objects 217 contained therein can be determined. The position and size information describe the positions and sizes at and with which the individual components, i.e., the graphical program objects 217, are displayed in the graphical editor unit 201. Taking into account the volatile representations of the graphical diagram 211, the corresponding textual intermediate representation 213, including the textual program objects 225 and the textual behavior 237, can be translated from the graphical diagram 211.

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

[0149] The textual program objects 225 represented in the form of the 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.

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

[0151] The identities 243 can be designed, for example, 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 possible.

[0152] Furthermore, during compilation, 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 associate the graphical program objects 217 with one another. The graphical object positions 235 can be used to define an execution sequence of the graphical program objects 217 within a program flow of the graphical diagram 211.

[0153] During the translation process, the graphical object positions 235 assigned to the graphical 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 one another via the textual object positions 253, and a corresponding execution sequence of the textual program objects 225 can be defined. This allows a corresponding program sequence of the textual behavior to be defined.

[0154] 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 between the respective graphical program object 217 and other graphical program objects 217, the identities 243, and other relevant information.

[0155] For example, position information of the graphical program objects 217 can be integrated into the textual program objects 225. The position information describes position information regarding a 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.

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

[0157] In addition to the type of the respective graphical program object 217, the corresponding textual program objects 225 can also include functionalities or functional limitations of the respective graphical program objects 217. The types or functionalities of the graphical program objects 217 are defined by the aforementioned IEC 61131-3 standard. The position or size information, which exclusively relates to the graphical representation of the graphical program objects 217 in the graphical editor unit 201, can, for example, be individually defined on a manufacturer-specific basis.

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

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

[0160] 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 textual intermediate representation 213 at which the textual behavior 237 is to be arranged.

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

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

[0163] According to the invention, after the textual intermediate representation 213 has been generated and the textual intermediate representation 213 has been displayed in the textual editor unit 203, the control program 209 represented by the graphical diagram 211 and / or the textual intermediate representation 213 is generated based on the graphical diagram 211 and / or based on the textual intermediate representation 213.

[0164] Furthermore, according to one embodiment, a debugging process can first be performed based on the textual intermediate representation 213. For this purpose, the development environment 200 can comprise a component configured to perform a debugging process, for example, in the form of a debugger. According to one embodiment, when the control program 209 is generated, the control program 209 is generated in a binary representation. The binary representation can, in turn, be stored in the representation file 245.

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

[0166] The embodiment in Fig. 2 is based on the embodiment in Fig. 1 and includes all features described therein. As long as these remain unchanged in the embodiment in Fig. 2, a detailed description will be omitted.

[0167] In the embodiment shown, the development environment 200 is capable of providing the user with the option of a textual programming operation. The textual programming operation is performed on the textual intermediate representation 213. Through the textual programming operation, the user can thus modify the textual intermediate representation 213 of Fig. 1, for example, by adding or removing textual program objects 225 to or from the textual intermediate representation 213, modify the textual intermediate representation 213, and generate a modified textual intermediate representation 227.

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

[0169] Changing textual program objects 225 can include removing the textual program object to be changed and adding the correspondingly changed textual program object. The textual input commands 223 can individually depend 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 in the textual program objects 225. The syntax of the textual intermediate representations 213, 227 can at least partially correspond to the syntax of the graphical programming language predefined in the aforementioned IEC 61131-3 standard.

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

[0171] 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 additional 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 additional graphical program objects 229 are linked to the graphical program objects 217 to form a coherent graphical diagram.

[0172] 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 thus able to generate the control program 209 based on the previously selected graphical programming language both by executing a graphical programming operation, as described for Fig. 1, and by executing a textually based programming operation, as described for Fig. 2.

[0173] The user can thus freely select the most convenient programming method for themselves and can also switch between the various textual or graphical programming processes during programming. Changes made during one programming process are immediately displayed in the other representation through translation. Changes made in the graphical diagram 211 are immediately displayed in the textual intermediate representation 213, 227 through translation. Similarly, changes made in the textual intermediate representation 213, 227 are immediately displayed in the graphical diagrams 211, 231 after translation. Graphical program objects 217 newly added or deleted in the graphical diagram 211 are correspondingly displayed as newly added or deleted textual program objects 225 in the textual intermediate representation 213, or are integrated into or deleted from the textual intermediate representation 213.

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

[0175] 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 receiving 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 part of the control program 209 to be programmed according to the graphical programming language.

[0176] According to one embodiment, the graphical programming language may be one of the programming languages ​​defined in the IEC 61131-3 standard: ladder diagram, function block diagram or sequential function chart.

[0177] 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.

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

[0179] 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 represents a textual description of the graphical diagram 211.

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

[0181] Subsequently, in a second display step 109, the textual intermediate 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 error-free nature of the corresponding graphical diagram 211 by inspecting the textual intermediate representation 213 displayed to him.

[0182] 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 graphical diagram 211.

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

[0184] The embodiment in Fig. 4 is based on the embodiment in Fig. 3 and includes all the method steps described there. As long as these remain unchanged, a detailed description will be omitted.

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

[0186] In one case, a program file 221 is read by the development environment 200 in a reading step 115. A description of the graphical diagram 211 is stored in text form in the program file 221. The input data 207 corresponds to the textual information of the program file 221.

[0187] 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.

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

[0189] This includes the case where a graphical diagram 211 already created at an earlier point in time is loaded into the development environment 200 in order to subsequently be further processed or modified by executing corresponding programming operations.

[0190] 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 subelements of the graphical diagram 211 and represent program objects 219 of the control program 209 to be generated.

[0191] 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.

[0192] Through the graphical programming process, an existing graphical diagram 211 displayed in the graphical editor unit 201 can 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.

[0193] Fig. 5 shows another flowchart of the method 100 for generating a control program 209 for an automation system according to another embodiment. The embodiment shown in Fig. 5 is based on the embodiment in Fig. 4 and includes all method steps described therein. Should these remain unchanged in the embodiment shown, a detailed description will be omitted.

[0194] 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. The textual input commands 223 add or remove textual program objects 225 as textual representations of corresponding graphical program objects 217 of the graphical diagram 211 to the textual intermediate representation 213. The textual program objects 225 are textual representations of the graphical program objects 217 of the graphical diagram 211.

[0195] 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.

[0196] 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.

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

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

[0199] In a third display step 125, the modified graphical diagram 231 is displayed instead of the graphical diagram 211 in the graphical editor unit 201. Alternatively or additionally, the graphical modifications are displayed in the graphical diagram 211. For this purpose, the graphical diagram 211 in the graphical editor unit

[0200] 210 is modified according to the modifications by inserting the at least one newly added graphical program object 217 of the graphical modifications into the existing graphical diagram 211.

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

[0202] Accordingly, according to the graphical modifications of the graphical diagram

[0203] 211, the deleted graphical program object 217 must be marked accordingly, possibly also in color. Alternatively, the deleted graphical program object 217 may no longer be displayed in the graphical diagram 211.

[0204] Furthermore, in a summarizing step 141, the textual intermediate representation 213 of the graphical diagram (211) and at least one further intermediate representation of at least one further graphical diagram are combined to form a textual overall intermediate representation. In the overall intermediate representation, a plurality of different textual intermediate representations 213 of a plurality of different graphical diagrams 211 are thus combined to form a coherent code in textual form.

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

[0206] The additional textual information 255 is arranged between the textual behaviors 237 of the various graphical diagrams in the overall intermediate textual representation. As described above, the additional textual information 255 can include, for example, data types, variable types, interfaces, or other information. The additional textual information, which is 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.

[0207] The base language describes the format specified by the standard in which the additional information must be written. The behavior of the various graphical diagrams, however, is written in a textual sublanguage with a syntax that corresponds to the graphical structure of the programming languages ​​defined by the IEC 61131-3 standard: ladder diagram, function block diagram, or sequential function chart.

[0208] The sublanguage represents the aforementioned graphical programming languages ​​textually and is designed in a form that is readable for the user.

[0209] In the overall textual intermediate representation, the base language represents 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 .

[0210] According to one embodiment, the textual intermediate representation 213, which represents only a graphical diagram 211, can also include a section written in the textual basic language predefined by the IEC 61131-3 standard, in which the additional information, including the 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, as described above, in the corresponding sublanguage corresponding to one of the programming languages: ladder diagram, function block diagram, or sequential function language.

[0211] 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 overall textual intermediate representation and / or based on the modified graphical diagram 231 or the plurality of modified graphical diagrams 231.

[0212] 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 thereon, a modification of the graphical diagram 211 is effected.

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

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

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

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

[0217] 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.

[0218] Furthermore, the first translation step 107 comprises 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.

[0219] According to the invention, the graphical behavior 233 is a graphical representation of a program flow of the control program 209.

[0220] 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. 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.

[0221] 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.

[0222] In an arrangement 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.

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

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

[0225] Furthermore, the second generation step 111 comprises a binary code generation step 145. In the binary code generation step 145, a binary representation of the control program 209 is generated to generate the control program 209.

[0226] 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. List of reference symbols

[0227] 100 procedures

[0228] 101 Reception step

[0229] 103 first generation step

[0230] 105 first display step

[0231] 107 first translation step

[0232] 109 second display step

[0233] 111 second generation step

[0234] 113 graphical programming step

[0235] 115 reading steps

[0236] 117 second translation step

[0237] 119 textual programming step

[0238] 121 third generation step

[0239] 123 third translation step

[0240] 125 third display step

[0241] 127 fourth display step

[0242] 129 Behavioral assessment step

[0243] 131 Behavioral translation step

[0244] 133 line translation step

[0245] 135 Arrangement step

[0246] 137 Identity verification step

[0247] 139 Integration step

[0248] 141 Summary step

[0249] 143 debugging step

[0250] 145 Binary code generation step

[0251] 147 Storage step

[0252] 200 development environment

[0253] 201 graphic editor unit

[0254] 203 textual editor unit

[0255] 205 Translation module

[0256] 207 input data

[0257] 209 Control program

[0258] 211 graphical diagram

[0259] 213 textual intermediate representation graphical input command graphical program object executable program object

[0260] Program file textual input command textual program object modified textual intermediate representation further graphical program object modified graphical diagram graphical behavior graphical object position textual behavior

[0261] Behavioral position textual line

[0262] identity

[0263] Display file additional textual program object

[0264] Node object

[0265] Edge object textual object position textual additional information

Claims

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 by 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 depicts at least 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 generation step (103); Displaying the graphical diagram (211) in the graphical editor unit (201) of the development environment (200) in a first display step (105); 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 translation 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 display step (109); 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 generation step (111).

2. The method (100) according to claim 1, wherein the receiving step (101) comprises: receiving graphical input commands (215) of a user of a development environment (200) by the graphical editor unit (201) of the development environment (200) in a graphical programming step (113), wherein the input data (207) comprise the graphical input commands (215), wherein the graphical input commands (215) are programming commands for adding and / or removing graphical program objects (217) of the graphical diagram (211). and wherein the graphical program objects (217) are sub-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 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 input data (207) textually describes the graphical program objects (217) of the graphical diagram (211); translating the textual input data (207) into the graphical diagram (211) by the translation module (205) in a second translation step (117).

4. The method (100) according to any one of the preceding claims, further comprising: receiving textual input commands (223) of the user by the textual editor unit (203) of the development environment (200) in a textual programming step (119), wherein the textual input commands (223) add or remove textual program objects (225) as textual representations of corresponding graphical program objects (217) of the graphical diagram (211) to or from the textual intermediate representation (213) of the graphical diagram (211); 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 generation 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) brought about by the textual input commands into graphical modifications of the graphical diagram (211) by the translation module (205) in a third translation 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 display 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 generation step (111).

5. The method (100) of 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 display step (127).

6. The method (100) according to any one of the preceding claims, wherein the first translation step (107) further comprises: Determining the graphical program objects (217) and a graphical behavior (233) of the graphical diagram (211) in a behavior determination 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 translation step (131), wherein the textual behavior (237) represents a textual intermediate representation (213) of the flow of the control program (209).

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

8. The method (100) of claim 7, wherein the first translation 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 in a program code predefined by a standard IEC 61131-3 at which a behavior of a control program is to be positioned.

9. Method (100) according to one of the preceding claims, wherein the first generation step (103) comprises: Determining identities (243) of the graphical program objects (217) of the graphical diagram (211) in an identity determination step (137), wherein the identities (243) of the graphical program objects (217) enable a unique identification of the respective graphical program objects (217); and wherein the line translation step (133) comprises: Integrating the identities (243) of the graphical program objects (217) into the respective textual program objects (225) of the textual intermediate representation (213) assigned to the graphical program objects (217) and written in textual lines (241) in an integration step (139).

10. The method (100) according to any one of the preceding claims, further comprising: combining 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 combining step (141), wherein in the overall intermediate representation a plurality of different textual intermediate representations (213) of a plurality of different graphical diagrams (211) are combined to form a coherent code in textual form.

11. Method (100) according to one of the preceding claims, wherein the second generation step (111) comprises: Executing a debugging operation based on the textual intermediate representation (213) of the graphical diagram (211) in a debugging step (143).

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

13. The method (100) according to any one of the preceding claims, further comprising: Saving the textual representation in a representation file (245) in a storage step (147).

14. The method (100) according to any one of the preceding claims, wherein the graphical programming language is one of the following group: ladder diagram, function block diagram, sequential function chart.

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

16. Development environment (200) with a graphical editor unit (201), a textual editor unit (203) and a translation module (205), wherein the development environment (200) is configured to carry out the method (100) according to one of the preceding claims 1 to 15.