Method for creating and executing a control program for controlling an automation system and automation system
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BECKHOFF AUTOMATION GMBH
- Filing Date
- 2021-06-04
- Publication Date
- 2026-06-26
AI Technical Summary
In existing technologies, when users create and execute control programs for automated systems, their flexibility is limited by the need to install an integrated development environment on a specific computer, and it is difficult to achieve multi-user collaborative programming and real-time collaborative work.
By installing a web-based development environment on a web server and utilizing a web browser to implement input and conversion modules, users can create and edit control program code on any client device and perform conversions and collaborative work through the web server.
It enables users to flexibly create and edit control programs on any device, supports multi-user collaborative programming, reduces the computational burden on client devices, and provides real-time collaborative work and code conversion functions.
Smart Images

Figure CN115702413B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for creating and executing control programs for controlling an automated system. Furthermore, this invention relates to an automated system designed to execute the method for creating and executing control programs for controlling the automated system.
[0002] This patent application claims priority to German patent application DE102020115028.8, the disclosure of which is hereby incorporated in this application. Background Technology
[0003] The technical specifications of automation technology (execution, measurement, control / regulation, communication, human-machine interface, safety, etc.) aim to automate machines (including industrial robots and / or equipment), that is, to enable them to operate autonomously and without human assistance. The more independent the corresponding machines in the equipment and / or the equipment involved are from human intervention, the higher the degree of automation (the ratio of automated manufacturing steps to all manufacturing steps) in the automation system.
[0004] The goal of automation technology is, in particular, to alleviate the burden of dangerous, laborious, and / or monotonous human activities, improve quality through technological equipment, increase the working capacity of equipment, and reduce costs through equipment. Advances in communication (networking) between components within machines, signal detection, signal processing, and / or automated systems can significantly improve the level of automation in existing or new equipment compared to existing technologies.
[0005] Programmable logic controllers (PLCs) are commonly used to control automated systems. PLCs are particularly useful in process control technologies, such as for controlling production lines or chemical equipment. Machine controllers configured as PLCs control or regulate machines and equipment by controlling actuators such as relays, drives, or valves based on measurements detected by sensors located on the machine or equipment.
[0006] Programmable logic controllers (PLCs) typically operate through event control and execute control programs periodically. In one execution cycle, signals from sensors are read, and based on these signals, an output value for the actuator is calculated and output.
[0007] To control automated systems, corresponding control programs are required. To create these control programs, a specially designed Integrated Development Environment (IDE) is typically used. This IDE provides users with input options in the form of editors, which offer various input aids, such as code auto-completion. IDEs also provide conversion functions, enabling the creation of program code into binary language. Furthermore, IDEs are particularly designed for debugging, allowing users to identify errors in the created program code.
[0008] Typically, IDEs run locally on desktop computers or laptops. However, this assumes that the corresponding IDE is installed on the computer to be used and that the computer has sufficient computing power to perform the functions. IDEs also typically specify the operating system they are for. Therefore, the user is tied to the corresponding computer with the IDE installed to create program code. This poses a significant limitation on user flexibility and the ways in which control programs can be programmed in automation technologies. Summary of the Invention
[0009] Therefore, the object of the present invention is to provide a method for creating and executing a control program for controlling an automated system, thereby enabling high flexibility for the user. Another object of the present invention is to provide a corresponding automated system designed to execute the method for creating and executing a control program for controlling the automated system.
[0010] The task is accomplished by the method and automated system according to the independent claim. Advantageous improvements are given in the dependent claims.
[0011] According to one aspect of the present invention, a method is provided for creating and executing a control program for controlling an automated system having a controller and a web server connected to the controller, wherein the method includes:
[0012] In the server connection step, a connection between the client device and the web server is created by a web browser running on the client device. The web server has a web-based development environment installed. The development environment has an input module for creating program code and a conversion module for converting the created program code. The input module can be executed in the web browser, and the conversion module is designed to convert program code in a first programming language into program code in a binary language.
[0013] In the working environment connection step, the client device executes an instance of the input module in the web browser, and the connection between the client device and the working environment of the web server and the conversion module of the working environment is created through the instance of the input module executed in the web browser, wherein the conversion module can be executed within the working environment;
[0014] In the code creation step, the input module, in an instance executed in the web browser, creates a first version of program code for a control program of the automation system in the first programming language;
[0015] In the program code transfer step, the created first version of program code is transferred from the instance of the input module executed in the web browser to the working environment of the web server.
[0016] In the writing step, the transmitted first version of the program code is written into the program file of the working environment;
[0017] In the conversion step, the conversion module is executed in the working environment, and the program code created in the first programming language and written into the program file is converted into binary language program code by the conversion module.
[0018] In the binary code transmission step, the program code is transmitted in binary language from the working environment to the controller of the automation system; and
[0019] In the execution step, the program code is executed in binary language by the controller of the automation system, and the automation system is controlled based on the program code.
[0020] The resulting technical advantage is that it provides a method for creating and executing control programs for controlling automated systems, in which web-based programming of the control program's code is achieved through a web-based development environment. For this purpose, a web-based development environment is installed on the web server, the development environment having an input module for creating program code and a conversion module for converting the created program code into binary code for controlling the automated system. Here, the input module of the web-based development environment can be executed in a web browser. On the other hand, the conversion module can be executed on the web server and is designed to convert program code in any programming language into binary language program code.
[0021] To create a control program, a user can establish a connection to a web server via a web browser running on any client device, and execute an instance of the input module of a web-based development environment within that web browser. The client device can be a desktop computer, laptop, or any mobile device. This allows the user to create program code for the control program from any client device. Therefore, it is not necessary to install a development environment including the input module on the client device used to implement the programming process for creating program code.
[0022] The instance of the input module, executed in a web browser on the client device, is platform-independent and can run on any client device controlled by any operating system. This achieves platform independence for the web-based development environment.
[0023] To create the program code for the control program, the user then establishes a connection to a working environment designed on the web server by entering an instance of the module executed in a web browser. Within this working environment, a programming project can be designed, containing all the files, directories, or databases necessary for creating the program code. Therefore, this working environment enables the structured operation of the web server, allowing different programming projects to be set up independently. The working environment may, for example, have a password-protected entry point and enable connections only for authorized users. Thus, sensitive data for different users can be stored on the web server.
[0024] By executing an instance of the input module in a web browser, the user can then create versions of the control program's code in any programming language from the corresponding client device. By executing an instance of the input module in the web browser of the client device being used, the user is not tied to any specific client device to create the code, thus providing high flexibility. Users can create code for the control program from anywhere using any client device.
[0025] In the program code transfer step, only the changes made to the program code in the code creation step (based on which a first version of the program code is created) can be transferred from the instance of the input module executed in a web browser to the web server via an internet connection. This is particularly interesting when the first version of the program code is a modified version of the already created program code.
[0026] Here, the first programming language can be any programming language used to create control programs for an automated system or a programming language known from the prior art. To convert the program code created in the user-selected first programming language into binary code executable by the controller of the automated system, an instance of the input module executed in a web browser transmits the created program code to a web server, and the web server writes the transmitted program code into a program file within the working environment.
[0027] Here, program files can be structured as composite types with multiple files located in corresponding directories. This allows the created program code to be stored on a server, specifically in the relevant working environment, in a programming language chosen by the user, eliminating the need to store the created program code on the user's client device to ensure the smooth operation of the programming project. Furthermore, when further editing the created program code, the user is not bound to the initially selected client device; instead, editing of the already created program code can be performed from any client device.
[0028] Furthermore, similar to a buffer, the program file can be configured as a file in the main memory of the web server, so that changes to the program file do not need to be automatically stored in the web server's permanent data storage, such as a hard drive.
[0029] Furthermore, the program file can be associated with an associated file in the permanent data storage of the web server, and the content of the program file can be stored in the associated file, thereby enabling the content of the program file to be stored in the permanent storage of the web server.
[0030] Furthermore, this design does not burden the storage space of the client device used to store the created program code. This conserves the resources of the client device.
[0031] By executing a conversion module on the program code written in the program file, the program code can be converted into corresponding binary code. This binary code can be executed by the controller of the automation system to control the system. This allows the conversion process to be offloaded to a web server, thus avoiding the computationally intensive conversion of program code created on the client device. Therefore, it saves resources on the client device used for program code creation.
[0032] In order for the binary code created by the conversion module to be executed by the controller of the automation system, which is derived from the program code previously created in the instance of the input module, the generated binary code can be directly transmitted from a web server, particularly from the working environment, to the controller of the automation system connected to the web server, and executed by that controller. Thus, a smooth transition between creating program code and executing the corresponding control program can be achieved through the controller of the automation system and the associated control automation system.
[0033] Therefore, the cumbersome process can be avoided, in which the program code is first created and converted into binary code on a client device specifically designed for this purpose. This binary code must then run on the controller of the automation system so that the controller can execute the corresponding control program and thus control the automation system.
[0034] According to one implementation, the method further includes:
[0035] In another server connection step, another connection is created between the other client device and the web server by another web browser executed on the other client device.
[0036] In another working environment connection step, another instance of the input module is executed in the other web browser of the other client device, and another connection between the other client device and the working environment of the web server is created through the other instance of the input module executed in the other web browser;
[0037] In another program code transfer step, the first version of the program code written to the program file is transferred to the other instance of the input module that is executed in the other web browser on the other client device;
[0038] In the change creation step, the program code is modified, and a second version of the program code is created in the first programming language in the other instance of the input module executed in the other web browser on the other client device;
[0039] In the modified transmission step, the second version of the program code is transmitted from the other instance of the input module to the working environment of the web server;
[0040] In the change writing step, the second version of the program code is written into the program file of the working environment;
[0041] In the second modification transmission step, the second version of the program code is transmitted from the working environment to an instance of the input module of the client device that is executed in the web browser; and
[0042] In the change display step, the second version of the program code is displayed in the instance executed in the web browser of the input module on the client device.
[0043] The resulting technical advantage is that it enables different users to simultaneously edit the created program code. To this end, a connection can be established between the other client device and the web server via another web browser running on the other client device. Next, another instance of the input module can be executed in the other web browser on the other client device. Here, the other client device can be any desktop computer, laptop, or mobile device and can run on any operating system, which may be different from the operating system of the client device already connected to the web server. Furthermore, the two web browsers on the two client devices can be different web browsers. Therefore, different instances of the input module can be executed in different web browsers on different client devices.
[0044] The other instance of the input module, executed in another web browser on another client device, establishes a connection to the working environment. After the program code written in the program file is transferred from the web server to the other instance of the input module executed in the other web browser, the created program code can be displayed on the other client device within that other instance of the input module. This enables different users to simultaneously edit program code from different client devices. Different users can therefore contribute to the creation of the same program code simultaneously and can execute this from different devices.
[0045] Through the other instance of the input module, the other user can modify the created program code and create a second version of the program code. The second version of the program code can then be transmitted by the other instance of the input module, executed in the other web browser, to a web server, specifically to a working environment, and written into a program file. The program file stored in the working environment of the web server can be modified by both the first user and the second user.
[0046] The second version written to the program file can then be transmitted to the first user, specifically to the instance executed in the web browser of the input module on the client device, and displayed in that instance. This allows two users to simultaneously display the same version of the program code in the input module executed in the web browser of their respective client devices. Therefore, different users can track changes made by another user, enabling collaborative work between the two users to create the program code. Thus, each user can obtain changes to the program code from their respective client device and track changes made by other users.
[0047] A second version of the program code, created by the other user on the other client device, can be written into a program file and thus stored on a web server. Furthermore, the second version written into the program file can be converted into corresponding binary code by a conversion module executed on the web server, particularly in the working environment. This binary code is then transmitted to the controller of the automation system and executed by the controller to control the automation system. This enables collaborative work by different users using different client devices to create program code in a collaborative manner. This program code can be converted using a web server and executed by the controller of the automation system. This facilitates collaborative work for implementing a shared programming project to create control programs for the automation system.
[0048] According to one implementation, in the change transfer step and in the second change transfer step, only the program code changes made in the other instance of the input module are transferred from the second version of the program code.
[0049] This achieves the technical advantage of transmitting as little data as possible when transferring different versions of program code created by different users to a web server. This allows for fast transmission and, consequently, displays of changes made as simultaneously as possible in various instances of the input modules for different users. By transmitting only the changes made to each version of the program code, timely updates to the program code written in the program files can be achieved.
[0050] According to one embodiment, in the change transmission step, the changes made to the second version of the program code and the first version of the program code in the other instance of the input module are transmitted, wherein the method further includes:
[0051] In the comparison step, the program code of the first version transmitted in the second change transmission step is compared with the program code of the version written in the program file;
[0052] In the error determination step, if the first version of the program code is inconsistent with the version of the program code written in the program file, a synchronization error is determined.
[0053] In the version transfer step, the version of the program code written in the program file is transferred from the working environment to the other instance of the input module executed in the other web browser; and
[0054] In the version display step, the program code of the transmitted version is displayed in the other instance executed in the other web browser of the input module.
[0055] This achieves the technical advantage that allows the two users to edit program code synchronously. By additionally transmitting the corresponding version of the program code modified by the respective user to the web server via the corresponding instance of the input module, and comparing the transmitted version with the version written in the program file, it can be ensured that when multiple users edit program code simultaneously, all users are editing the same version of the program code.
[0056] If the version of program code transmitted using the changes made is inconsistent with the version of program code written in the program file, the transmitted changes are not written to the program file. Instead, the version currently written to the program file is transmitted to the corresponding user and displayed in the corresponding instance of the input module. This ensures that all users associated with the working environment receive the current version of program code written to the program file, thus allowing all users editing the corresponding program project to edit the same version of program code.
[0057] According to one embodiment, in the change transmission step, changes made to the second version of the program code and information about the first version of the program code in the other instance of the input module are transmitted, wherein the method further includes:
[0058] In the comparison step, the information about the first version of the program code transmitted in the second change transmission step is compared with the version of the program code written into the program file;
[0059] In the error determination step, if the program code for the first version of the program is inconsistent with the version written in the program file, a synchronization error is determined.
[0060] In the version transfer step, the version of the program code written in the program file is transferred from the working environment to the other instance of the input module executed in the other web browser; and
[0061] In the version display step, the program code of the transmitted version is displayed in the other instance of the input module executed in the other web browser.
[0062] This achieves the technical advantage that checking the consistency between the first version and the version written in the program file by transmitting information about the first version can reduce the amount of data transmitted.
[0063] For example, information about the first version could be a version number that uniquely identifies the program code of that version. Then, in the comparison step, the version number of the program code of the first version can be compared with the version number of the program code of the version stored in the program file to determine whether the version numbers are consistent or different.
[0064] According to one implementation, in the program code transfer step, each input made in the code creation step is transmitted in a separate message, wherein in the change transfer step, each change made to the first version of the program code is transmitted in a separate message.
[0065] This achieves the technical advantage of enabling real-time processing of changes made via a web server and, consequently, real-time updates to the version of the program code written in the program file. Here, changes to the program code can be a single keystroke on the client device, or a single addition or deletion of a character in the program code displayed in the corresponding instance of the input module.
[0066] According to one embodiment, the conversion module further includes an analysis module for performing semantic analysis and / or syntax analysis in the created program code, and the method further includes:
[0067] In the global analysis step, the analysis module performs a global analysis of the program code in the first programming language that has been created and written into the program file, and determines the global analysis result. The global analysis of the program code includes semantic analysis and syntax analysis of the entire program code based on the semantics and syntax of the first programming language.
[0068] In the analysis result transmission step, the global analysis results determined in the global analysis step are transmitted to the instance executed in the web browser of the input module on the client device and / or the other instance executed in the other web browser of the input module on the other client device; and
[0069] In the analysis results display step, the transmitted global analysis results are displayed in an instance executed in a web browser on the input module of the client device and / or in another instance executed in the input module of the other client device on the other web browser.
[0070] This achieves the technical advantage that, during the programming process on a web server, especially within the web server's operating environment, analysis of the semantic and syntactic correctness of the program code written in the program file, regarding the programming language used, can be performed. Furthermore, it enables the display of the semantic or syntactic analysis results of the created program code to the user during the programming process, in instances of the input module, allowing the user to eliminate corresponding errors in the created program code during programming. This achieves a programming process that is as simple as possible, during which syntax or semantic errors in the program code are displayed to the user when necessary.
[0071] According to one implementation, the transmission of global analysis results is configured as a web server polling request to an instance of the input module of a client device executed in a web browser and / or a response to a polling request executed in another web browser of the input module of the other client device.
[0072] This achieves the technical advantage of automatically displaying analysis results in the individual instances of the input module used by the user. To this end, the instance of the input module can query the web server at preset time intervals to inquire whether the corresponding global analysis results from the analysis module exist. Once the analysis module has completed its analysis of the program code written in the program file, the corresponding analysis results are transmitted from the web server to the instance of the input module executed in the web browser, and then displayed to the user by that instance. Therefore, the corresponding semantic or syntactic analysis results are automatically indicated to the user without the user needing to perform any further queries. Thus, the user automatically obtains the corresponding analysis results through the instance of the input module used by them in a displayed manner without having to initiate the analysis separately.
[0073] According to one implementation, the global analysis results include error reports regarding semantic and / or syntax errors in the created program code, program objects used in the program code, and relationships between program objects used in the program code, wherein program objects include variables, functions, data types, domain names, or other objects used in the program code.
[0074] This achieves the technical advantage of displaying a wealth of information about the user-created program code to the user within the corresponding instance used in the input module. Through the analysis results created in the global analysis, the user can be provided with information and input assistance to facilitate the smoothest possible programming of the program code. These analysis results include semantic and syntax errors in the created program code and / or other instances of variables, functions, data types, domain names, and the corresponding programming language used in the program code.
[0075] According to one implementation, the global analysis step further includes:
[0076] In the snapshot step, the analysis module determines the analyzed version of the program code in the first programming language created and written to the program file, wherein the analyzed version of the program code corresponds to the version of the program code written to the program file at the time of executing the global analysis step; and
[0077] In the global analysis step, a global analysis of the program code in the first programming language is performed based on the analysis version.
[0078] This achieves the technical advantage of allowing users to edit program code during global analysis via the analysis module. To this end, an analysis version of the program code is first created and written into a program file. Based on this analysis version, a corresponding global analysis of the program code is performed by the analysis module. While the analysis module is performing a time-consuming global analysis encompassing the entire program code, further modifications can be made to the version of the program code written into the program file. Thus, although global analysis is performed via the analysis module, the user does not need to interrupt the programming process and can therefore make further modifications to the program code during the analysis. Furthermore, since the analysis module operates on the previously created analysis version of the program code, further modifications to the version of the program code written into the program file will not interrupt the analysis module's analysis. Therefore, the analysis module can simultaneously analyze the program code and allow for further modifications by the user.
[0079] According to one implementation, the method further includes:
[0080] In the update step, the program code created and written to the program file in the current version is created in the first programming language by the analysis module, wherein, after each change to the program code by an instance of the input module of the client device and / or by another instance of the input module of the other client device, the program code created and written to the program file in the current version is created in the first programming language.
[0081] In the local analysis step, the analysis module performs a local analysis on a portion of the program code created and written in the program file in the first programming language based on the current version of the program code, and determines the local analysis results.
[0082] In the local analysis result transmission step, the local analysis results determined in the local analysis step are transmitted to the instance executed in the web browser of the input module of the client device and / or the other instance executed in the other web browser of the input module of the other client device; and
[0083] In the partial analysis results display step, the transmitted partial analysis results are displayed in an instance of the input module of the client device executed in a web browser and / or in another instance of the input module of the other client device executed in the other web browser, wherein the partial analysis results include auto-completion, syntactic highlighting, and other input aids for input in the instance of the input module and / or the other instance of the input module.
[0084] This achieves the technical advantage that the input module can provide additional input assistance to the user. Local analysis only analyzes portions of the created program code. To this end, the current version of the program code is first created and written to the program file, and then the corresponding local analysis is performed on the current version. Specifically, for each change to the program code transmitted from the corresponding instance of the input module to the web server, the current version of the program code is created and the corresponding local analysis is performed.
[0085] This enables functions such as automatically completing program code created in instances of the input module, and displaying write errors and similar input aids. By creating corresponding versions of program code for each change to the program code—which may include the addition or deletion of characters in the program code—and by performing local analysis of the current version, corresponding displays can be provided in the input module for each change implemented by the user, such as autocomplete, syntax highlighting, etc.
[0086] According to one implementation, the transmission of the local analysis results is configured as the web server sending a push message to an instance executed in a web browser of the input module of a client device and / or sending a push message to an instance executed in another web browser of the input module of another client device.
[0087] This achieves the technical advantage of providing real-time display of input aids within the corresponding instance of the input module. Therefore, by pushing messages, once the corresponding local analysis is performed, the results of the local analysis are automatically transmitted to the corresponding instance of the input module via a web server.
[0088] According to one embodiment, the analysis module includes a global analysis module for performing global analysis and a local analysis module for performing local analysis.
[0089] This achieves the technical advantage of simultaneously performing global and local analysis. By having the global analysis module perform global analysis based on the analyzed version of the program code, and the local analysis module perform local analysis based on the current version of the program code, interference between the two different analyses is avoided, making them independent and capable of being performed separately.
[0090] According to one embodiment, the conversion step further includes:
[0091] In the first conversion step, program code in the first programming language is converted into program code in a high-level language; and
[0092] In the second conversion step, the program code in a high-level language is converted into program code in a binary language.
[0093] This achieves the technological advantage of providing the most flexible web-based development environment possible. By converting program code in a first programming language into program code in a high-level language, and subsequently converting the high-level language program code into corresponding binary code, conversion modules with compatible back-end and front-end units can be constructed as simply as possible for most different first programming languages.
[0094] By dividing the conversion module into a backend unit and a frontend unit, where the backend unit provides high-level language to binary code conversion and the frontend unit provides first programming language to high-level language conversion, simple matching of the conversion module with different first programming languages or different controllers of automation systems can be achieved by adjusting only the frontend unit or the backend unit, respectively. Therefore, to add another first programming language, only the frontend unit, designed to implement the conversion from the other first programming language to a high-level language, must be modified, while the backend unit can remain unchanged. To use a web-based development environment for another controller with another processor unit, only the backend unit needs to be adapted to convert the high-level language into binary language used by the other processor unit, while the frontend unit can remain unchanged.
[0095] According to one implementation, the first programming language is a graphical programming language.
[0096] This enables the development of program code in standards-compliant programming languages (such as sequence function charts, ladder diagrams, or function block diagrams) for use in automation systems through a web-based development environment.
[0097] According to one implementation, the method further includes:
[0098] In the debugging step, the debugging process of the created program code is executed through the conversion module.
[0099] This achieves the technical advantage of enabling the verification of the functionality of the control program code created using a web-based development environment for automation systems. During the debugging process, the functionality of the created control program can be tested.
[0100] According to one implementation, the debugging step further includes:
[0101] In the debugging and conversion step, the program code in the first programming language, which was generated and written into the program file, is converted into binary language program code.
[0102] In the debugging and transmission step, the program code converted into binary language in the debugging and conversion step is transmitted from the working environment to the controller of the automation system.
[0103] During the debugging and execution steps, binary language program code is executed through the controller of the automation system; and
[0104] In the debugging information transmission step, information about the executed program code is transmitted to an instance of the input module of the client device executed in the web browser and / or another instance of the input module of the other client device executed in another web browser.
[0105] This achieves the technical advantage that the debugging process of the created program code can be initiated through an instance of the input module executed in a web browser. The program code is executed via a web server or a controller connected to the web server within the automation system to check its functionality. Users can thus initiate the operation of their created program code without problems from their client devices, without needing a direct connection to the automation system's controller or a simulation device installed on the client device to verify the functionality of the created program code.
[0106] To implement the aforementioned debugging process, the created program code can be converted into corresponding binary code by a conversion module. This binary code can be transmitted from a web server to the controller of the automation system and executed by the controller. Information, such as sensor measurements from the automation system or other stored records from the controller, can then be transmitted by the controller via the web server to an instance of the input module executed in a corresponding web browser, which is then displayed to the user. This allows the functionality of the created program code to be determined based on the characteristics of the controller or the components of the automation system controlled by the controller.
[0107] According to one implementation, the debugging and conversion step further includes:
[0108] In the breakpoint setting step, at least one breakpoint is set in the program code; and
[0109] During the debugging process, the binary language program code is executed through the controller of the automation system until a breakpoint is reached.
[0110] This achieves the technical advantage of enabling simple inspection of the created program code. By setting appropriate breakpoints within each instance of the input module executed in a web browser using corresponding functions, the controller can interrupt the execution of the control program at the desired location. This makes it easy to identify errors within the control program's code that cause control program malfunctions.
[0111] According to one embodiment, the working environment connection step includes:
[0112] In the working environment generation step, a working environment is generated on the web server; and
[0113] In the setup step, the conversion module is set up in the working environment.
[0114] This achieves the technical advantage that new programming projects can be initiated within an input module application executed in a web browser by designing a corresponding working environment with a conversion module on a web server. Within this working environment, one or more program files can be designed when creating the corresponding program code for the programming project. Therefore, users can easily start new programming projects by executing the input module on the web server of their client device, and store and edit the created program code within the working environment set up for this purpose on the web server. Different programming projects can thus be stored separately in different working environments and kept isolated from each other. This avoids the mixing of different projects.
[0115] According to one implementation, multiple separate working environments are generated on a web server, wherein a conversion module can be executed in each working environment, and wherein a separate programming project can be implemented in each working environment.
[0116] This achieves the technical advantage of enabling the complete separation of different programming projects within a separately designed working environment on a web server. Furthermore, these different working environments can be equipped with corresponding password-protected access, allowing only authorized users to access each project within that environment. Thus, for example, the functionality of a web-based development environment and, particularly, the computing power of the web server, can be provided to different users for implementing their respective programming projects. Therefore, the protection of sensitive data on the web server can be ensured.
[0117] To this end, multiple instances of the conversion module can be created for a web-based development environment designed on a web server. Different instances of the conversion module can execute in different working environments. This allows multiple different programming projects to be processed simultaneously. Each instance of the conversion module can have an analysis module, enabling both local and global analysis of the program code created within the programming environment.
[0118] According to one implementation, the web server is integrated into the controller of the automation system.
[0119] This achieves the technological advantage of providing the most compact possible unit between the web server and the controller of the automation system. By integrating the web server into the controller of the automation system, no additional data processing equipment is needed to run the web server.
[0120] According to one embodiment, the working environment further includes a service module, wherein the service module is designed to perform computationally expensive processes of the input module executed in a web browser.
[0121] This achieves the technical advantage of offloading computationally intensive processes to a web server, thereby saving resources on the corresponding client devices. The computationally intensive process of the input module could be, for example, a layout algorithm, which is necessary and consequently computationally expensive when programming a graphical programming language to create program code.
[0122] According to a second aspect of the invention, an automation system is provided, the automation system having a controller and a web server connected to the controller, wherein the web server can be connected to a client device and another client device, wherein a working environment and a web-based development environment are installed on the web server, and wherein the automation system is designed to execute a method according to the invention for creating and executing a control program for controlling the automation system.
[0123] This achieves the technical advantage of providing an automation system that enables the generation of program code for controlling the automation system using a web-based development environment installed on a web server.
[0124] The invention is further illustrated below with reference to the accompanying illustrative and non-tolerance-scale drawings, incorporating embodiments. The same reference numerals are used in the description of the drawings, the list of reference numerals, the claims, and the figures themselves to characterize segments, elements, components, units, assemblies, and / or schemes having the same or similar design and / or function.
[0125] In this invention, a feature can be designed in an affirmative manner, that is, in a present manner, or in a negative manner, that is, in a non-present manner. A negative feature is not explicitly interpreted as a feature unless the invention emphasizes the fact that it does not exist, that is, the invention actually made rather than the invention constructed by prior art omits the feature.
[0126] Features in the specification can also be interpreted as optional features; that is, each feature can be understood as optional, arbitrary, or preferred, i.e., as a non-binding feature. Therefore, features can be extracted from the embodiments, including, where necessary, their periphery, wherein the feature can then be applied to the broader inventive concept. The absence of a feature in one embodiment indicates that the feature is optional for the purposes of the invention. Attached Figure Description
[0127] As shown in the attached figure:
[0128] Figure 1 A schematic diagram of an automated system according to one embodiment is shown;
[0129] Figure 2 A flowchart illustrating a method for creating and executing a control program for controlling an automated system, according to one embodiment;
[0130] Figure 3 Another flowchart illustrates a method for creating and executing a control program for controlling an automated system, according to another embodiment;
[0131] Figure 4Another flowchart illustrates a method for creating and executing a control program for controlling an automated system, according to another embodiment;
[0132] Figure 5 It is shown that according to one embodiment, in Figure 1 A flowchart of data communication over time between a web server and client devices in an automated system.
[0133] Figure 6 It is shown that according to one embodiment, in Figure 1 A flowchart illustrating the data communication over time between a web server and client devices in an automated system; and
[0134] Figure 7 Another flowchart illustrates a method for creating and executing a control program for controlling an automated system, according to another embodiment;
[0135] Figure 8 Another flowchart illustrating a method for creating and executing a control program for controlling an automated system, according to another embodiment; and
[0136] Figure 9 An example of another embodiment is shown. Figure 1 Another schematic diagram of the automated system in the image. Detailed Implementation
[0137] Figure 1 A schematic diagram of an automation system 200 according to one embodiment is shown.
[0138] exist Figure 1 The automation system 200 shown includes a controller 201 and a web server 203, the web server being connected to the controller via a data bus 213. A working environment 209 is established on the web server 203, in which a web-based development environment 300 can be executed, wherein the development environment 300 is installed on the web server 203. In the automation system 200... Figure 1 In the illustrated embodiment, the controller 201 and the web server 203 are implemented through two separate data processing devices. Alternatively, the web server 203 can be integrated into the controller 201. Furthermore, a connection to the Internet can be achieved via the data bus 213.
[0139] In addition, Figure 1 In this implementation, client device 205 and another client device 207 are connected to web server 203 via Internet connection 215. A web browser 206 is installed on client device 205, in which an instance 311 of the input module of the web-based development environment 300 is executed.
[0140] Another web browser 208 is installed on the other client device 207, in which another instance 313 of the input module is executed.
[0141] Client device 205 and the other client device 207 can be any data processing device, such as an industrial computer, desktop computer, laptop computer, or any mobile device, such as a mobile phone or tablet. Web browsers 206 and 208 can be any web browser known in the prior art, and client devices 205 and 207 can run on any operating system known in the prior art. Alternatively, the web browser can also be integrated into the application and execute as part of that application.
[0142] The automation system 200 can be any industrial automation equipment and the controller 201 can be configured as any controller of the automation equipment, especially a programmable logic controller (SPS).
[0143] As in Figure 1 An alternative to the illustrated implementation is that any number of client devices can be connected to the web server 203 via Internet connection 215. In particular, the automation system 200 can have any number of web servers 203. Furthermore, any number of different working environments 209 can be established on the web server 203, on which web-based development environments 300 can be executed respectively.
[0144] Figure 2 A flowchart is shown of a method 100 for creating and executing a control program for controlling an automation system 200, according to one embodiment.
[0145] Figure 2 The implementation method of method 100 is described in reference to... Figure 9 Describe it using the descriptions that belong to it.
[0146] According to Figure 1 The method 100 for creating and executing control programs for controlling the automation system 200 shown in the diagram can be applied to an automation system having a controller 201 and a web server 203 connected to the controller 201.
[0147] To create a control program, a user can connect to the web server 203 via an internet connection 215 using their client device 205, such as a desktop computer, laptop, or any mobile device, and a web browser 206 running on the client device 205. The connection to the web server 203 may, for example, include a password-protected access process in which the user must log in with a properly configured user account.
[0148] After successfully connecting to a web server 203 equipped with a web-based development environment 300 having an input module 301 and a conversion module 303, the user can load an instance of the input module 301 of the web-based development environment 300 in the working environment connection step 103 and execute it in the web browser 206 of the client device 205. The instance 311 of the input module may have a corresponding graphical user interface (GUI) that provides the user with input possibilities, such as text editing. The instance 311 of the input module may be constructed similarly to an integrated development environment (IDE) known in the prior art.
[0149] Using the graphical user interface (GUI) of the input module instance 311 executed in web browser 206, a user can establish a connection with the working environment 209 on web server 203 during working environment connection step 103. The working environment 209 established on web server 203 may include a corresponding programming project, which includes a program file containing the program code to be modified to control the program. Alternatively, the user can create a new programming project and create new program code in working environment 209 via the instance of the input module executed in web browser 206.
[0150] A programming project may contain any other files besides the program file containing the program code, storing any information necessary for performing the programming process. Furthermore, the programming project may include program code or code documentation for controlling the conversion process. The individual files may be arranged in corresponding directories. Additionally, the programming project may have various databases required for creating program code in the corresponding programming language and may include, for example, usable file types, functions, and other objects of the corresponding programming language. The databases, in particular, can be automatically populated. This is especially true when performing analysis of the created program code, where the analysis results are stored or cached in the database.
[0151] Therefore, in code creation step 105, the user can create a first version of the program code for the control program of the automation system 200 in the first programming language by correspondingly inputting it into instance 311 of the input module executed in the web browser 206. For this purpose, the corresponding program code can be created in the first programming language within the web browser 206 executed via the client device 205 using various text or graphical editors of the input module 301.
[0152] The first programming language used can be any text-based or graphical programming language known in the prior art. Alternatively, the first programming language can be a programming language known in the prior art for automated systems, such as Sequential Function Chart (SFC), Ladder Diagram (LD), or Function Block Diagram (FBD).
[0153] Alternatively, the first programming language may be any text-based or graphical programming language known from the prior art.
[0154] The first version of the program code can be newly created program code. Alternatively, the first version of the program code can be a modified version of an existing program code stored on a web server 203 within the working environment 209 under the corresponding programming project. For this purpose, the existing program code can be first loaded from the web server 203 onto an instance 311 of the input module executed in the web browser 206 of the client device 205.
[0155] After the first version of the program code is created in code creation step 105, the first version of the program code created in program code transfer step 107 can be transferred to web server 203 via Internet connection 215 by instance 311 of the input module executed in web browser 206. By transmitting corresponding messages to web server 203 at predetermined time intervals by instance 311 of the input module executed in web browser 206, the transfer of the created program code from instance 311 of the input module executed in web browser 206 to web server 203 can be automatically implemented.
[0156] Alternatively, in program code transfer step 107, only the changes made to the program code in code creation step 105 (based on which a first version of the program code is created) can be transferred from the input module instance 311 executed in web browser 206 to web server 203 via Internet connection 215. This is particularly interesting when the first version of the program code is a modified version of the already created program code.
[0157] Alternatively, users can transmit the program code they created from instance 311 of the input module, which is executed in web browser 206, to web server 203 via the corresponding sending function.
[0158] After successfully transmitting the created program code to the web server 203, the transmitted program code can be written to a program file within the working environment in step 109. Here, the program file in the working environment can be created during the creation of a new programming project. Alternatively, the program file can be part of an existing program project, and the created first version of the program code represents a modification of the existing program code.
[0159] Similar to the buffer, the program file can be configured as a file in the main memory of the web server 203, so that changes to the program file do not need to be automatically stored in the permanent data storage of the web server 203, such as a hard disk.
[0160] Furthermore, the program file can be associated with an associated file in the permanent data storage of the web server 203, and the content of the program file can be stored in the associated file, thereby enabling the content of the program file to be stored in the permanent storage of the web server 203.
[0161] Alternatively, the program file in step 109 can be stored in the permanent data storage of the web server 203.
[0162] Program files can be constructed as composite types and include other file parts, such as portions of a comprehensive control program. The created program code can include the complete control program. Alternatively, the created program code can be a part of a complex control program.
[0163] Next, in conversion step 111, the conversion module 303 of the web-based development environment 300, which can be executed in the working environment 209, can be executed, and the program code written in the first programming language in the program file can be converted into binary code or machine language of the corresponding binary language. The binary code generated by the conversion module 303 is adapted to the design of the controller 201 of the automation system, so that the converted binary code can be executed by the controller 201.
[0164] After the program code created in conversion step 111 is converted, the resulting binary code can be transmitted from the operating environment 209 to the controller 201 of the automation system 200 in binary code transmission step 113. This can be achieved, for example, through a corresponding data bus 213. The data bus 213 can be configured, for example, as a local network connection.
[0165] After the binary code is transmitted to the controller 201, the binary code can be executed by the controller 201 in execution step 115 and control the automation system 200 according to the created control program.
[0166] Figure 3 Another flowchart illustrates a method 100 for creating and executing a control program for controlling an automation system 200, according to another embodiment.
[0167] exist Figure 3 The implementation of method 100 is based on... Figure 2 The implementation methods and included Figure 2 All method steps in the implementation method described herein. If these method steps are in Figure 3 If the implementation remains unchanged, then a detailed description will be omitted.
[0168] and Figure 2 The implementation methods are different. Figure 3 The implementation described in the text involves two users creating the program code, who use separate client devices, for example, according to... Figure 1 Client device 205 and another client device 207 simultaneously create program code for the control program.
[0169] Therefore, in another server connection step 117, a connection can be established between the other client device 207 and the web server 203 via another web browser 208. This connection between the other client device 207 and the web server 203 may further include a password-protected access process, whereby the other user must log in to the server using a separate, appropriate user account.
[0170] Subsequently, the other user can load another instance 313 of the input module of the web-based development environment 300 installed on the web server 203 through the other web browser 208 of the other client device 207 and execute it in the other web browser 208 of the other client device 207 in another working environment connection step 119. The other instance 313 of the input module may have a graphical user interface (GUI) similar to the input module instance 311, which provides the user with corresponding input possibilities for creating program code within the other web browser 208. The two instances 311 and 313 of the input module can be executed in different web browsers and on different client devices running with different operating systems. For example, client device 205 may be a desktop computer, while the other client device 207 may be a mobile device.
[0171] Subsequently, a connection to the working environment 209 of the web server 203 can be established through another instance 313 of the input module. This may further include a password-protected access process.
[0172] Subsequently, in another program code transfer step 121, the first version of the program code written in the program file can be transferred from the web server 203 to the other instance 313 of the input module and displayed in that instance. Thus, another user can edit the version of the program code edited by the first user.
[0173] Subsequently, the first version of the program code can be modified in modification creation step 123 to create a second version of the program code. For this purpose, the user can modify the program code downloaded from the working environment 209 of the web server 203 by corresponding input on the other instance 313 of the input module. The user can use the editor provided in the input module 301 to create program code in the corresponding programming language.
[0174] Subsequently, the second version of the program code can be transmitted to the web server 203 and, in particular, to the working environment 209 by the other instance 313 of the input module in the first change transmission step 125. In the first change transmission step 125, the second version of the program code can be transmitted, in particular, by transmitting only the changes made in the program code. For this purpose, each individually made change can be transmitted from the other instance 313 of the input module to the web server 203 in a separate message.
[0175] After the second version of the program code or the changes made are transmitted to the working environment 209 of the web server 203, the second version of the program code can be written into the program file of the working environment 209 in the change writing step 127. For this purpose, in particular, the changes made can be added only to the first version of the program code.
[0176] After the second version of the program code is written into the program file, in the second change transfer step 129, the version written into the program file can be transferred from the working environment 209 to the instance 311 of the input module executed in the web browser 206 of the client device 205. In the change display step 131, the second version of the program code created by the other user of the other client device 207 is displayed to the user of the corresponding instance 311 of the input module, and in particular, the changes made to the program code are displayed. Through this compensation, two users can work with the same version of the program code, thereby enabling multiple users to edit the program code simultaneously.
[0177] The transmission of the program code version written to the program file in transmission step 129 can be performed automatically, in such a way that after the program code version is written to the program file, the web server 203 automatically transmits the program code version to instance 311 of the input module of the client device 205. Alternatively, the program code version is transmitted from the web server 203 to the client devices 205, 207 as a response message to a corresponding request on the web server 203 from the client devices 205, 207 or instances 311, 313 of the input modules, wherein the client devices 205, 207 or instances 311, 313 of the input modules inquire whether the current version of the program code exists.
[0178] After writing the second version to the program file in step 127, similar to... Figure 2 In the implementation of the above, in the conversion step 111, the version of the program code written in the program file can be converted into the corresponding binary code by the conversion module 303. The binary code can be transmitted to the controller 201 in the binary code conversion step 113 and can be executed by the controller in the execution step 115.
[0179] Figure 4 Another flowchart illustrates a method 100 for creating and executing a control program for controlling an automation system 200, according to another embodiment.
[0180] Figure 4 The implementation method in is based on Figure 3 The embodiments described herein include all method steps described therein. As long as these figures are in... Figure 4 The implementation method remains unchanged, and the detailed description is omitted.
[0181] and Figure 3 The implementation methods differ in that, Figure 4 In the implementation of the method, in the change transmission step 125, in addition to the changes made to the program code of the first version, information about the first version or the program code of the first version, such as the version number, may also be transmitted to the web server 203.
[0182] Subsequently, in comparison step 133, the information about the first version of the program code transmitted in change transmission step 125 can be compared with the version written into the program file and stored in the working environment 209 on the web server 203. Based on the information of the first version, a second version of the program code is created by making corresponding changes. For example, the version number of the first version can be compared with the version of the program code written into the program file.
[0183] If the program code version written to the program file is identified in comparison step 133 as being consistent with the program code version transmitted in the first change transmission step 125, for example, if the version numbers are consistent, then the changes transmitted in the first change transmission step 125 can be written to the program file in change writing step 127 or added to the corresponding version of the program code.
[0184] If, in comparison step 133, an inconsistency is identified between the version of program code in the program file and the version of program code transmitted in the first change transmission step 125, for example, due to a lack of version number consistency, a synchronization error is determined in error reporting step 135. This synchronization error means that, while the first version of program code is being edited by the other user, the version of program code stored in the program file in the other instance 313 of the input module is updated and thus altered. This can occur when multiple users simultaneously modify the program code and store it in the program file. Therefore, by determining a synchronization error in error determination step 135, it is possible to prevent different users from working on different versions of program code and modifying them independently of each other.
[0185] After a synchronization error is identified, in version transfer step 137, the version written in the program file can be transferred from the web server 203 to the other instance 313 of the input module.
[0186] In version display step 139, the transmitted version of the program code written to the program file at the time of transmission can be displayed to the other user in the other instance 313 of the input module on the other client device 207. This shows the other user that the first version of the program code has been modified by the other user by adding further changes when the other user has made changes to create the second version of the program code. Therefore, by displaying the version of the program code in the program file in version display step 139, the current version of the program code, including changes made by other users, can be displayed to the other user.
[0187] Based on the version of the program code displayed in version display step 139, the other user can make other changes and create other versions of the program code by correspondingly inputting them into another instance 313 of the input module in change creation step 123. This enables the synchronization of program code to be processed by different users, ensuring that different users can simultaneously process the same version of the program code. Furthermore, all changes made are displayed to all users simultaneously editing the same program code.
[0188] Figure 5It is shown that according to one embodiment, in Figure 1 A flowchart of data communication over time between the web server 203 and client devices 205 and 207 in the automated system 200.
[0189] Figure 5 and Figure 6 The images show versions of the program code to be created, processed by multiple users. Figure 4 The synchronization process described in the text follows the flow of time.
[0190] exist Figure 5 and Figure 6 The right and left columns respectively show the local state of the version of program code displayed in the corresponding instances 311 and 313 of the input modules of the two client devices 205 and 207. The middle column represents the state of the web server 203 over time and describes the version of program code stored in the program file over time.
[0191] exist Figure 5 In the case of the first user at the client device 205 using instance 311 of the input module executed in the web browser 206, the program code to be created is first edited and the first version of the program code V1 to be created is created.
[0192] In instance 311 of the input module, after the first user creates the first version of program code V1, at the first time point T1, in program code transmission step 107, the first version of program code V1 is transmitted to the web server 203. In web server 203, in writing step 109, the transmitted first version of program code V1 is written to the program file of the working environment 209. Therefore, the local state of web server 203 is defined by the first version of program code V1 written to the program file. In program code transmission step 121, web server 203 transmits the first version of program code V1 written to the program file to the other user of the other client device 207.
[0193] The other user edits the first version of the program code V1 and creates a second version of the program code V2 in another instance 313 of the input module executed in the other web browser 208. At a second time point T2, in the change transmission step 125, the other instance 313 of the input module transmits the created second version of the program code V2 to the web server 203. In the change transmission step 125, in addition to the changes made, the version number VN1 of the first version of the program code is also transmitted.
[0194] Subsequently, in comparison step 133, the version number VN1 of the transmitted first version of the program code is compared with the version number of the program code written to the program file. Figure 5 In the example shown, at the point in time when the transmitted changes are received via web server 203, the version number VN1 of the transmitted first version of the program code corresponds to the version number of the program code written into the program file. Therefore, after performing comparison step 133, the changes to the second version of the program code V2 are written into the program file, so that the local state of web server 203 includes the second version of the program code written into the program file.
[0195] Subsequently, the second version of the program code V2 or the changes made thereto are transmitted from the web server 203 to the first client device 205 or to the instance 311 of the input module executed in the web browser 206.
[0196] In the change display step 131, the changes to the transmitted second version of the program code are displayed in instance 311 of the input module, such that at that point in time the local state of the client device 205 is defined by the second version of the program code V2 displayed in instance 311 of the input module.
[0197] Subsequently, the user of client device 205 modifies the second version of program code V2 by making changes and creates the third version of program code V3 in change creation step 123. Therefore, the local state of client device 205 at that point in time is defined by the third version of program code V3 displayed in instance 311 of the input module.
[0198] At the third time point T3, instance 311 of the input module of client device 205 transmits the third version of program code V3, especially the changes made to the second version of program code V2 (including the version number VN2 of the second version of program code that forms the basis of the third version of program code V3), to web server 203. It then performs comparison step 133 and compares the version number VN2 of the transmitted second version of program code with the version number of the program code written in the program file.
[0199] exist Figure 5 In the example shown, the version number VN2 of the transmitted second version of the program code corresponds to the version number of the program code written to the program file, causing a change to be made in the change writing step 127 and the third version of the program code V3 to be written to the program file. Therefore, the local state of the web server 203 is defined by writing the third version of the program code V3 to the program file.
[0200] Subsequently, web server 203 transmits the third version of program code V3 to the other instance 313 of the input module of the other client device 207. In the change display step 131, the other instance 313 of the input module then displays the third version of program code V3, such that the local state of the other client device 207 after its change to the third version is defined by the displayed third version of program code V3.
[0201] Figure 6 It is shown that according to one embodiment, in Figure 1 A flowchart of data communication over time between the web server 203 and client devices 205 and 207 in the automated system 200.
[0202] exist Figure 6 Another example of the synchronization process is shown below. Figure 5 The difference lies in Figure 6 A synchronization error occurred in the example.
[0203] Similar to Figure 5 In the example, the first user edits the program code and creates the first version of the program code V1 in instance 311 of the input module.
[0204] At time T1, the first version of the program code is transmitted to server 203, which writes the first version of the program code V1 into a program file and transmits it to the other instance 313 of the input module of the other user or the other client device.
[0205] The other instance 313 of the input module displays the first version of program code V1, and the other user of the other client device 207 edits the first version of program code V1 and creates the second version of program code V2.
[0206] At time T2, the changes to the second version of the program code V2, including version number VN1 of the first version of the program code, are transmitted to the web server 203. After performing comparison step 133, the program server 203 writes the second version of the program code V2 into the program file.
[0207] and Figure 5 The examples in [the text] are different, in [the text] Figure 6 In the example, the first user of client device 205 edits the first version of program code V1 at the same time as the second user edits the first version of program code V1. At this point in time, the first version defines the local state of client device 205 and creates the third version of program code V3.
[0208] At the third time point T3, instance 311 of the input module transmits the third version of the program code V3, which includes the version number VN1 of the first version of the program code, to the web server 203. The version number of the third version of the program code V3 is based on the first version.
[0209] In comparison step 133, web server 203 compares the version number VN1 of the transmitted first version of program code with the version number of the program code written in the program file. Since the program file is defined by the second version of program code V2 at that point in time, and thus the local state of web server 203 is defined, and therefore the version number VN1 of the transmitted first version of program code does not match the version number of the program file, which corresponds to the version number VN2 of the second version of program code, a synchronization error is determined in error determination step 135.
[0210] Subsequently, the transmitted third version of the program code was not written to the program file. Instead, the second version of the program code V2, which was written to the program file at that point, was transmitted by the web server 203 to instance 311 of the input module of the first user's client device 205.
[0211] In the change display step 131, the second version of program code V2 is then displayed in instance 311 of the input module of client device 205. Thus, displaying the changes to the second version of program code V2 created during this period by the other user of the other client device 207 to the user of client device 205 restores the synchronization of the versions or states of program code used separately on the client devices 205 and 207 of the different users.
[0212] Figure 7 Another flowchart illustrates a method 100 for creating and executing a control program for controlling an automation system 200, according to another embodiment.
[0213] Figure 7 The implementation of method 100 is based on Figure 2 The embodiments described herein include all method steps described therein. As long as these figures are in... Figure 7 The implementation remains unchanged, and a detailed description is omitted.
[0214] Unlike Figure 2 The implementation method in Figure 7 In the embodiment, the working environment connection step 103 includes a working environment generation step 173. In the working environment generation step 173, the user connected to the web server 203 can generate a working environment 209 on the web server 203 via a web browser 206 running on the client device 205.
[0215] To this end, the user can create a new programming project and set it up in the newly created working environment 209. The created working environment 209 can also be equipped with a password-protected access procedure, which ensures that only authorized users have access to the working environment 209 and the program projects set up therein.
[0216] Subsequently, in step 175, a conversion module 303 for a web-based development environment 300 can be established within the newly generated working environment 209. Thus, programming projects created in the newly generated working environment can be executed through the web-based development environment 300.
[0217] Alternatively, an instance of the conversion module 303 can be created on the web server 203, which can then be executed in the working environment 209. If multiple working environments 209 are created on the web server 203, a separate instance of the conversion module 303 can be created for each working environment 209, and this instance can only be executed in its respective working environment 209. Multiple instances of the conversion module 303 can execute simultaneously. Therefore, different programming projects can be processed concurrently on the web server 203.
[0218] After successfully connecting to the working environment in step 103, the user can create the desired program code in step 105 by executing instance 311 of the input module in web browser 206.
[0219] and Figure 2 The implementation methods are different. Figure 7 The implementation method can perform global and local analysis on the created program code, which can be performed simultaneously or at different times.
[0220] To this end, the conversion module 303 of the web-based development environment 300 includes an analysis module designed to perform semantic and syntactic analysis on the created program code. Here, the semantic and syntactic analysis is based on the semantics and syntax of the programming language used to create the program code. In the case of generating instances of the conversion module 303 for each working environment 209 of the web server 203, each of these instances includes an instance of the analysis module, which can be executed within its respective instance of the conversion module 303 within its respective working environment 209.
[0221] Therefore, after the program code created in program code transfer step 107 is transferred from the instance of the input module to the web server 203 and written to the program file in writing step 109, the global analysis of the transferred program code can be performed by the analysis module in global analysis step 141. The global analysis here considers the fully created program code and, in particular, includes lexical analysis of the program code as well as analysis of the semantics and syntax used in the program code.
[0222] Therefore, the global analysis step 141 may include a snapshot step 147, in which an analysis version of the created program code can be generated. A copy of the program code can be created for this purpose. The global analysis is then performed based on the created analysis version of the program code. Because the global analysis includes the complete created program code, this can be time-consuming. By creating an analysis version of the program code to be used for the global analysis (an analysis version unaffected by other changes to the program code written in the program file), it can be ensured that while the global analysis is being performed, the user can make other changes to the program code without interrupting the user's programming process or compromising the results of the global analysis due to simultaneous changes to the program code.
[0223] After creating an analysis version of the program code and performing a global analysis based on the analysis version of the program code, the results generated by the global analysis can be transmitted from the web server 203 to the instance 311 of the input module executed in the web browser 206 of the client device 205 in the global analysis result transmission step 143.
[0224] In step 145, the results of the global analysis can be displayed in instance 311 of the input module executed in web browser 206.
[0225] The results of the global analysis can include error reports of syntax or semantic errors in the created program code. Additionally, the results of the global analysis can include variables, functions, data types, domain names, or other objects of the programming language used in the program code, which can be displayed in a corresponding list or display window in instance 311 of the input module.
[0226] Local analysis of the created program code can be performed simultaneously with or with a time delay. For this purpose, a current version of the program code can be created in update step 149. In particular, a current version of the program code can be created for each implemented change, in which the implemented changes are detected.
[0227] Unlike global analysis, which primarily examines or identifies the semantic and syntactic correctness of the created program code or the objects used in the program code, local analysis serves to provide users with input assistance, such as automatic code location filling or coloring, or highlighting relevant special characters or keywords in the created program code. Therefore, local analysis is performed on the current version of the program code, created after changes were made. Furthermore, program objects in the program code can be identified and accessibly stored through global analysis. For this purpose, a corresponding database may be generated, for example.
[0228] Therefore, in the local analysis step 151, a local analysis of a portion of the created program code can be performed on each created current version of the program code. The local analysis only considers the parts of the program code necessary to enable automatic completion of the written program code. Therefore, for each created current version of the program code, a separate local analysis can be performed in the local analysis step 151. After the local analysis is completed, the determined local analysis results can be transmitted to instance 311 of the input module in the local analysis result transmission step 153.
[0229] In step 155, the transmitted local analysis results are displayed in instance 311 of the input module. These local analysis results can be displayed to the user, for example, by completing the written program code or graphically highlighting the relevant parts of the program code as input aids.
[0230] In the program code transfer step 107, each change implemented to the created program code can be transferred to the web server 203 in a separate message. Therefore, in the update step 149, a current version of the program code can be created for each transmitted change, and a separate local analysis can be performed based on the current version of the program code in the local analysis step 151.
[0231] Here, changes to the program code can consist of adding or deleting a single symbol from the program code.
[0232] The analysis module of the transformation module may further include a global analysis component and a local analysis component. The global analysis component may be designed to perform global analysis, while the local analysis component may be designed to perform local analysis. By performing global analysis through the global analysis component and local analysis through the local analysis component, these two analyses can be performed simultaneously without mutual interference.
[0233] The transmission of global analysis results in step 143 can be configured as a response from instance 311 of the input module to a corresponding polling request from the web server 203. The transmission of local analysis results in step 153 can be configured as a push message from the web server 203 to instance 311 of the input module.
[0234] Alternatively, web server 203 can notify the client or input module instance 311 of the existence of the current analysis results via push messages. The client or input module instance 311 can then query the web server 203 for the current analysis results using appropriate polling messages.
[0235] Alternatively, the local analysis module 309 can engage with the web server 203 via a polling message from the client. The local analysis module 309 then performs the local analysis, and the web server 203 sends the results to both the client requesting the local analysis and the instance 311 of the input module.
[0236] exist Figure 7 The implementation of global and local analysis described in the embodiments can be similarly adapted to... Figure 3 and Figure 4 The implementation method involves changes to the program code created by other users in step 123 of the modification process. Therefore, both global and local analysis can be performed on all users involved in creating and modifying the program code.
[0237] After performing global or local analysis, the program code written to the program file can be converted in conversion step 111. Before converting the program code in conversion step 111, multiple global and local analyses can be performed on the created program code. In particular, the version of the program code written to the program file can be changed or modified multiple times.
[0238] exist Figure 7 In this implementation, the conversion in conversion step 111 includes a first conversion step 157 and a second conversion step 159. In the first conversion step 157, program code created in a first programming language can be converted into a high-level language. The high-level language can be, for example, C++ code. Alternatively, the high-level language can be any text-based high-level language known in the prior art.
[0239] In the second conversion step 159, the program code converted into a high-level language can be converted into corresponding binary code that can be executed by the controller 201 of the automation system 200.
[0240] To implement the first conversion step 157 and the second conversion step 159, the conversion module may include a front-end component and a back-end component. The front-end component may be designed to convert program code in a first programming language into corresponding program code in a high-level language. The back-end component may be designed to convert the program code created in the high-level language into corresponding binary code.
[0241] Figure 8 Another flowchart illustrates a method 100 for creating and executing a control program for controlling an automation system 200, according to another embodiment.
[0242] Figure 8 The implementation method in is based on Figure 2 The implementation methods described herein include all the method steps described therein. These will not be described in detail again below. Figure 8 The method steps in the implementation are unchanged.
[0243] exist Figure 8 In this implementation, after writing the created program code into the program file in step 109, a debugging process can be carried out in step 161 to test whether the function of the created program code is intact.
[0244] Therefore, debugging step 161 includes debugging conversion step 163, in which the program code written in the program file is converted into corresponding binary code by a conversion module.
[0245] Subsequently, the binary code generated in the debugging conversion step 163 can be transmitted to the controller 201 of the automation system in the debugging transmission step 165.
[0246] Subsequently, the binary code of the created program code, transmitted to the controller 201, can be executed in debugging execution step 167. During the execution of the binary code of the control program through the controller 201, various control parameters can be recorded, which can lead to conclusions about whether the control program used to control the automation system 200 is functioning correctly.
[0247] In the subsequent debugging information transmission step 169, the control parameters recorded in the debugging execution step 167 can be transmitted as information to the instance of the input module executed in the web browser 206. For this purpose, this information can first be transmitted from the controller 201 executing the control program to the web server 203. The transmitted information or control parameters can be displayed to the user in the instance 311 of the input module, thereby enabling the user to check whether the functionality of the created program code is intact. Furthermore, the debugging step 161 may include a breakpoint setting step 171, in which corresponding breakpoints can be set on the created program code. These breakpoints enable the program code to stop execution at the location where the program code passes the set breakpoint marker in the debugging execution step 167.
[0248] Debugging step 161 can be initiated by the user through the corresponding input in the input module.
[0249] Debugging execution step 167 can be implemented by the controller 201 of the automation system. Alternatively, a simulation module can be installed on the web server 203, which is designed to perform debugging execution step 167 and simulate the control of the automation system 200 based on the created program code.
[0250] The debugging process in debugging step 161 can be performed according to the debugging process known from the usual prior art, in which the functionality of the created program code can be checked.
[0251] The method 100 according to the present invention can be applied to any number of different users connected to the web server 203 through different client devices. Each user can create program code for a control program for an automation system by executing an instance of the input module in the web browser of the client device they are using. The synchronization function ensures that all users simultaneously creating or editing common program code or displaying information about it can work on the same version of the program code and display changes made to the program code by other users. This enables direct collaborative work, during which program code for a control program for an automation system can be jointly generated through mutual exchange. Here, computational operations for creating program code, converting program code into binary code, and implementing individual analysis or debugging processes can be performed via the web server 203.
[0252] According to one implementation, one client or another client can be any application that connects to the server through a defined interface, obtains information from the server, and transmits the information back to the server. Furthermore, one client or another client can perform a function different from that of the Intelligent Development Environment (IDE).
[0253] Figure 9 An example of another embodiment is shown. Figure 1 Another schematic diagram of the automated system 200 in the diagram.
[0254] exist Figure 9 In this implementation, the automation system 200 includes a controller 201 connected to a web server 203 via a data bus 213. Additionally, a client device 205 is connected to the web server 203 via an internet connection 215.
[0255] Three different working environments 209 are established on the web server 203. In one working environment 209, an instance of a web-based development environment 300 with a conversion module 303 is installed on the web server. The conversion module 303 includes an analysis module 305. The analysis module 305 includes a global analysis module 307 and a local analysis module 309. The analysis module 305 is designed to perform analysis on the created program code. The global analysis module 307 is designed to perform global analysis according to global analysis step 141. The local analysis module 309 is designed to perform local analysis on the created program code according to local analysis step 151.
[0256] exist Figure 9 In this implementation, a service module 211 is also established in the working environment 209. The service module 211 constructs algorithms to handle computational overhead. For example, the service module 211 may be designed to execute layout algorithms performed during programming in a graphical programming language. Therefore, the service module 211 can switch computationally expensive steps occurring during programming code to the web server 203, thereby protecting the resources of the client device 205.
[0257] In addition, two independent programming projects 219 are established in the working environment 209. Here, program files 217 set in data structures are assigned to programming projects 219, and these program files can be edited within programming projects 219 and can be written into the corresponding program code.
[0258] Replace in Figure 9 The exemplary implementation shown allows for the creation of any number of different individual working environments 209 on the web server 203. Furthermore, any number of different programming projects 219 can be created within each working environment, and these programming projects can be associated with any number of different program files 217.
[0259] Client device 205 includes a web browser 206, in which an instance 311 of the input module of the web-based development environment 300 is executed. Figure 9 In the implementation, example 311 of the input module includes a text editor 315, an editor 317 for a Sequential Function Chart (SFC) of a programming language, an editor 319 for a Ladder Diagram (LD) of a programming language, and an editor 321 for a Function Block Diagram (FBD) of a programming language. The input module 301 in... Figure 9 The embodiments shown are merely exemplary. Alternatively, input module 301 may include other functions, editors, and other components common to integrated development environments (IDEs) known from the prior art.
[0260] Data communication between client device 205 and web server 203 can be implemented via HTTP or HTTPS protocols. Specifically, versions of program code can be exchanged between web server 203 and client device 205 via HTTP or HTTPS protocols. Further communication between web server 203 and client device 205 can be implemented via a Web-Socket channel.
[0261] List of reference numerals
[0262] 100 Methods for generating and executing control programs
[0263] 101 Server Connection Steps
[0264] 103 Working Environment Connection Steps
[0265] 105 Code Creation Steps
[0266] 107 Program Code Transfer Steps
[0267] 109 Writing Steps
[0268] 111 Conversion Steps
[0269] 113 Binary Code Transmission Steps
[0270] 115 Execution Steps
[0271] 117 server connection steps
[0272] 119 Another working environment connection step
[0273] 121 Another program code transfer step
[0274] 123 Change creation steps
[0275] 125 Change transmission steps
[0276] 127 Change Write Step
[0277] 129 Second Change Transmission Step
[0278] 131 Change display steps
[0279] 133 Comparison Steps
[0280] 135 Error Determination Steps
[0281] Version 137 transfer steps
[0282] Version 139 displays steps
[0283] 141 Global Analysis Steps
[0284] 143 Global Analysis Result Transmission Steps
[0285] 145 Global Analysis Showing Steps
[0286] 147 Snapshot Steps
[0287] 149 Update Steps
[0288] 151 Local Analysis Steps
[0289] 153 Steps for transferring local analysis results
[0290] 155 Local analysis results show steps
[0291] 157 Part 1 Conversion Steps
[0292] 159 Part Two Conversion Steps
[0293] 161 Debugging Steps
[0294] 163 Debugging and Conversion Steps
[0295] 165 Debugging and Conversion Steps
[0296] 167 Debugging Execution Steps
[0297] 169 Debugging Information Transmission Steps
[0298] 171 Breakpoint Setting Steps
[0299] 173 Steps to generate the working environment
[0300] 175 Steps to Establish
[0301] 200 Automation System
[0302] 201 Controller
[0303] 203 web server
[0304] 205 client device
[0305] 206 Web Browser
[0306] 207 Another client device
[0307] 208 Another web browser
[0308] 209 Working Environment
[0309] 211 Service Module
[0310] 213 data bus
[0311] 215 Internet Connection
[0312] 217 program file
[0313] 219 Programming Project
[0314] 300 Web-based Development Environments
[0315] 301 Input Module
[0316] 303 conversion module
[0317] 305 Analysis Module
[0318] 307 Global Analysis Module
[0319] 309 Local Analysis Module
[0320] 311 Example of an input module
[0321] Another example of the 313 input module
[0322] 315 Text Editor
[0323] 317 Editor for Sequential Function Charts (SFC)
[0324] 319 Editor for Ladder Diagrams (LA)
[0325] 321 Editor for Function Block Diagrams (FBDs)
[0326] V1 first version program code
[0327] V2 Second Version Program Code
[0328] V3 Version 3 Program Code
[0329] Version number of the first version of the VN1 program code
[0330] Version number of VN2 version 2 program code
[0331] VN3 version 3 program code version number
[0332] T1 First Time Point
[0333] T2 Second Time Point
[0334] T3 Third Time Point
Claims
1. A method (100) for creating and executing a control program for controlling an automated system (200), the automated system having a controller (201) and a web server (203) connected to the controller (201), the method comprising: In the server connection step (101), a connection between the client device (205) and the web server (203) is created by a web browser (206) executed on the client device (205), wherein a web-based development environment (300) is installed on the web server (203), the development environment having an input module (301) for creating program code and a conversion module (303) for converting the created program code, wherein the input module can be executed in the web browser (206), and wherein the conversion module (303) is designed to convert program code in a first programming language into program code in a binary language; In the working environment connection step (103), the client device (205) executes an instance (311) of the input module in the web browser (206), and a connection is created between the client device (205) and the working environment (209) of the web server (203) and the conversion module (303) of the working environment (209) through the instance (311) of the input module executed in the web browser (206), wherein the conversion module (303) can be executed in the working environment. In the code creation step (105), a first version of program code (V1) for the control program of the automation system (200) is created in the first programming language in an instance (311) of the input module executed in the web browser (206). In the program code transfer step (107), the created first version of program code (V1) is transferred from the instance (311) of the input module executed in the web browser (206) to the working environment (209) of the web server (203). In the writing step (109), the first version of the program code (V1) is written into the program file (217) in the working environment (209), wherein the program file (217) is stored in the main memory of the web server (203), wherein the program file (217) includes an associated file that is associated with the program file and stored in the permanent memory of the web server (203), and wherein the first version of the program code (V1) written into the program file (217) can be stored in the associated file; In another server connection step (117), another connection is created between the other client device (207) and the web server (203) by another web browser (208) executed on another client device (207); In another working environment connection step (119), another instance (313) of the input module is executed in the other web browser (208) of the other client device (207), and another connection is created between the other client device (207) and the working environment (209) of the web server (203) through the other instance (313) of the input module executed in the other web browser (208); In another program code transfer step (121), the first version of the program code (V1) written in the program file (217) is transferred to another instance (313) of the input module executed in the other web browser (208) of the other client device (207). In the change creation step (123), the first version of the program code (V1) is modified, and a second version of the program code (V2) is created in the first programming language in another instance (313) of the input module executed in the other web browser (208) of the other client device (207). In the first change transmission step (125), the second version of the program code (V2) is transmitted from another instance (313) of the input module to the working environment (209) of the web server (203); wherein, in the change transmission step (125), the changes made to the first version of the program code (V1) in the other instance (313) of the input module and the first version of the program code (V1) are transmitted. In the comparison step (133), the first version of the program code (V1) transmitted in the change transmission step (125) is compared with the version of the program code written in the program file (217); In the error determination step (135), if the first version of the program code (V1) is inconsistent with the version of the program code written in the program file, a synchronization error is determined; In the version transfer step (137), the program code of the version written in the program file (217) is transferred from the working environment to another instance (313) of the input module executed in the other web browser (208); and In the version display step (139), the program code of the transmitted version is displayed in another instance (313) of the input module executed in the other web browser (208); In the change writing step (127), the second version of the program code (V2) is written into the program file (217) in the working environment (209); In the second change transmission step (129), the second version of the program code (V2) written in the program file (217) is transmitted from the working environment (209) to the instance (311) of the input module executed in the web browser (206) of the client device (205); and In the change display step (131), the second version of the program code (V2) is displayed in the instance (311) of the input module executed in the web browser (206) on the client device (207). In the conversion step (111), the conversion module (303) is executed in the working environment (209), and the program code created in the first programming language and written in the program file (217) is converted into binary language program code by the conversion module (303). In the binary code transmission step (113), the binary language program code is transmitted from the working environment (209) to the controller (201) of the automation system (200); and In step (115), binary language program code is executed by the controller (201) of the automation system (200) and the automation system (200) is controlled based on the program code.
2. The method (100) according to claim 1, wherein, In the change transfer step (125) and the second change transfer step (129), the changes made in another instance (313) of the input module are transferred from the second version of the program code (V2) to the first version of the program code (V1).
3. The method (100) according to any one of the preceding claims, wherein, In the program code transfer step (107), each input made in the code creation step (105) is transmitted in a separate message, and in the change transfer step (125), each change made to the first version of the program code (V1) is transmitted in a separate message.
4. The method (100) according to claim 1, wherein, The conversion module (303) further includes an analysis module (305) for performing semantic analysis and / or syntax analysis in the created program code, the method further including: In the global analysis step (141), the analysis module (305) performs a global analysis of the program code written in the program file (217) in the first programming language and determines the global analysis result. The global analysis of the program code includes semantic analysis and syntax analysis of the entire program code based on the semantics and syntax of the first programming language. In the global analysis result transmission step (143), the global analysis result determined in the global analysis step (141) is transmitted to an instance (311) of the input module executed in the web browser (206) on the client device (205) and / or another instance (313) of the input module executed in the other web browser (208) on the other client device (207); and In the global analysis results display step (145), the transmitted global analysis results are displayed in an instance (311) of the input module executed in the web browser (206) on the client device (205) and / or in another instance (313) of the input module executed in the other web browser (208) on another client device (207).
5. The method (100) according to claim 4, wherein, The transmission of the global analysis results constitutes a response by the web server (203) to a polling request from the client device (205) to an instance (311) of the input module executed in the web browser (206) and / or to a polling request from another instance (313) of the input module executed in the other web browser (208) of the other client device (207).
6. The method (100) according to any one of claims 4 to 5, wherein, The global analysis results include error reports about semantic and / or syntax errors in the created program code, program objects used in the program code, and the relationships between program objects used in the program code, wherein program objects include variables, functions, data types, domain names, or other objects used in the program code.
7. The method (100) according to claim 4, wherein, The global analysis step (141) also includes: In the snapshot step (147), the analysis module (305) determines the analysis version of the program code written in the program file (217) in the first programming language, wherein the analysis version of the program code corresponds to the version of the program code written in the program file (217) at the time point of executing the global analysis step (141); and In the global analysis step (141), a global analysis of the program code in the first programming language is performed based on the analysis version.
8. The method (100) according to claim 4, wherein, The method also includes: In the update step (149), the analysis module (305) creates the current version of the program code written into the program file (217) in a first programming language, wherein the current version of the program code written into the program file (217) is created in the first programming language after each change to the program code by an instance (311) of the input module of the client device (205) and / or by another instance (313) of the input module of the other client device (207); In the local analysis step (151), the analysis module (305) performs a local analysis on a portion of the program file (217) written in the first programming language based on the current version of the program code, and determines the local analysis result; In the local analysis result transmission step (153), the local analysis result determined in the local analysis step (151) is transmitted to an instance (311) of the input module executed in the web browser (206) on the client device (205) and / or another instance (313) of the input module executed in the other web browser (208) on the other client device (207); and In the partial analysis result display step (155), the transmitted partial analysis results are displayed in an instance (311) of the input module executed in the web browser (206) on the client device (205) and / or in another instance (313) of the input module executed in the other web browser (208) on another client device (207), wherein the partial analysis results include auto-completion, syntactic highlighting and other input aids for input in the instance (311) of the input module and / or the other instance (313) of the input module.
9. The method (100) according to claim 8, wherein, The transmission of the local analysis results is constituted by the web server (203) sending a push message to the client device (205) of the instance (311) of the input module executed in the web browser (206) and / or sending a push message to another instance (313) of the input module executed in the other web browser (208) of the other client device (207).
10. The method (100) according to claim 4, wherein, The analysis module (305) includes a global analysis module (307) for performing global analysis and a local analysis module (309) for performing local analysis.
11. The method (100) according to claim 1, wherein, The transmission step (111) further includes: In the first conversion step (157), the program code in the first programming language is converted into program code in the high-level language; and In the second conversion step (159), the program code in the high-level language is converted into program code in the binary language.
12. The method (100) according to claim 1, wherein, The first programming language is a graphical programming language.
13. The method (100) according to claim 1, wherein, The method further includes: in the debugging step (161), the debugging process of the program code written in the program file (217) is executed by the conversion module (303).
14. The method (100) according to claim 13, wherein, The debugging step (161) also includes: In the debugging and conversion step (163), the program code in the first programming language generated in the first programming language and written in the program file (217) is converted into program code in binary language; In the debug transmission step (165), the binary language program code converted in the debug conversion step (163) is transmitted from the working environment (209) to the controller (201) of the automation system (200). In the debugging execution step (167), program code in binary language is executed by the controller (201) of the automation system (200); and In the debugging information transmission step (169), information about the executed program code is transmitted to an instance (311) of the input module executed in the web browser (206) of the client device (205) and / or another instance (313) of the input module executed in the other web browser (208) of the other client device (207).
15. The method (100) according to claim 13 or 14, wherein, The debugging and conversion step (163) also includes: In the breakpoint setting step (171), at least one breakpoint is set in the program code; and In the debugging execution step (167), program code in binary language is executed by the controller (201) of the automation system (200) until a breakpoint is reached.
16. The method (100) according to claim 1, wherein, The working environment connection step (103) includes: In the working environment generation step (173), a working environment (209) is generated on the web server (203); and In the setup step (175), the conversion module (303) is set up in the working environment (209).
17. The method (100) according to claim 1, wherein, Multiple separate working environments (209) are generated on the web server (203), wherein the conversion module (303) can be executed in each working environment (209), and wherein a separate programming project can be implemented in each working environment (209).
18. The method (100) according to claim 1, wherein, The web server (203) is integrated into the controller (201) of the automation system (200).
19. The method (100) according to claim 1, wherein, The working environment (209) also includes a service module (211), wherein the service module (211) is designed to perform computationally expensive processes of the input module (301) executed in the web browser (206).
20. An automation system (200) having a controller (201) and a web server (203) connected to the controller (201), wherein, The web server (203) is capable of connecting to a client device (205) and another client device (207), wherein a working environment (209) and a web-based development environment (300) are installed on the web server (203), and wherein the automation system (200) is designed to perform the method (100) according to any one of the preceding claims 1 to 19.