Computer-implemented method, device, computer program and use of the method for providing graphical program instructions verified for functionality
The method addresses the lack of semantic correctness in PLC auto-completion by using machine learning to suggest functionally verified program instructions, reducing errors and optimizing runtime performance in complex industrial domains.
Patent Information
- Application Number
- DE102020102862
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-02-05
- Publication Date
- 2025-08-07
- Estimated Expiration
- 2040-02-05
AI Technical Summary
Existing integrated development environments for programmable logic controllers (PLCs) lack semantic correctness in auto-completion, often suggesting syntactically incorrect program instructions and failing to verify functionality, particularly in complex industrial domains.
A computer-implemented method using machine learning to evaluate and provide functionality-verified graphical program instructions for PLCs, detecting and analyzing existing instructions to suggest functionally correct and optimized program instructions based on previous project experiences, utilizing machine learning methods like decision trees or neural networks to ensure semantic correctness.
Reduces programming errors and enhances efficiency by providing functionally verified program instructions, optimizing runtime performance and ensuring semantic correctness in complex industrial domains.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[0001] The invention relates to a computer-implemented method for providing functionality-verified graphical program instructions for a programmable logic controller used within a specific industrial domain in an automation system. Furthermore, the invention relates to a corresponding device.
[0002] To create program instructions for a programmable logic controller (PLC) to control specific industrial domains, PLC manufacturers provide various tools and libraries with pre-written program instructions via an integrated development environment (IDE). Using these tools and libraries, a programmer can program instructions to control the corresponding industrial domain. The programmed program instructions are translated into native machine code by a compiler integrated into the integrated development environment for download to the programmable logic controller. Furthermore, the integrated development environment can provide the user with additional functions that enable programming, monitoring, and / or debugging of program instructions.
[0003] In state-of-the-art integrated development environments, for example, a programmer can be supported during programming by displaying suggestions for completing the entered program instructions after they have begun entering program instructions. So-called auto-completion of program instructions is provided, for example, in the integrated development environment "Microsoft Visual Studio" from Microsoft™ using the "IntelliSense" functionality or in the integrated development environment "Eclipse." For this purpose, the current program instructions and any program libraries integrated into the programming project are syntactically analyzed. This occurs particularly while the program instructions are being entered.A programmer can be presented with a list of suggestions, automatically and / or by pressing a key combination, as to how the entered program instruction should be completed, or how the program instruction could be intended to be completed.
[0004] In Fig. 2 shows a programming example and an auto-completion function using the integrated development environment “Eclipse”. In the programming example of the Fig. 2, a programmer has declared a variable "text" of type "Text". For variables of type "Text", various functions are available, for example, via an integrated library, which can be called. The programmer can call the variable automatically, or, as in the example of Fig. As shown in Figure 2, auto-completion can be displayed by pressing the spacebar. The programmer is presented with suggestions along with a corresponding percentage probability, indicating how frequently this suggested addition has already been used in this programming project. This estimates the probability with which the programmer would like to use a method call.
[0005] In the auto-completion methods known in the state of the art, some of the suggestions provided are syntactically incorrect. Furthermore, semantic correctness cannot be verified; on the contrary, incoherent additions are presented. This problem arises particularly in the integrated development environments mentioned above. In particular, the auto-completion of the known integrated development environments allows calling private methods belonging to classes outside of the class. However, this is not permitted according to the programming guidelines. Furthermore, this auto-completion is designed serially and only offers text-based additions.
[0006] Furthermore, US 2015 / 0205289 A1 shows a device for automatically modeling the cutting process for a waterjet cutting system based on empirical data to predict aspects of the effect of the waterjet on the workpiece.
[0007] The use of crowd-based search systems is also known in the prior art. US 2018 / 0129724 A1, for example, describes such a system. Exemplary embodiments relate to a user interface for receiving and displaying data objects to facilitate human-assisted searches, particularly on the internet.
[0008] DE 10 2017 009 807 A1 relates to a device for distributing programs to different numerical control devices of a machine tool.
[0009] In development environments for programmable logic controllers, such as CodeSys, programming for process and factory automation is done in function blocks (FBD - function plan) or in the signal flow chart (CFC - Continuous Function Chart), which are defined in the IEC61131 standard. Using the signal flow chart as a graphical programming language, function blocks (graphical program instructions) can be interconnected instead of entering a sequence of textual commands in a command line, as is the case with classic programming languages (e.g. Java, C). Circuit diagrams from hardware development can be seen as a model for this. This representation of a program for a programmable logic controller supports the development of control software, particularly for developers whose technical background is in electrical engineering.In this respect, the signal flow chart can be viewed as an extension of the function block language, in which strict line-by-line processing from top left to bottom right is not enforced (serial processing), but in which the function blocks can be freely positioned (parallel processing and programming), thus giving the programmer more options for linking inputs and outputs. The order of processing of the programmed blocks, or the program, is determined by numbering, for example, in an operation block (OB), which is processed first in a program by the programmable logic controller.Support for auto-completion is limited to hard-coded configuration and commissioning wizards that query certain parameters in a sequence of input masks and generate a project or program structure from them, which must then be filled in by a programmer.
[0010] There is therefore a need for a mechanism for providing graphical program instructions verified for functionality for a programmable logic controller. Based on the prior art described and the resulting need, the present invention aims to provide a solution that at least partially overcomes the disadvantages known in the prior art.
[0011] This object is achieved by the accompanying independent patent claims, in particular by a computer-implemented method and by a device.
[0012] According to a first aspect, the invention relates to a computer-implemented method according to claim 1. The method can be used to provide functionality-verified second graphical program instructions for a programmable logic controller used in an automation system within a specific industrial domain. The computer-implemented method comprises the following method steps: - detecting at least one first graphical program instruction for at least one programmable logic controller of the automation system; and - Evaluating the detected at least one first graphical program instruction using at least one machine learning method stored in a memory unit to determine, for the detected at least one first graphical program instruction, those second graphical program instruction(s) whose functionality corresponds to and / or complements that of the detected at least one first graphical program instruction as verified for functionality. Multiple second graphical program instructions can also be determined.
[0013] This provides a second graphical program instruction for a programmable logic controller of an automation system within a specific industrial domain. In particular, providing a second graphical program instruction with suggestions verified as correct can reduce the error rate during programming and facilitate the corresponding debugging of the program instructions to locate an error. This has the advantage that the programmer is alerted to errors or deviations from a standard or reference program instructions that have already been or are being successfully used in other projects for the specific industrial domain while programming the program instructions, and can, if necessary, adapt their "previous" first program instructions.
[0014] Another advantage is that the specific, functionality-verified second graphical program instructions provided to the programmer are runtime-optimized based on the ongoing experience gained through the machine learning process. Furthermore, the individual runtime improvements for each proposed second graphical program instruction can be displayed on a user interface of an integrated development environment, allowing a programmer to directly and optimally identify the corresponding benefits for their program and for use on the programmable logic controller. The integrated development environment can be executed as application software on an electronic device, such as a computer or handheld device.
[0015] Advantageously, the present invention proposes second graphical program instructions that are functionally related to the first detected graphical program instructions. In this regard, the programmer receives suggestions in the form of the second graphical program instruction that supplement or continue the function of the first detected graphical program instruction, so that the programmer is supported during programming in such a way that a functionally optimized program for a specific industrial domain is provided for loading onto a programmable logic controller. For this purpose, the system proposes, in particular, the most probable second function blocks based on knowledge of previously analyzed projects. This can also include an extension of the functionality of the first instruction. Thus, semantic automatic support is offered during program generation.In the exact sense, semantic correctness cannot be guaranteed because the algorithm does not “know” what the programmer intends.
[0016] The graphical program instructions can be a function block. The function blocks can be arranged in any order to form a program instruction block. A program instruction block is an arrangement of a large number of function blocks. In particular, program instruction blocks can comprise a large number of function blocks that are arranged parallel to one another and can therefore be processed in parallel. A software project can comprise a number of program instruction blocks. A function block can be taken from an existing library or generated manually. The task of a function block is to encapsulate the data and the algorithms. The algorithm defines how the data, for example the input data to the output data, is processed. A function block therefore comprises at least one input and at least one output.The result at the output is derived from the input value connected to the input and from the algorithm defined in the function block. A function block can be defined once and saved in a library so that it can be used for further programming applications. The graphical program instructions can also describe a large number of function blocks or an arrangement of a large number of function blocks. The arrangement of function blocks can be defined, for example, via connections between the inputs and outputs of the function blocks. The arrangement of the function blocks results in a coherent function. The inputs are designed in such a way that, for example, a bit signal, a byte signal, a word signal, or a character string signal can be received. The example list does not represent a restriction. The inputs can be designed for other signals.The outputs can provide signals in a similar way to the inputs.
[0017] For further details on the program instructions, please refer to the IEC 61131 standard, which defines the syntax and semantics of programming languages for programmable logic controllers.
[0018] The individual function blocks can be arranged in a cascade and / or in parallel. These connections can provide a complex function for controlling or activating the programmable logic controller in a specific industrial domain. Advantageously, the present invention allows the individual connections to the respective parallel function blocks and / or to the subsequent function blocks in the cascade to be proposed according to the function of a previous function block. Furthermore, based on the function of one function block, a subsequent function block in the cascade with additional functionality can be proposed.
[0019] "Supplementary" in this context means: Function modules complement each other through their specific linkage to program structures that process a higher-level, more complex task. The addition is preferably domain-specific. The invention can, in particular, propose additions that have been frequently generated in previous projects. Advantageously, these additions can thus be made available to the customer without costly access to a library.
[0020] A function of a function block is specified by the algorithm defined in the function block. The function can comprise a logical operation, in particular a single bit operation of the inputs to generate an output signal at the output, for example an AND operation, in which both input signals must have a logical value of "1" in order to generate a logical output value of "1" at the output. Other functions include OR operations, XOR operations, memory functions, edge operations, comparison operations, conversion and counting operations, load and transfer functions, calling and processing of data blocks, and jump functions. Other functions are mathematical functions for fixed-point numbers and / or mathematical functions for floating-point numbers.
[0021] The individual function blocks are represented as graphical symbols in the integrated development environment, and the inputs and outputs can be connected to other function blocks via graphical connections selected using editing tools. The arrangement of the connected function blocks is translated into native machine code using an integrated compiler for download to the programmable logic controller.
[0022] An automation system can be used for different industrial domains, for example, in an automotive domain or in a measurement technology or biolaboratory domain. An industrial domain is designed and / or adapted according to its use and / or requirements. Each domain can have corresponding differences in the technical components used and to be controlled. In this regard, the program instructions and / or arrangements of program instructions used in the respective domains, or the resulting functionality for controlling a programmable logic controller, also differ. A specific learning method is provided for each industrial domain. The respective learning method comprises the program instructions used in the respective domain and the resulting functionality.
[0023] An automation system is a system in which complex and / or simple machines and / or technical components and systems perform activities such as transportation, manufacturing, and / or measurement tasks automatically and according to predefined instructions, without human intervention. This involves signal acquisition via sensors and the control of actuators. An industrial domain can, for example, be a product-producing domain.
[0024] According to a preferred embodiment of the invention, the computer-implemented method comprises the step of automatically detecting the respective specific industrial domain based on the detected at least one first program instruction. This advantageously allows for restricting the domain and the programs and functionalities used in the domain, enabling a more efficient and correct provision of verified second graphical program instructions for the detected specific domain. Furthermore, graphical program instructions can be provided whose functionality is designed for the specific domain.
[0025] According to a preferred embodiment of the invention, the respective specific domain is detected by means of a domain specification (manually) entered via a user interface. The user interface for receiving the specific domain can comprise a keyboard, computer mouse, microphone, or a touch display of a handheld device, such as a smartphone or tablet. By entering the specific domain, the programs and functionalities used in the domain can advantageously be restricted, which enables a more efficient and correct provision of verified second graphical program instructions for the detected specific domain. Furthermore, graphical program instructions can be provided whose functionality is designed for the specific domain.By entering the specific domain, false recognition and / or misinterpretation with regard to the specific domain can be avoided or at least limited.
[0026] Machine learning is designed to generate new knowledge from previously acquired experience. The machine learning process learns from the previously acquired experience in order to generalize it after a learning phase has ended. To this end, machine learning algorithms build a model, for example, a statistical model, based on the accumulated experience regarding the interconnection of program instructions. This allows patterns and regularities in the data to be recognized and used to calculate suggestions for the functionally appropriate second program instructions.
[0027] According to one embodiment of the invention, the machine learning method is trained via a correlation of at least one device tree with graphical program instructions of the set of program instruction blocks.
[0028] In this context, a program can be viewed as a graph with nodes and edges. The instructions are assembled into a sequence to form function blocks, which connect the function blocks. Instructions and function blocks are represented by the nodes in the graph, and the connections between the instructions are represented by the edges. An edge "class" contains the information about which port (input / output / parameter) of block A is connected to which port of block B. For example, "PLCOpen" provides an open platform in the field of industrial control technology and control programming and offers an open standard for the exchange of PLC programs. PLCOpenXML is a representation of this graph in XML. An algorithm reads this description (e.g.in PLCOpenXML or in another proprietary format) and ultimately "counts" how often a certain edge class occurs between building block A and building block B. This connection frequency can also be extended to a sequence of multiple blocks. 'A is connected to B via edge k'. All programs are analyzed to determine how often an output of construct AB is additionally connected to building block C. This analysis across all programs results in a probability for each edge class. From this analysis, a model can be generated that can be provided to the customer and used and executed by them. During model execution, these probabilities are used for the algorithmic or computer-implemented calculation of suggestions. This embodiment of the invention has the technical advantage that the calculation of the suggestions is based on a computer-technically simple, purely statistical problem solution.In this case, no neural network needs to be trained. In further training, a weighting can also be calculated and taken into account. This represents the frequency of a connection across all analyzed projects. The weighting is thus domain-specific but cross-project.
[0029] The device tree represents the field devices of the automation system and their functional control / interconnection. Within a specific industrial domain, the program of an automation system can contain, in addition to the actual program code, the corresponding fieldbus configuration, the tree structure of the technical components used in the automation system, and / or the parameters for the technical components. This advantageously allows the domain-specific program sections, the automation hierarchies used, and the configuration of the technical components to be identified. The technical components include all devices intended for signal acquisition or as actuators for the automatic process in the automation system.The machine learning process allows patterns in the use of technical components to be identified and analyzed with reference to the structures in the program instructions and parameters. For example, device trees can be analyzed and correlated with functions resulting from the program instructions. This allows for automatic provision of suggestions for fieldbus and component configuration, links between the program logic, and the technical components and predefined library blocks.
[0030] According to one embodiment of the invention, the storage unit comprises a server or a server network, e.g., configured as a cloud. The server may be configured as a computer, personal computer, or as a workstation in a computer network and may include a processing unit (processor or processors), a system memory, and a system bus coupling various system components, including the system memory, to the processing unit. The system bus may be one of several types of bus structures, including a memory bus or memory controller, a peripheral bus, and a local bus, using any of a variety of bus architectures. The system memory may include read-only memory (ROM) and / or random access memory (RAM).A basic input / output system (BIOS), which contains fundamental routines that help transfer information between elements within the computer (server), e.g., during startup, may be stored in ROM. The system bus may be one of several types of bus structures, including a memory bus or memory controller, a peripheral bus, and a local bus, using any variety of bus architectures. The computer may also include a hard disk drive for reading from and writing to a hard disk. The hard disk drive may be coupled to the system bus via a hard disk interface. The drives and associated storage media provide non-volatile storage of machine-readable instructions, data structures, program modules, and other data for the computer. In particular, non-volatile storage allows the machine learning process to be stored in a retrievable and usable manner.
[0031] The server network can comprise a plurality of computers operated via a communications network. The remote computer can be another personal computer, a server, a router, a network PC, a peer device, or another shared network node. The communications network can comprise a local area network (LAN), a wide area network (WAN), an intranet, and the internet. The machine learning method can be provided via the server network, embodied as a cloud. This allows, for example, users of the automation system to access a machine learning method provided by the manufacturer externally (outside the infrastructure of the automation system manufacturer) via the internet, for example, and use this method to develop, supplement, and / or optimize their own graphical program instructions.New and / or further developed graphical programming instructions from users can also be provided via the cloud.
[0032] According to one embodiment of the invention, the machine learning method can comprise a trained neural network. The trained neural network is trained using a set of program instruction blocks with pre-existing graphical program instructions for different applications of the automation system within the specific industrial domain. A neural network is a network consisting of interconnected artificial neurons. The architecture and topology of the neural network depend on the intended task. Messages are exchanged between the respective nodes via the network. The connections have numerical weights that can be adjusted based on experience, thus making the neural network adaptable to the inputs and capable of learning.The neural network can be trained by developing new connections between neurons, deleting existing connections between neurons, changing the weighting from neuron to neuron, adding or deleting neurons, and possibly adjusting the thresholds of the neurons. The neural network is trained using a set of program instruction blocks with existing graphical program instructions. The machine learning process identifies frequently recurring patterns in the program instruction blocks. Furthermore, the structures of the program instructions and associated parameters can be identified. Furthermore, the setting parameters for elements from used manufacturer libraries, such as alarm thresholds, control parameters, etc., can be analyzed and trained.The machine learning method can be trained for various automation projects from different specific industrial domains, for example, in the cloud. This advantageously allows for the provision of second graphical program instructions that functionally correspond to the first graphical program instructions and are checked for correctness. This advantageously allows for a semantic verification of the program instructions in the context of the respective industrial domain, rather than merely a syntactical one.
[0033] According to one embodiment of the invention, the machine learning method is designed as a decision tree and comprises such a decision tree. The decision tree represents an ordered and / or directed tree, via which decisions can be provided in a graphical, hierarchical manner. A classification of the data or rules can be automatically derived via the decision tree. Using an integrated programming environment, existing software projects with graphical program instructions can be exported into an XML (Extensible Markup Language) description. The XML description includes a description of the various function blocks with their inputs and outputs and a wiring description in which the individual connections between the function blocks are described. The XML description can, for example, be analyzed using a specific parser to construct a decision tree.The parser can analyze which connections exist between which functional blocks and assign corresponding weights to the respective connections, the so-called edges of the decision tree. A structured decision tree can be created based on the weight of the edges. Advantageously, based on the analysis of the decision tree and, in particular, the weight of the edges, graphical program instructions used in saved files of existing software projects can be identified and their implementation or arrangement suggested for use in the current control output.
[0034] According to the invention, the evaluation comprises filtering the detected at least one first graphical program instruction based on preconfigured filter criteria, which include the analysis of usage patterns. In this process, the graphical program instructions are analyzed in existing software projects for their deployment and the associated use. In particular, specific patterns are sought in which a repeated use of a graphical program instruction with reference to another graphical program instruction occurs. This includes identical connections between the inputs and outputs of the respective graphical program instructions. Thus, an already used and functioning arrangement of graphical program instructions can be advantageously identified and efficiently provided.
[0035] According to the invention, filtering is carried out based on preconfigured filter criteria. In further embodiments, this is made possible by analyzing functional patterns. Here, the graphical program instructions in existing software projects are analyzed for their functional relationship. In particular, it is analyzed which function the respective graphical program instructions perform and which function can result from their combination. The individual program instruction can then be suggested for replacing the arrangement of program instructions, for example, to make an executable program more efficient and faster to execute. Preferably, "pairs" of program instructions are automatically found that are functionally "interconnectable" (extensions) or correspond to one another (alternative replacement).
[0036] According to one embodiment of the invention, program instructions are filtered based on preconfigured filter criteria by analyzing graphical program instruction structures. In this process, the graphical program instructions in existing software projects are analyzed for their structural relationships. In particular, the type, order, and / or number of relationships between certain graphical program instructions are analyzed. In particular, the connections between the inputs and outputs of the graphical program instructions are analyzed, which makes it possible to determine which graphical program instruction follows another program instruction.
[0037] According to one embodiment of the invention, program instructions are filtered based on preconfigured filter criteria by analyzing program instruction parameters. In this process, the graphical program instructions in existing software projects are analyzed for specific program instruction parameters. Various program instruction parameters used in specific graphical program instructions can be identified. These program instruction parameters offer the possibility of a reference, as they can be used to determine where corresponding graphical program instructions are used and, possibly, in which combination and with which other graphical program instructions they are used.
[0038] In a further embodiment, a reference can be stored in the graphical program instructions, which includes a path to further graphical program instructions that meet the same filter criteria. This allows for a link between the individual graphical program instructions, which enables more efficient machine learning and provision of second graphical program instructions.
[0039] According to one embodiment of the invention, program instructions are filtered based on preconfigured filter criteria by analyzing program rules. Program rules are understood to be rules for the structure of graphical program instructions, in particular arrangements with a large number of graphical program instructions. The program rules advantageously provide a basis for creating graphical program instructions required by a programmer. This allows individual program instructions to be executed in a structured and easily readable manner. Furthermore, critical constructs and combinations of graphical program instructions are prevented, which would render the native machine code inefficient and too slow to execute on the programmable logic controller and / or require too much memory space.In addition, the program rules can be updated, allowing new combinations of program instructions.
[0040] According to one embodiment of the invention, the evaluation takes place dynamically during runtime. Advantageously, the computer-implemented method according to the present invention can be installed, for example, as a plug-in into an existing integrated development environment for developing graphical program instructions, whereby the integrated development environment automatically analyzes the current graphical program instructions in the background. This analysis can take place cyclically or be started by a detected new input of a graphical program instruction. For this purpose, a watchdog can be used to monitor the input means for entering graphical program instructions. In an alternative embodiment, the device according to the present invention can be integrated into the computer that executes the integrated development environment.The integrated development environment represents a program application executed on an electronic device with a user interface for interaction. The user interface is designed to receive programming inputs and display information. According to one embodiment of the invention, the evaluation is performed by receiving an interaction signal. Advantageously, the evaluation of the detected at least one first graphical program instruction only occurs when an interaction signal has been provided by a programmer via the integrated development environment or by a downstream system / program.
[0041] The advantage of the invention lies in the fact that implicit knowledge from previous projects can be (re)used without having to manually extract, process, and implement this knowledge in company- or domain-specific libraries. Programmers often adopt program structures from old projects using "copy and paste." This is a highly error-prone form of reuse, as too much or too little is often copied. According to the solution proposed here, only suggestions are made from which the programmer can then choose, and the program is then rebuilt.
[0042] According to one embodiment of the invention, the determined verified second program instructions are output in an integrated development environment. Advantageously, the functionally verified second program instructions are displayed directly in the integrated development environment, so that a programmer is instructed as to which graphical program instruction should be used or which graphical program instruction can be assigned to an arrangement with a plurality of graphical program instructions. This output allows a corresponding program for the programmable logic controller of an automation system to be created efficiently and error-free.
[0043] According to one embodiment of the invention, at least one of the detected first graphical program instructions is automatically replaced by at least one of the specific second graphical program instructions, verified for functionality, in a signal flow chart or function plan displayed in the integrated development environment for creating program instructions and / or a program instruction block. Advantageously, the detected first graphical program instructions can thus be replaced with efficient and error-free program instructions, enabling error-free compilation and avoiding time-consuming troubleshooting with a debugger in the event of errors.
[0044] According to an alternative embodiment of the invention, after detecting a confirmation signal, at least one of the detected first graphical program instructions is expanded by at least one of the specific second graphical program instructions verified for functionality in a signal flow diagram and / or function plan displayed in the integrated development environment to create a program instruction and / or a program instruction block. Furthermore, the functionality of the first graphical program instruction can be proactively expanded by the second program instruction verified for functionality, thereby assisting the programmer in creating the program for the automation system.
[0045] According to a second aspect, the invention relates to a device according to claim 13. In one embodiment, the device can be used to provide functionality-verified second graphical program instructions for a programmable logic controller used in an automation system within a specific domain. The device comprises: - a detection unit designed to detect at least one first graphical program instruction for at least one programmable logic controller of the automation system; - an evaluation unit with at least one machine learning method stored in a memory unit of the evaluation unit, which is designed to evaluate the detected at least one first graphical program instruction in order to determine, for the detected at least one first graphical program instruction, those second graphical program instructions as functionality-verified second graphical program instructions whose functionality corresponds to that of the detected at least one first graphical program instruction and / or supplements it.
[0046] The above-described embodiments of the computer-implemented method according to the invention can also be embodied as a computer program, wherein a computer is caused to carry out the above-described method according to the invention when the computer program is executed on the computer or on a processor of the computer. The computer program can be provided via download or stored in a memory unit of the device with computer-readable program code contained therein in order to cause the device to execute instructions according to the above-described computer-implemented method. The computer program can also be stored on a machine-readable storage medium. An alternative solution to the problem provides a storage medium that is intended for storing the above-described computer-implemented method and is readable by a computer or processor.
[0047] Alternatively, the invention can also be embodied as a computer program product. Implementing the invention as a computer program product has the advantage that existing electronic devices, such as computers or portable devices that allow execution of the integrated development environment for programming graphical program instructions for programmable logic controllers, can easily be used via software updates to provide, as proposed by the invention, second graphical program instructions verified for functionality for a programmable logic controller used in an automation system within a specific industrial domain.
[0048] It is within the scope of the invention that not all steps of the method necessarily have to be performed on one and the same component or the same computer instance; they can also be performed on different computer instances. The sequence of the method steps can also be varied if necessary.
[0049] Furthermore, it is possible for a single section of the computer-implemented method described above to be executed in one saleable unit and the remaining components in another saleable unit—as a distributed system, so to speak. In particular, it is possible to execute the method step of capturing in a first module and the evaluation of the captured at least one first graphical program instruction in a second module.
[0050] A further aspect of the present invention comprises the use of a method according to one of the method claims of the invention in an integrated development environment for providing second graphical program instructions verified for functionality for a programmable logic controller.
[0051] The above embodiments and further developments can be combined with one another as desired, where appropriate. Further possible embodiments, further developments, and implementations of the invention also include combinations of features of the invention not explicitly mentioned above or described below with regard to the exemplary embodiments. In particular, the person skilled in the art will also add individual aspects as improvements or additions to the respective basic form of the present invention.
[0052] In the following detailed description of the figures, non-limiting embodiments with their features and further advantages are discussed with reference to the drawing. Short description of the characters Fig. 1 shows a schematic view according to a preferred embodiment of the device according to the invention, Fig. 2 shows a schematic representation of a textual autocomplete communication of program code known in the prior art, Fig. 3 shows a flow chart according to a preferred embodiment of the method according to the invention, and Fig. 4 shows a schematic representation of the programming workflow according to a preferred embodiment of the method according to the invention. Detailed description of the invention
[0053] In Fig. 1 is a schematic view according to a preferred embodiment of the device 10 according to the invention. Fig. 1, reference numeral 10 denotes the device according to the invention for providing second graphical program instructions C, verified for functionality, for a programmable logic controller 20 used in an automation system 100 within a specific domain. The device 10 comprises a detection unit 11. The detection unit 11 is designed to detect at least one first graphical program instruction A for at least one programmable logic controller 20 of the automation system 100 of the specific domain. The first graphical program instruction A is in the Fig. 1 as a function block with a first input a i1 and a second entrance a i2 and an output a o1The function block defines or implements an algorithm on the basis of which the signals at the first input a i1 and the second entrance a i2 be processed to a result which is passed through the output a o1is provided. The first graphical program instruction A can be selected from a program instruction library using a keyboard, microphone, touch screen, or mouse and displayed in the integrated programming environment or created in the integrated programming environment. The integrated programming environment is an executable application program that can be run on an electronic device, such as a computer or a handheld device. The electronic device can be connected to the programmable logic controller 20 of the automation system 100 of a specific industrial domain via a communications link, such as an RS232, RS458, USB, and / or Ethernet interface.
[0054] The programmable logic controller 20 is used to control or regulate the automation system 100. The programmable logic controller is programmed digitally and receives native machine code via a communication connection, for example, via an RS232, RS458, USB, and / or Ethernet interface. This native machine code is loaded into the memory of the programmable logic controller 20 and converted by the processor(s) into control signals for controlling the automation system 100. For this purpose, the programmable logic controller 20 can be connected to the electronic device that contains and / or executes the integrated development environment.
[0055] The automation system 100 can comprise a plurality of programmable logic controllers 20 and a plurality of technical components. The automation system 100 can be configured as a single control zone or comprise a plurality of control zones. Each of the plurality of programmable logic controllers 20 can provide control signals for controlling a respective zone of the automation system 100. The programmable logic controller 20 can be implemented as a standalone device (module), as a PC plug-in card in a personal computer connected to the automation system 100, and / or as a software emulation (soft PLC).
[0056] The device 10 also comprises an evaluation unit 12 with at least one machine learning method stored in a memory unit 13 of the evaluation unit 12. The machine learning method is designed to evaluate the detected at least one first graphical program instruction A in order to determine, for the detected at least one first graphical program instruction A, those second graphical program instructions C whose functionality corresponds to that of the detected at least one first graphical program instruction A and / or supplements the detected at least one first graphical program instruction A.
[0057] In the Fig. 1, the functionality-verified second graphical program instruction C comprises a first input a i1 , a second entrance a i2 and a third entrance b i2 , as well as a first exit a o1 and a second output b o1 . The Fig. The second graphical program instruction C shown in Figure 1, which has been verified for functionality, corresponds to the first graphical program instruction A, which has been supplemented by a function, evident from the additional input and output.
[0058] The device 10 can be connected to the electronic device via a communication link and can provide the functionality-verified second graphical program instructions C to a programmable logic controller 20 used in an automation system 100 within a specific domain. In an alternative embodiment, the device 10 can be implemented as hardware in the electronic device or implemented as software and executed on a processor of the electronic device.
[0059] The first graphical program instruction A is recorded in the integrated development environment. The integrated programming environment evaluates the recorded first graphical program instruction A upon request or continuously automatically in the background. In an alternative embodiment, the first graphical program instructions A are evaluated via an interaction trigger, for example via an input device of the electronic device. The evaluation is performed by at least one machine learning method stored in a memory unit. The machine learning method can be implemented in the integrated development environment using pre-trained patterns. Additionally or alternatively, the machine learning method can be trained using pre-trained patterns that are stored online on a server or in a server network. Depending on the access to the server network, this can also be implemented as a cloud.The machine learning process can be stored in a database.
[0060] The machine learning method analyzes existing automation projects. The automation project includes executable program instructions or executable control instructions for controlling the automation system 100 via the programmable logic controller 20. The existing automation projects are analyzed for frequently recurring patterns. The recurring patterns include usage patterns and / or functional patterns and / or program instruction structures and / or program instruction parameters and / or program rules. For the analysis, corresponding software projects in the integrated development environment, which should be considered for determining the second graphical program instructions C verified for functionality, can be manually selected, for example, by specifying the storage location of the software projects.The machine learning method can be trained via software projects of the manufacturer of the automation system 100 and / or trained or supplemented via the software projects of the user of the automation system 100. The training can be initiated via the integrated development environment. The machine learning method can be trained locally on the electronic device using the integrated development environment or on a server network in the cloud. This has the advantage that a large number of user software projects can be considered for training, allowing a larger number of efficient and error-minimized second program instructions C to be determined and provided.
[0061] In addition to graphical program instructions, a software project for an automation system 100 also includes fieldbus configurations, trees as a graphical representation of the technical components used and their interconnections, and parameters for the technical components. This allows domain-specific program sections, automation hierarchies, and device configurations to be identified. As a result, not only syntactically and semantically correct suggestions are determined during programming, but also suggestions for fieldbus and component configuration, links between program logic and the technical components, and predefined library blocks.
[0062] In one embodiment, the machine learning method is implemented as a decision tree. For this purpose, the graphical program instructions of the software projects of one or more automation systems can be exported into an XML description. The XML description represents an open format that can be read by various integrated development environments and is thus easily ported. The XML descriptions can be parsed accordingly to establish a statistical clustering of edges and / or nodes in the graph based on probabilities. The decision tree comprises several nodes with edges between the nodes that have a value with a probability of which node follows next.Accordingly, the options available for selection decrease in the ongoing decision tree, so that with a high probability the last node contains the second graphical program instruction C, verified for functionality, which was used for the captured graphical program instruction A in previous software projects.
[0063] In one embodiment, a second graphical program instruction B can be determined for the first graphical program instruction A via the decision tree, which completely replaces the first graphical program instruction A. This can be the case in particular if the first program instruction A comprises several function blocks and a function block has been determined that fulfills the function of the several function blocks. This has the advantage that the program structure and thus the structure of the graphical program instructions becomes clearer and the error rate during programming decreases. In addition, the function block can be managed and maintained more easily. Another advantage is that the function is implemented within a function block, which leads to shortened runtimes for calculating a result of the one function block.
[0064] In a further embodiment, the machine learning method comprises a trained neural network that includes a set of program instruction blocks with pre-existing graphical program instructions for different applications of the automation system within the specific industrial domain. The neural network is designed as a deep neural network and comprises a convolutional neural network and / or a deep feedforward network.
[0065] During the analysis phase, the machine learning process can be trained using software projects from the automation system manufacturer and provided as basic training via the integrated development environment. Furthermore, the machine learning process can be trained or supplemented using software projects from the operator of the automation system. For this purpose, the operator of the automation system can use the already trained integrated development environment and analyze its currently deployed software projects. The operator can make the results of training the machine learning process available to other operators via the cloud without disclosing the program code of its automation projects. This allows company- and domain-specific (HVAC - Heating, Ventilation, Air Conditioning; Process Automation; and Handling) successful models and patterns to be trained.The machine learning process finds patterns regarding device usage, program code structures, and parameters. For example, device trees are analyzed and correlated with functions in graphical program instructions. For elements from manufacturer libraries, setting parameters such as alarm thresholds and control parameters are evaluated.
[0066] In one embodiment, the specific second graphical program instructions C verified for functionality are output in an integrated development environment. The second graphical program instructions C verified for functionality are output in the corresponding context by a trigger signal. The second graphical program instructions C verified for functionality can contain corresponding connections between the inputs a in the CFC / FBD. i1 , a i2 , b i1 and outputs a o1 , b o1individual and / or multiple program instructions A, C (function blocks). In a further embodiment, the specific second graphical program instructions C verified for functionality can include program instruction parameters of the function blocks. In a further recommended embodiment, the specific second graphical program instructions C verified for functionality can include recommended development and conversion units, for example, from / to different measurement systems, such as a metric system, an imperial system, etc., with the corresponding conversion constants.
[0067] In a further embodiment, suggestions for gateways, other frequently used technical components, device parameters according to a selected fieldbus, the module configuration of the programmable logic controller 20, and / or the automation software can be made for the field devices of the automation system 100 defined in the device tree. In one embodiment, the second graphical program instructions C, verified for functionality, can be determined, which include function blocks for interacting with the technical components in the device tree.
[0068] Advantageously, the second graphical program instructions C, verified for functionality, can be displayed as application notes corresponding to the software project and used and provided to optimize the software project. In particular, suggestions can be determined as to how certain structures and / or substructures in the program instructions of the software project can be expanded and / or replaced (improved). Furthermore, the completeness of the parameters selected by the programmer can be verified. Furthermore, it is ensured that the selected parameters do not contradict the (stored) specifications of a best practice.
[0069] In Fig. Figure 3 shows a flowchart according to a preferred embodiment of the method according to the invention. In the illustrated embodiment, the computer-implemented method comprises several steps. In a first step S1, at least one first graphical program instruction A is generated for at least one programmable logic controller 20 of the automation system 100 (cf. Fig. 1) of the specific industrial domain. In a second step S2, the detected at least one first graphical program instruction A is evaluated by at least one machine learning method stored in a memory unit in order to determine, for the detected at least one first graphical program instruction A, those second graphical program instructions C for the programmable logic controller 20 of the automation system 100 within the specific industrial domain whose functionality corresponds to that of the detected at least one first graphical program instruction A and / or supplements the detected at least one first graphical program instruction A.
[0070] The present invention analyzes and evaluates the entire software-technical control system (hereinafter also referred to as the "software project") of the automation system 100, including the technical components, their parameters, and programs. In this regard, during the development of the software for an automation system 100, functional and structural errors in the previously selected graphical program instructions can be identified and corrected, which may result in the program instructions being executed more efficiently and / or error-free. Furthermore, a correlation is established between the technical components of the automation system and the graphical program instructions for the programmable logic controller 20, thus using graphical program instructions specially adapted and programmed for the automation system 100 and its technical components.Another advantage is that support is provided for creating graphical program instructions with special functions for the industrial domain. Furthermore, cross-domain and cross-operator best-practice files can be generated. Another advantage is that knowledge about parameters that are only provided or adjusted during commissioning can be reused in the design phase of a subsequent software project.
[0071] The integrated development environment is typically implemented locally on-site to control and configure the automation system 100. The machine learning method does not necessarily have to be implemented on the same processing unit and can, for example, be hosted on a server to which all operators of automation systems have access. This latter embodiment has the advantage that a model can also be trained across operators. Thus, the learned knowledge can be used within the group of operators – indirectly, so to speak – without an operator having to explicitly make their data or know-how available directly or immediately to other operators.The learned knowledge thus flows into the model and can be used in the future to determine functionally suitable second program instructions, either directly for the same operator or indirectly for external operators (“external” here means those operators whose data have not yet been used to train the model with corresponding functionally suitable program instructions).
[0072] In a preferred embodiment, a distributed database can be maintained with a corresponding database management system, in which the user-specific and domain-specific knowledge is stored for the operator. The distributed data storage system can consist of several physically separate databases that operate independently and appear as a single logical system. The individual logical systems are interconnected via networks. All system components are controlled centrally by a Distributed Database Management System (DDBMS). The DDBMS system ensures data integration and centrally manages the data from the distributed locations as if it were data from a single location. It periodically synchronizes the data on the distributed database, updates and deletes new data, and deletes data that is no longer required.This ensures that each operator only has access to "his" data and not to that of other operators. Nevertheless, the operator can use the machine learning process for his plant control, which has also been trained and / or taught with "external" data (data from other operators) to calculate or output the second graphical program instructions.
[0073] The process for providing functionality-tested program instructions may include two stages or phases: 1. a learning or training phase in which the model is learned or in which machine learning methods are taught. 2. An execution phase in which the learned or trained model is applied and executed, e.g. in an integrated development environment for controlling a specific automation system.
[0074] In Fig. Figure 4 shows a schematic representation of the programming workflow according to a preferred embodiment of the method according to the invention. Fig. 4, reference symbol A denotes the first graphical program instruction. Reference symbol C denotes the second graphical program instruction verified for functionality. The first graphical program instruction A was entered by a programmer and captured in the integrated development environment by the present invention. For the inputs a i1 and a i2 The programmer can specify a value for the first graphical program instruction A. In one embodiment of the present invention, the first graphical program instruction A can be analyzed on request or automatically in the background. For the second input a i2the first graphical program instruction A, it was determined via the machine learning method that, for example, with “53%” probability a parameter value of “2047” at the second input a i2 the first graphical program instruction A should be created. With a probability of "17%", a parameter value of 1023 should be created.
[0075] In a further embodiment, the programmer in the integrated development environment can add a third graphical program instruction B to the first graphical program instruction A. The device according to the present invention recognizes, for example, a functional or structural relationship between the first program instruction A and the third graphical program instruction B. The integrated development environment can, upon request, for example via a key combination, suggest the output a o1the first graphical program instruction A with the first input b i1 the third graphical program instruction B. The programmer can confirm or reject the links between the first graphical program instruction A and the third graphical program instruction B. This is in the Fig. 4 is represented by the reference symbol “?”.
[0076] In a further embodiment, the combination of the first graphical program instruction A and the third graphical program instruction B is analyzed automatically by the integrated development environment on demand or continuously. The machine learning method determines that a functionality-verified second graphical program instruction C comprising a function block can perform the function of the combination of the first graphical program instruction A and the third graphical program instruction C. The programmer can confirm or reject the replacement of the arrangement consisting of the first graphical program instruction A and the third graphical program instruction B. REFERENCE SYMBOL 1 procedure 10 Device 11 Recording unit 12 Evaluation unit 13 Storage unit 20 Programmable Logic Controller 100 automation systems A first graphical program instruction B third graphical program instruction C second graphical program instruction S1, S2 process steps
Claims
[1] Computer-implemented method (1) for providing functionality-verified second graphical program instructions (C) for a programmable logic controller (20) used in an automation system (100) within a specific industrial domain, comprising the steps: - detecting (S1) at least one first graphical program instruction (A) for at least one programmable logic controller (20) of the automation system (100); - Evaluating (S2) the detected at least one first graphical program instruction (A) by at least one machine learning method stored in a memory unit in order to determine, for the detected at least one first graphical program instruction (A), those second graphical program instructions (C) as functionality-verified second graphical program instructions (C) whose functionality corresponds to that of the detected at least one first graphical program instruction (A) and / or supplements it, wherein the evaluation (S2) comprises filtering detected first graphical program instructions (A) based on preconfigured filter criteria by analyzing usage patterns. [2] A computer-implemented method according to claim 1, wherein the method comprises the step of: - Automatic detection of the respective specific industrial domain based on the detected at least one first program instruction and / or on the basis of domain information entered via a user interface. [3] Computer-implemented methods according to one of the preceding claims, wherein the machine learning method comprises a trained neural network which is trained over a set of program instruction blocks with already existing graphical program instructions for different applications of the automation system (100) within the specific industrial domain. [4] Computer-implemented method according to one of the preceding claims, wherein the machine learning method is trained via a correlation of at least one device tree with graphical program instructions of the set of program instruction blocks, wherein the device tree comprises field devices of the automation system (100). [5] Computer-implemented method according to one of the preceding claims, wherein the storage unit comprises a server or a server network designed as a cloud. [6] Computer-implemented method according to one of the preceding claims 3 to 5, wherein the trained artificial neural network is designed as a deep neural network and comprises a convolutional neural network and / or a deep feed forward network. [7] A computer-implemented method according to any one of the preceding claims, wherein the machine learning method comprises a decision tree method. [8] Computer-implemented method according to one of the preceding claims, wherein the evaluation (S2) is carried out by analyzing functional patterns and / or program instruction structures and / or program instruction parameters and / or program rules. [9] Computer-implemented method according to one of the preceding claims, wherein the evaluation (S2) is carried out dynamically during runtime and / or is triggered by receiving an interaction signal. [10] Computer-implemented method according to one of the preceding claims, wherein the determined second program instructions (C) verified for functionality are output in an integrated development environment. [11] Computer-implemented method according to one of the preceding claims, wherein at least one of the detected first graphical program instructions (A) is replaced or supplemented automatically or after detection of a confirmation signal by at least one of the specific second graphical program instructions (C) verified for functionality. [12] Computer-implemented method according to one of the preceding claims, wherein the at least one of the detected first graphical program instructions is replaced or supplemented in a signal flow diagram and / or function plan displayed in the integrated development environment for creating program instructions and / or a program instruction block. [13] Apparatus (10) for providing functionality-verified second graphical program instructions for a programmable logic controller (20) used in an automation system (100) within a specific industrial domain, the apparatus (10) comprising: - a detection unit (11) designed to detect at least one first graphical program instruction (A) for at least one programmable logic controller (20) of the automation system (100); - an evaluation unit (12) with at least one machine learning method stored in a memory unit (13) of the evaluation unit (12), which is designed to evaluate the detected at least one first graphical program instruction (A) in order to determine, for the detected at least one first graphical program instruction (A), those second graphical program instructions (C) as functionality-verified second graphical program instructions (C) whose functionality corresponds to that of the detected at least one first graphical program instruction (A) and / or supplements it, wherein the evaluation (S2) comprises filtering detected first graphical program instructions (A) based on preconfigured filter criteria by analyzing usage patterns. [14] Computer program with program code for carrying out a method (1) according to one of the preceding method claims, when the computer program is executed on an electronic device. [15] Use of a method (1) according to one of the preceding method claims in an integrated development environment for providing second graphical program instructions (C) verified for functionality for a programmable logic controller (20).
Citation Information
Patent Citations
Information processing device
DE102017009807A1
Generating optimized tool paths and machine commands for beam cutting tools
US20150205289A1
Crowd assisted query system
US20180129724A1