INTEGRATED DIAGNOSTIC SYSTEM FOR PLC-BASED REMOTE CONTROL OUTDOOR STATIONS
Patent Information
- Application Number
- DE502022004018
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-09-12
- Publication Date
- 2025-06-12
- Estimated Expiration
- 2042-09-12
AI Technical Summary
Conventional diagnostic functionalities for programmable logic controllers (PLCs) are vendor-dependent, lack flexibility, and often cannot run directly in the real-time system, making them inefficient for cycle-accurate logging across all life phases of the PLC program.
An IEC 61131 framework is provided that allows for the creation of diagnostic functionality using pre-programmed function blocks, enabling the development of diagnostic functionality exclusively in PLC-typical IEC 61131 programming languages. This framework simplifies the creation of diagnostic functionality and allows it to be integrated into any IEC 61131 framework, making it independent of PLC type and manufacturer.
The solution enables the creation of diagnostic functionality that is independent of PLC engineering tools and visualization software, allowing it to run in the same real-time environment as the control program. This results in simplified creation, increased flexibility, and cycle-accurate logging throughout the PLC program's life cycle.
Description
[0001] The invention relates to a technique for providing diagnostic functionality for an application based on a programmable logic controller, preferably for a remote control outstation based on a programmable logic controller.
[0002] A programmable logic controller (PLC) is a device that is used to control or regulate a machine or system and is programmed digitally. Such machines or systems with at least one PLC are referred to as automation systems. A variety of different PLC engineering tools and frameworks are available for programming PLCs.
[0003] The European standard EN 61131, based on the international standard IEC 61131, deals with the fundamentals of programmable logic controllers. The IEC 61131-3 standard (also DIN EN 61131-3) is an international standard for PLC programming languages. Its goal is to standardize the programming of PLC control software. Programming languages should be used manufacturer-independently within a uniform organizational concept (POU - Program Organization Units) with the requirement to declare variables using elementary and derived data types. The EN 61131-3 standard specifies the syntax and semantics of a unified set of programming languages for PLCs.
[0004] The IEC 61131-compliant programming languages offer a high degree of freedom, allowing the engineer to implement the control program according to their ideas and to provide additional functions, such as complex logic.
[0005] Therefore, the control systems of remote terminal units (RTUs) are increasingly being created using IEC 61131-compliant programming languages. An RTU also serves to control or regulate a machine or system and is programmed digitally. Furthermore, RTUs can be designed for long distances from a control station and are more robust against external influences, such as high temperatures and / or humidity. RTUs are typically programmed manufacturer-specifically.
[0006] In addition to the control programs for PLCs or RTUs, it is also known to provide additional diagnostic functionalities in order to log and output errors that occur during the programming of a PLC or RTU, i.e. during the creation of the corresponding control program, or during the operation of the PLC or RTU.
[0007] Diagnostic functionalities in the form of text message systems are now usually integrated into PLC engineering tools or visualizations. Visualizations are, for example, a human-machine interface of the automation system or for visualizing the PLC control process, i.e., a graphical interface for monitoring and / or controlling the PLC, e.g., at a remote control station.
[0008] PLC engineering tools, for example, include logging mechanisms that allow live data recording from the running control program. Visualization engineering includes alarm management systems that define alarm events. When these alarm events occur, text messages are displayed on the corresponding visualization. However, these well-known diagnostic functionalities have several disadvantages.
[0009] To display the text messages, either the PLC engineering tool or the visualization must be called. If the PLC engineering tool or special visualization software must be called, this is a disadvantage, as this software is not installed on every computer system. If the visualization must be called, for example, in the form of a web visualization, this may be a disadvantage, as not every browser supports the required technologies, e.g., Java, etc., and / or not every company's IT security policy allows the activation of the required technologies.
[0010] The document US 2006 / 100797 A1 describes a system for use in controlling a process in an enterprise and for providing a condition diagnosis of a machine in the enterprise.
[0011] Document EP 2 073 083 A1 relates to a method for programming and diagnosing a programmable logic controller (PLC). Such controllers are used in automation to control process sequences in machines and systems or to control individual drives of these systems.
[0012] Furthermore, as part of PLC engineering tools or visualizations, the known diagnostic functionalities are vendor-dependent. Therefore, integration into vendor-independent IEC 61131 code, e.g., as PLCopen XML, is not possible.
[0013] Furthermore, the known diagnostic functionalities are usually only relevant for one life phase of the PLC program, i.e. during creation or during operation, and / or do not run directly in the real-time system, which means that cycle-accurate logging is usually not possible.
[0014] It is therefore an object of the invention to provide an improved technique for providing diagnostic functionality for a PLC-based application, preferably for a PLC-based RTU, which avoids the disadvantages of conventional approaches. The object of the invention is, in particular, to provide such a technique that enables simplified creation of the diagnostic functionality and more flexible use of the created diagnostic functionality.
[0015] These objects are achieved by devices and methods having the features of the independent claims. Advantageous further developments are specified in the dependent claims and the description.
[0016] The term IEC 61131 framework refers to a programming framework that provides the technician with a pre-programmed framework within which they can create application-specific control programs that comply with the IEC 61131-3 standard. In practice and in this document, such a framework is also referred to as a programming framework for creating a controller for a programmable logic controller (PLC) or a remote control unit (RTU) based on a programmable logic controller. Such a framework (programming framework) is and / or includes collections of code snippets, pre-fabricated program frameworks, functions, function blocks, etc., with which a programming task can be solved more quickly. In this case, such an IEC 61131 framework is provided, which is also designed to create diagnostic functionality.
[0017] Such a framework thus represents a programming framework for application development for PLCs in general. Individual functions, elements, and modules are already included or pre-programmed in the framework (programming framework), referred to in this document as function modules. Therefore, they do not need to be reprogrammed repeatedly and can be reused in the development of a wide variety of control programs and diagnostic functionalities. This significantly simplifies the technician's work and improves utility, efficiency, speed, accuracy, and quality, among other things.
[0018] The control program for a PLC can therefore be modularly structured based on the function blocks contained in the framework. Control function blocks that are relevant for controlling the machine via the PLC can be selected by the technician, configured (parameterized) if necessary, and instantiated. The individual instantiated control function blocks can be assigned individual functions for monitoring, controlling, and / or regulating the machine. The PLC is usually connected to the machine via sensors and actuators, for example. The sensors are connected to the PLC inputs and transmit, among other things, the machine's status parameters to the PLC. The sensors can be temperature sensors, level sensors, or position sensors, for example. The actuators, which are each designed to control the movement of one or more machine components, are connected to the PLC outputs and can be controlled using the control program.Actuators are, for example, controllable valves for hydraulics or compressed air, or components for drive controls, such as speed or stepper motor controls.
[0019] Whenever reference is made to diagnostic functionality or diagnostic system in this document, it refers to a text message functionality or text message system in the context of programmable logic controllers (PLCs). Such functionality or such a system provides text messages with additional information (e.g., timestamps) for diagnostic purposes. The content of the text messages is diagnostic information from the running IEC 61131 program.
[0020] The diagnostic functionality is thus used to monitor PLC processes, e.g. data and / or signals that are received by an instantiated control function block from the machine or another instantiated control function block, that are processed or generated by the instantiated control function block, and / or that are sent by the instantiated control function block to the machine or to another instantiated control function block.
[0021] Similar to the PLC control program, the diagnostic functionality can also be created using function blocks of the framework. In the instantiated state, the function blocks can provide configurable and / or configured diagnostic functions (subfunctions), which are referred to as message elements in this document. These diagnostic functions (subfunctions) are preferably each designed (configured) to interact with one or more control function blocks, to read out the aforementioned data and / or signals, and to be able to create corresponding diagnostic information. The diagnostic functionality can provide for filtering out relevant information from the read data and / or signals, e.g. if an error message occurred during data generation by an instantiated control function block.faulty data was generated, or if a received machine status parameter is outside a predetermined range. The read and, if necessary, filtered data and / or signals are processed for subsequent display to a PLC user. Based on this information, the user can determine whether there are any potential internal PLC or machine problems and initiate appropriate countermeasures.
[0022] Using the diagnostic functionality, diagnostic information from the running IEC 61131 program can be output across all life cycle phases of the control program (PLC program) into which it is integrated. During the creation of the control program, the technician can, for example, directly output information from the code running during developer tests. During commissioning of the machine or system, for example, relevant information can be output for the commissioning engineers. During operation of the machine or system, for example, relevant information can be output for maintenance personnel. A fundamental idea of the present invention is to provide a holistic technology in which the diagnostic functionality with all its elements is developed exclusively in PLC-typical IEC 61131 programming languages. Furthermore, the diagnostic functionality can be integrated into any IEC 61131 framework.Accordingly, the diagnostic functionality and the PLC control program can be created using the same engineering process and, preferably, the same engineering tool (engineering framework). Furthermore, the created diagnostic functionality is independent of the type and manufacturer of the PLC or RTU and can run in the same real-time environment as the actual control program for the PLC or RTU.
[0023] According to a first general aspect of the invention, a computer-implemented method for providing diagnostic functionality for an application based on a programmable logic controller (PLC), preferably for a remote control unit (RTU) based on a programmable logic controller, is provided. The PLC or RTU can be used to monitor and control a system or machine and, together with the system or machine, form an automation system.
[0024] The method comprises the step of providing an IEC 61131 framework, hereinafter referred to as the "framework." The framework is designed to create a control program in at least one IEC 61131-compliant programming language for a PLC, preferably for a PLC controlling an RTU. The framework is further designed to provide multiple function blocks by means of which the diagnostic functionality can be created in at least one IEC 61131-3-compliant programming language. As already mentioned above, function blocks represent preprogrammed modules that provide a specific functionality.
[0025] The plurality of function modules comprise a diagnostic server function module for instantiating a diagnostic server for exchanging diagnostic data with a diagnostic client. The plurality of function modules further comprise at least one message function module for instantiating at least one message element, which is configured to write a diagnostic message to a data exchange data structure when the instantiated message element is called. The plurality of function modules further comprise a structure data type for providing a data exchange data structure for exchanging data between the instantiated at least one message element and the instantiated diagnostic server.In its instantiated state, the structure data type thus provides a data structure that, in a predetermined manner, automatically provides and / or enables data communication between the instantiated at least one message element and the instantiated diagnostic server. Instantiation of the function blocks refers to their programming implementation during the creation of the control program and the diagnostic functionality in a real-time runtime environment. This means, for example, that a diagnostic server is generated in the runtime environment from the diagnostic server function block.
[0026] The method according to the invention offers the particular advantage that the diagnostic functionality, with all its elements, is developed exclusively in one or more PLC-typical IEC 61131 programming languages. The diagnostic functionality is created using the same engineering method as the programming of the control program. The diagnostic functionality created in this way is thus independent of the PLC engineering tool used.
[0027] In a preferred embodiment, the framework is designed to create the control program and the diagnostic functionality created (in terms of programming) by the plurality of function blocks exclusively in the at least one IEC 61131-compliant programming language. In other words, the framework is designed to develop the control program and the diagnostic functionality exclusively in PLC-typical IEC 61131-3 programming languages. The framework can thus be designed as a programming framework by means of which and / or by means of which both a control program and the diagnostic functionality for a PLC-based application, preferably for a PLC-based RTU, can be created. The control program and the diagnostic functionality can thus be created using the same engineering method and the same engineering tool. This can reduce the engineering effort.
[0028] In another preferred embodiment, the IEC 61131 framework is configured to automatically create the diagnostic functionality created by the multiple function blocks when creating a control program for the PLC and / or to integrate it into the created control program. This advantageously simplifies the creation of the diagnostic functionality for the technician, as no additional programming and / or configuration is required. The technician therefore does not need to consider the diagnostic functionality when creating the control program.
[0029] According to a further aspect, the diagnostic functionality provided by the multiple function blocks can be (directly) executable in an IEC 61131 real-time runtime environment. The control program created or generated using the framework and the diagnostic functionality can be executed and / or executable together in the same IEC 61131 real-time runtime environment. Accordingly, no separate runtime environment is required for the diagnostic functionality. Furthermore, because the diagnostic functionality concept is directly integrated into the IEC 61131 code and therefore also runs in the PLC real-time runtime environment, the diagnostic functionality is necessarily available throughout all life cycle phases of the control program, namely during creation, commissioning, and operation. Furthermore, time- or cycle-accurate logging and marking of diagnostic messages is possible.
[0030] In a further embodiment, by means of the at least one message functional component, a plurality of message elements are configurable, for each of which it can be specified which diagnostic messages the respective message element generates in the instantiated state when and / or under which condition. An invocation of the instantiated message element, to write a diagnostic message into a data exchange data structure, can (automatically) take place if the specified condition, when and / or under which condition a diagnostic message is generated, is fulfilled. The condition can be specified by a part of the program, e.g. a functional component, of the control program with which the respective message element is coordinated, in particular programmatically. This enables an interaction between the respective message element and the control program.The condition can specify a signal and / or data that occurs in the control program (in particular, that is received, sent, processed, and / or generated by the control program) and is / are to be read by the respective message element. A diagnostic message based on the read signal and / or data can be written to the diagnostic exchange data structure.
[0031] Alternatively or additionally, the plurality of message elements differ from one another in that each message element can detect a different, predetermined diagnostic event and / or the predetermined diagnostic event at a different diagnostic time. A call to the instantiated message element to write a diagnostic message to a data exchange data structure can be made (automatically) when the predetermined diagnostic event and / or the predetermined diagnostic time has occurred. A diagnostic event can be an event of the control program that calls the respective message element. The event can be, for example, a reception, transmission, processing, and / or generation of a signal and / or data that is / are to be read out by the respective message element.
[0032] Advantageously, the framework's at least one message function module can contain various elements preprogrammed to generate diagnostic messages under predetermined conditions or diagnostic events. The message elements can thus be instantiated without additional programming to define the conditions, simplifying the creation of the diagnostic functionality for the technician.
[0033] The multiple message elements can be configured such that a different condition and / or diagnostic event can be specified for or by each message element. Different information (signals and / or data) can be read out by each message element. Alternatively, the same condition and / or diagnostic event can be specified for or by two or more message elements. This redundancy can provide increased security that no relevant information is lost during the generation of the diagnostic data.
[0034] In a further embodiment, the IEC 61131 framework is further configured to provide a plurality of control function blocks for creating the control program for the PLC. Using the at least one message function block, message elements can be configured and assigned to the control function blocks such that a control function block has at least one assigned message element in the instantiated state. The configuration and / or assignment of the message elements can preferably occur automatically. The instantiation of the control function block can trigger (call) the assignment of the at least one message element. The at least one assigned message element is configured, preferably exclusively, to interact with the control function block in the instantiated state.The at least one assigned message element can be directly connected (signal and / or data-wise) to the control function block. In other words, direct communication is provided between the assigned message element and the control function block. The control function block can also be configured to call the at least one assigned message element.
[0035] Advantageously, the diagnostic functionality can be connected to the control program in such a way that the respective message elements are assigned, in particular integrated, into the instantiated control function blocks from which they read signals and / or data to generate the diagnostic messages. This ensures reliable reading of information relevant for diagnostics and reliable generation of the diagnostic messages.
[0036] Furthermore, the diagnostic functionality can advantageously be functional after the respective control function block has been instantiated and at least one message element has been assigned, even if the control program has not yet been fully created. The diagnostic functionality can therefore be available not only during commissioning or operation of the control program, but also during the creation of the control program.
[0037] In a further embodiment, when creating the diagnostic functionality for the PLC-based application, exactly one diagnostic server from the diagnostic server function block, exactly one data exchange data structure from the structure data type and at least one message element, preferably several message elements, from the at least one message function block are instantiated.
[0038] Alternatively or additionally, the diagnostic server and the at least one message element are connected to each other for data exchange by connecting the data exchange data structure as an INOUT variable. This can simplify data communication between the message elements and the diagnostic server.
[0039] In a further embodiment, the diagnostic server is further configured to read the diagnostic message from the data exchange data structure and, based on stored relevance conditions, to evaluate whether the diagnostic message is relevant. If the diagnostic message is relevant, it is configured to send the diagnostic message or a prepared diagnostic message created based on the diagnostic message to the diagnostic client. Advantageously, the data traffic between the diagnostic server and the diagnostic client can be optimized by transmitting only the relevant diagnostic messages to the diagnostic client. This reduces the amount of data transmitted. Furthermore, all processing steps for the diagnostic messages are performed by the diagnostic functionality implemented in the PLC, so that the diagnostic client can be as lean as possible and configured solely to receive and display the transmitted data.
[0040] In a further embodiment, the diagnostic functionality is implemented as a text message system. Preferably, upon detecting the predetermined diagnostic event, the at least one message element writes a diagnostic message as a text message into the data exchange data structure. This provides a simplified transmission of relevant information, e.g., without coding or data conversion steps.
[0041] In one embodiment, the diagnostic server uses a diagnostic channel and / or a communication protocol for data communication for data communication with the diagnostic client, which and / or which is used exclusively for data communication of diagnostic data. Alternatively or additionally, the diagnostic server has a TCP / IP socket for data communication with the diagnostic client. The communication protocol can optionally also be based on the standards of the IEC 60870-5 and -6 series. The communication protocol can thus be an unnamed protocol that is used solely for the present purpose for data exchange between the diagnostic client and the diagnostic server concerning the diagnostic data. Accordingly, the protocol can be optimized for the communication of the diagnostic data. This can reduce the required bandwidth (narrow data channel) and increase efficiency.
[0042] Furthermore, a data model can be used to communicate the diagnostic data, which is exclusively intended for the diagnostic data. The data model appropriately defines how the diagnostic data is mapped for transmission via the communication protocol. The communication protocol can be configured to transmit data exclusively according to this data model. By using a separate data model to map the diagnostic data and / or a separate communication protocol for transmission, the created diagnostic functionality is not only independent of the PLC engineering tool used, but also independent of the visualization used, if available.
[0043] In a further embodiment, the method further comprises providing a diagnostic client configured for data communication with the diagnostic server instantiated from the diagnostic server function block. In a preferred embodiment, the diagnostic client is configured exclusively to carry out data communication with one or more diagnostic servers in order to display diagnostic data received from the server, preferably to display the diagnostic data with a timestamp and further additional information (e.g., information dependent on the PLC cycle). Accordingly, the diagnostic client can be implemented as a standalone client PC application / app for displaying diagnostic data and can be implemented as a lean client. The display can be carried out using the diagnostic client at any time and on any device with the aid of the diagnostic client.Alternatively or additionally, the diagnostic client does not use HTML or JAVA-based technology to display the diagnostic data. Display problems such as those associated with web displays using browsers that do not support the required technology (e.g., Java) and / or do not permit it for security reasons can be avoided accordingly. Furthermore, alternatively or additionally, the diagnostic client is designed to selectively display diagnostic data from multiple PLC-based remote control outstations. The diagnostic client can be a purely software-based client that is implemented on a display device having a screen. Alternatively, the diagnostic client can also be implemented as a device that has a display device with a screen, e.g., a tablet computer or a mobile communications device.
[0044] According to a second general aspect, a data processing apparatus is provided comprising means for carrying out the method as described in this document.
[0045] According to a further general aspect, a remote control outstation is provided which is based on a PLC and comprises a diagnostic functionality, wherein the diagnostic functionality is created by means of the function blocks according to a method as described in this document.
[0046] According to a further general aspect, a data processing system is provided, comprising a data processing device configured to provide the IEC 61131 framework according to a method as described in this document. Alternatively or additionally, the system may comprise a diagnostic server generated by instantiating a diagnostic server function block of an IEC 61131 framework provided according to the method as described in this document. Further alternatively or additionally, the system may comprise a diagnostic client configured for data communication with the diagnostic server.
[0047] According to a further general aspect, a computer program is provided and claimed, comprising instructions which, when executed by a computer, cause the computer to perform the method as described in this document. According to a further general aspect, a computer-readable storage medium is provided, comprising instructions which, when executed by a computer, cause the computer to perform the method as described in this document. According to a further general aspect, a data carrier signal is provided and claimed which transmits the computer program.
[0048] The above-described aspects and features of the invention can be combined with one another as desired. Further details and advantages of the invention are described below with reference to the accompanying drawings. They show: Figure 1: a schematic representation of an IEC 61131 framework and a control program generated therefrom with a diagnostic functionality to illustrate a method according to an embodiment of the invention; Figure 2: a schematic representation of the control program with the diagnostic functionality according to an embodiment of the invention; Figure 3: a schematic representation of the control program with various instances of the control program and integrated diagnostic functionality according to an embodiment of the invention; and Figure 4: a schematic representation of a diagnostic server and the data exchange with the diagnostic client according to an embodiment of the invention.
[0049] Identical or functionally equivalent elements are described in all figures with the same reference numerals and some are not described separately.
[0050] Figure 1shows a schematic representation of an IEC 61131 framework 1 and a control program 8 generated therefrom according to one embodiment. The IEC 61131 framework 1 (hereinafter referred to as framework 1 for short) can also be referred to as a programming framework. The framework 1 represents a programming framework that provides the technician (programmer) with a pre-programmed framework and software-based development tool for creating the control program for a PLC, preferably for a PLC controlling an RTU. Within this framework, the technician can create application-specific programming of the control program for the PLC and the diagnostic functionality that complies with the IEC 61131-3 standard.
[0051] Individual functions, elements and building blocks are already included or pre-programmed in Framework 1, which are referred to as function blocks in this document.
[0052] The control program and the diagnostic functionality are created exclusively in one or more of the IEC 61131 programming languages by instantiating the function blocks and structures contained in Framework 1 and then linking them, which is Figure 1 in relation to the diagnostic functionality.
[0053] The framework 1 is particularly designed to provide a plurality of function blocks 2 by means of which the diagnostic functionality can be created in at least one IEC 61131-compliant programming language.
[0054] The plurality of function blocks 2 comprise a diagnostic server function block 3 for instantiating a diagnostic server 30 for exchanging diagnostic data with a diagnostic client (the diagnostic client is in Figure 1not shown). The diagnostic server function block 3 thus represents a pre-programmed program module that can be used for the diagnostic functionality and can be integrated into the control program 8. A diagnostic server 30 is instantiated from the diagnostic server function block 3 when creating the control program for a PLC in a real-time runtime environment.
[0055] The function blocks 2 further comprise at least one message function block 4 for instantiating at least one message element 4a, which is designed to write a diagnostic message, e.g. as a text message, into a data exchange data structure 5a when the instantiated message element is called.
[0056] When creating the control program 8, corresponding instances 30 and 4a of the diagnostic server function block 3 and the at least one message function block 4 are created simultaneously and preferably automatically by the diagnostic server function block 3 and the at least one message function block 4 in an IEC 61131 real-time runtime environment.
[0057] The function modules 2 further comprise a structure data type 5 for providing a data exchange data structure for data exchange between the instantiated at least one message element 4a and the instantiated diagnostic server 30. When the diagnostic functionality is created, an instance 5a is created from the structure data type 5, which provides the data exchange data structure for the data exchange between the modules of the framework that are used in the diagnostic functionality.
[0058] The linking of the instantiated message elements 4a with each other and with the diagnostic server 30 is carried out via this data exchange data structure 5a for data exchange between the message elements 4a and for data exchange with the diagnostic server 30, which in Figure 2 is shown again enlarged.
[0059] Figure 2 shows a schematic representation of a control program 8, which runs like any conventional PLC control program in an IEC 61131-compliant runtime environment. The diagnostic server 30 and the data exchange data structure 5a are instantiated exactly once when creating the diagnostic functionality for the PLC-based application. Furthermore, several instances of the message element 4a are created, which are instantiated from one or more message function blocks 4.
[0060] Several message elements 4a can be configured using the at least one message function block 4. Preferably, instances 1 to n of the message element 4a are not identical, but rather serve to report different diagnostic events or
[0061] Determine diagnostic events at different diagnostic times. For each of the multiple message elements 4a, it can be specified which diagnostic messages the respective message element generates in the instantiated state, when, and / or under which conditions. Alternatively or additionally, the multiple message elements 4a can differ from one another in that each message element 4a can detect a different, predetermined diagnostic event and / or the predetermined diagnostic event at a different diagnostic time.
[0062] The diagnostic server 30 and the message elements 4a are connected to each other for data exchange by connecting the data exchange data structure 5a. The data exchange data structure 5a can be passed to the diagnostic server 30 and all message elements 4a as an INOUT variable (comparable to a so-called call-by-reference parameter transfer).
[0063] All provided function blocks 2, and thus the diagnostic functionality with all its elements, are developed exclusively in IEC 61131 programming languages. This offers the advantage that a technician who develops both the PLC control system in an IEC 61131 programming language and the associated diagnostic functionality does not require two engineering processes or two engineering tools to create the PLC programs and the visualization programs. The technician, e.g., an IEC 61131-3 programmer developing a PLC program, can also use this knowledge to provide the diagnostic functionality. According to Framework 1, diagnostic functionality can thus be created that is independent of the PLC type and manufacturer, or the diagnostic functionality can be created that is executable regardless of the PLC engineering tool used to create it, as long as the real-time runtime environment is IEC 61131-compliant.
[0064] Furthermore, the control program 8 and the preferably integrated diagnostic functionality for a PLC can now run together in the IEC 61131 real-time runtime system. No separate runtime environment is required. The diagnostic functionality, developed in an IEC 61131 programming language, can be run like a normal PLC program in an IEC 61131-compliant runtime environment.
[0065] The framework 1 can also provide preprogrammed functions, elements, and modules in the form of control function blocks for creating the control program 8. The selected control function blocks are instantiated, providing various programming tasks within the control program 8 to monitor, control, and / or regulate a desired machine or system using the RTU. Using these function blocks, the technician can create the control program 8, which is adapted for monitoring, controlling, and / or regulating the machine or system, with minimal programming effort.
[0066] Like the diagnostic functionality, the control program 8 also consists of different instances 10a-10n, as in Fig. 3is shown. When creating the control program 8 and the simultaneous creation of the diagnostic functionality, message elements 4a can be configured and assigned to the control function blocks using at least one message function block 4, so that the instantiated control function blocks 10a-10n each have the assigned message element(s). The respective message elements 4a are thus assigned to the instantiated control function blocks 10a-10n, from which they read signals and / or data to create the diagnostic messages. This ensures reliable reading of information relevant for diagnostics and reliable generation of the diagnostic messages. Furthermore, this enables integration of the diagnostic functionality into any control program 8 for a PLC.
[0067] Figure 4shows a schematic block diagram of the diagnostic server 30 and illustrates the data exchange of the diagnostic server 30 with the diagnostic client 6 according to one embodiment.
[0068] The diagnostic server 30 is configured to read and prepare the diagnostic message from the data exchange data structure 5a. The diagnostic message is evaluated, for example, based on stored relevance conditions to determine whether the diagnostic message is relevant. If relevance is determined, the diagnostic message or a prepared diagnostic message created based on the diagnostic message is sent to the diagnostic client 6.
[0069] The data exchange between diagnostic server 30 and diagnostic client 6 takes place via TCP / IP communication, with diagnostic server 30 comprising a TCP / IP socket 31. Diagnostic server 30 and diagnostic client 6 are connected via a diagnostic channel 32, which is used exclusively for data communication of diagnostic data, and / or an anonymous communication protocol 7 developed exclusively for the purpose of exchanging diagnostic data.
[0070] The diagnostic client 6 is a lean computer application, e.g., an application of a mobile communications device, which is exclusively configured to perform data communication with the diagnostic server 30 in order to display diagnostic data received from the server, preferably to display the diagnostic data with a timestamp and other additional information. The diagnostic client 6 can also communicate with multiple diagnostic servers or be configured to selectively display diagnostic data from multiple PLC-based RTUs. The diagnostic client can also be implemented as a client PC application / app.
[0071] The communication protocol 7 can be a protocol specifically developed for the communication of diagnostic data between the diagnostic server 30 and the diagnostic client 6, which is accordingly used exclusively for this data communication of diagnostic data. The data transmission of the diagnostic data can be preceded by sending an event request from the diagnostic server 30 to the diagnostic client 6, to which the diagnostic client 6 responds with a (positive or negative) confirmation. Alternatively, the communication protocol 7 can also be request-based, with the diagnostic client 6 first sending a request for the transmission of diagnostic data to the diagnostic server 30.
[0072] Alternatively, different implementations of the framework 1, the communication protocol 7, and the diagnostic client 6 are of course possible, as long as data communication is ensured between the diagnostic server 30 created from the framework 1 and the diagnostic client 6. Therefore, the diagnostic server 30 and the diagnostic client 6 must both use the communication protocol 7 for data exchange via the diagnostic channel 32, and the diagnostic client 6 must be configured accordingly to correctly interpret the received diagnostic data.
[0073] In summary, this provides a holistic technology in which the diagnostic functionality is provided exclusively in PLC-typical IEC 61131 programming languages. Accordingly, the diagnostic functionality and the PLC control program can be created using the same engineering process and the same engineering tool (engineering framework). Accordingly, the created diagnostic functionality is independent of the PLC type and manufacturer and can run in the same real-time environment as the actual PLC control program. List of reference symbols
[0074] 1IEC 61131 framework 2Function blocks 3Diagnostic server function block 3aDiagnostic server 4Message function block 4aMessage element 5Structure data type 5aData exchange data structure 6Diagnostic client 7Communication protocol 8Control program 10a, 10b, 10c, 10nInstances of control function blocks 30Diagnostic server 31TCP / IP socket 32Diagnostic channel
Claims
1. A computer-implemented method for providing a diagnostic functionality for an application based on a programmable logic controller, PLC, comprising the steps: a) creating a control program (8) in at least one IEC-61131-compliant programming language for a programmable logic controller by means of an IEC-61131 framework (1), wherein the IEC-61131 framework (1) provides multiple function blocks (2) by means of which the diagnostic functionality is created in the at least one IEC-61131-compliant programming language, wherein the multiple function blocks (2) comprise: a1) a diagnosis server function block (3) that instantiates a diagnosis server (30) for exchanging diagnostic data with a diagnosis client (6), a2) at least one message function block (4) that instantiates at least one message element (4a) which, upon being called of the instantiated state at least one message element (4a), writes a diagnostic message into a data exchange data structure (5a), and a3) a structured data type (5) that provides the data exchange data structure (5a) for data exchange between the instantiated at least one message element (4a) and the instantiated diagnosis server (30).
2. The method of claim 1, wherein the application comprises a remote terminal unit, RTU, based on the programmable logic controller; and / or wherein the diagnostic functionality for a remote terminal unit, RTU, based on the programmable logic controller is created by means of the function blocks (2); and / or wherein the control program (8) for a programmable logic controller is created to control an RTU.
3. The method of claim 1 or 2, wherein the IEC-61131 framework (1) creates the control program (8) and the diagnostic functionality created by the multiple function blocks (2) exclusively in the at least one IEC-61131-compliant programming language.
4. The method according to any one of claims 1 to 3, wherein the IEC-61131 framework (1) automatically causes the diagnostic functionality created by the multiple function blocks (2) to arise upon creation of a control program (8) for the programmable logic controller and / or integrates it into the created control program (8).
5. The method according to any one of claims 1 to 4, wherein the diagnostic functionality provided by the multiple function blocks (2) runs in an IEC-61131 real-time runtime environment.
6. The method according to any one of claims 1 to 5, wherein by means of the at least one message function block (4), multiple message elements (4a) are configured a) for each of which it is determined which diagnostic messages the respective message element (4a) generates in its instantiated state at which time and / or under which condition; and / or b) wherein the multiple message elements (4a) differ from each other in that each message element (4a) detects a different predetermined diagnostic event and / or detects the predetermined diagnostic event at a different diagnostic time.
7. The method according to any one of claims 1 to 6, wherein the IEC-61131 framework (1) further provides multiple control function blocks for creating the control program for the programmable logic controller, and wherein by means of the at least one message function block (4), message elements (4a) are configured and assigned to the control function blocks such that a control function block (10a, 10b, 10c, 10n), in its instantiated state, has at least one assigned message element (4a).
8. The method according to any one of claims 1 to 7, wherein during creation of the diagnostic functionality for the application based on a programmable logic controller: a) exactly one diagnosis server (30) is instantiated from the diagnosis server function block (3), exactly one data exchange data structure (5a) is instantiated from the structured data type (5), and at least one message element (4a), preferably multiple message elements (4a), is instantiated from the at least one message function block (4); and / or b) the diagnosis server (30) and the at least one message element (4a) are connected to each other for data exchange by connecting the data exchange data structure (5a) as an IN-OUT variable.
9. The method according to any one of claims 1 to 8, wherein the diagnosis server (30) reads the diagnostic message from the data exchange data structure (5a), evaluates whether the diagnostic message is relevant on the basis of stored relevance conditions, and sends the diagnostic message or a processed diagnostic message created on the basis of the diagnostic message to the diagnosis client (6) if the diagnostic message is relevant.
10. The method according to any one of claims 1 to 9, wherein the diagnostic functionality is implemented as a text message system, preferably wherein the at least one message element (4a), upon detecting the predetermined diagnostic event, writes a diagnostic message as a text message into the data exchange data structure (5a).
11. The method according to any one of claims 1 to 10, wherein a) the diagnosis server (30) uses a diagnosis channel (32) and / or a communication protocol (7) for data communication with the diagnosis client (6), which is used exclusively for data communication of diagnostic data; and / or b) the diagnosis server (30) has a TCP / IP socket (31) for data communication with the diagnosis client (6).
12. The method according to any one of claims 1 to 11, further comprising: providing a diagnosis client (6) that communicates data with the diagnosis server (30) instantiated from the diagnosis server function block (3), wherein the diagnosis client (6) a) exclusively performs data communication with one or more diagnosis servers (30) in order to display diagnostic data received from the server, preferably to display the diagnostic data with timestamps and additional information; b) does not use HTML or JAVA-based technology for displaying the diagnostic data; and / or c) optionally displays diagnostic data from multiple remote terminal units, RTU, based on a programmable logic controller.
13. A device for data processing, comprising means for executing the method according to any one of claims 1 to 12.
14. A system for data processing, comprising: a) a device for data processing, configured to provide the IEC-61131 framework (1) according to a method according to any one of claims 1 to 12; b) a diagnosis server (30) that is generated by instantiation of a diagnosis server function block (3) of the IEC-61131 framework (1) provided according to a method of claims 1 to 12; and c) a diagnosis client (6) configured to communicate data with the diagnosis server (30).
15. A computer program, comprising instructions which, when the program is executed by a computer, cause the computer to carry out the method according to any one of claims 1 to 12.
16. A computer-readable storage medium, comprising instructions which, when executed by a computer, cause the computer to perform the method according to any one of claims 1 to 12.
17. A data carrier signal that transmits the computer program of claim 15.