COMPUTER PROGRAM FOR EXCHANGING DATA BETWEEN PROGRAM MODULES
Patent Information
- Application Number
- DE502017016455
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2017-11-10
- Publication Date
- 2024-10-17
- Estimated Expiration
- 2037-11-10
AI Technical Summary
Current automation systems face challenges in achieving real-time data exchange between program modules, particularly in industrial environments with time-critical processes, where existing solutions lack flexibility, security, and maintainability, especially as they transition from classic IEC 61131-3 programming to modern high-level languages.
A computer program is designed as part of a firmware for a control device in an automation system, providing a global data space and meta-information configuration, enabling program modules written in different programming languages to access and exchange variables through a connector, which establishes connections and handles data type conversions, allowing for dynamic and real-time data exchange.
This solution enables seamless data exchange between program modules in real-time, supporting the transition from classic to high-level languages, enhancing flexibility, security, and maintainability, while ensuring consistent and efficient data management across different programming domains.
Description
[0001] The present invention is in the field of automation technology and relates to a computer program for exchanging real-time data between program modules.
[0002] Current topics such as Industry 4.0, the Internet of Things, or the VDI's Agenda CPS demonstrate that automated systems in the future will be characterized by a high degree of networking and software. This will involve a shift from traditional IEC 61131-3 programming to modern high-level languages. By 2018, approximately 70% of the code used is expected to be outside the languages defined by the IEC. Existing requirements, such as real-time capability and consistency, will be supplemented by greater flexibility, increased security, and improved maintainability.
[0003] When networking sensors, the real-time capability of the entire system plays a key role. This is particularly important in an industrial environment with time-critical processes. Therefore, it is necessary to improve the real-time capabilities of all system components of an automation system. Future developments will place particular emphasis on storage devices and the program modules that access them, as the volume of data that must be stored and processed will likely increase.
[0004] From GB 2 415 806 A, a dynamic software integration architecture with program modules for integrating distributed components or systems by means of dynamic integration connectors is known, wherein integration rule sets are used which define access and communication rules of an assigned software component, and with a negotiation engine which negotiates with the integration connectors based on the integration rule sets in order to define data and / or control connectivity.
[0005] EP 2 456 124 A1 concerns the engineering of data communication, particularly for sensors in an industrial automation environment, and describes a method for communication between functional modules. CH 709 007 A2 also discloses a service bus for connecting clients to services from service providers in a data processing system.
[0006] It is an object of the present invention to provide a solution to improve data exchange between program modules in real time.
[0007] This object is achieved according to the invention by a computer program according to claim 1. Further embodiments emerge from the subclaims.
[0008] Accordingly, the computer program is designed as part of a firmware of a control device in an automation system and comprises commands that cause the control device to carry out the following steps for data exchange between program modules that can be executed on the control device as part of an overall application for execution on the control device by a real-time operating system: Providing a global data space in which the program modules can store variable values so that other program modules can access them, Configuring the computer program with a description file, wherein the description file has metainformation that describes which variables a program module offers using ports, Storing the metainformation of the description file, wherein the stored metainformation has at least one variable, Providing at least one connector, wherein the connector designates a functionality of the computer program that provides a connection from one of the program modules to another of the program modules, wherein the at least one connector describes how data of the at least one variable is written to and read from a memory, so that a connection can be established between the program modules,so that the at least one variable is interchangeable between one of the program modules and the computer program, and publishing variables provided by one of the program modules for at least a second program module of the program modules, so that the published variables can be accessed by at least the second program module, , further comprising commands that cause the control device to perform the following step: Providing a programming interface that allows a program module to browse metadata.
[0009] In an exemplary method for exchanging real-time data between program modules, provision is made of a data storage device and storage of metainformation in the data storage device, wherein the metainformation comprises at least one variable. Furthermore, the method provides for providing at least one description file and configuring the data storage device with the description file. Furthermore, the method comprises providing at least one connector, wherein a connection can be established between program modules via the data storage device with the connector depending on a query in the description file, and wherein the program modules are created using the same or different programming languages and are executable by a real-time operating system.Furthermore, the method comprises exchanging at least one variable between one of the program modules and the data storage device via the connector.
[0010] The data storage device comprises, in particular, a software component, for example, embodied as part of the firmware of a control device, wherein the control device is embodied, in particular, as a control unit for controlling an automation system. For example, the control device can be used to read sensor data and to control actuators depending on the sensor data, wherein several program modules are executed on the control device for this purpose.
[0011] The data storage device comprises a memory through which program modules can exchange data. A functionality of the data storage device known as a connector provides a connection from one program module to another via the data storage device. The data storage device can offer device-local data for exchange between the program modules via the memory and is equally usable by all processes.
[0012] The meta information is read in, in particular, by the data storage device and can each be assigned to a program module, wherein the meta information can include, in particular, the identification of a variable used in the program module as well as additional information assigned to this variable, such as, for example, a data type.
[0013] The description file defines the configuration of the data storage device. The description file may, for example, include metadata or information about metadata to be read, for example, in the form of a file path. Furthermore, the description file may include information defining connectors to be created.
[0014] The description file is provided, for example, in the form of a text file in a memory of a control device and is read in by the data storage device as part of the firmware of the control device, for example when the control device is put into operation or switched on.
[0015] An entry for creating a connector in the description file can be viewed as a request to create a corresponding connector, i.e., to provide the corresponding functionality in the data storage device. For this purpose, the description file contains, for example, information about which connection or port of one program module should be connected to which connection or port of another program module. The connection or ports of the program modules are provided, for example, via APIs.
[0016] The description file can be viewed as a meta description file with which each connection or port can be specified with its respective data type and data direction.
[0017] The data storage device thus provides, in particular, a memory or a global data space in which program modules can store variables or variable values so that other program modules can access them.
[0018] For this purpose, at least one variable or variable value is exchanged between one of the program modules and the data storage device via the functionality of the data storage device referred to as a connector, i.e. a program module transmits a variable or variable value to the data storage device, which is stored in the memory or global data space, or a program module retrieves a variable or variable value stored in the memory or global data space, wherein the communication takes place via connections of the respective program modules, which are connected by a connector.
[0019] In automation technology, a shift is foreseeable, moving from the use of traditional PLC programming languages to the use of high-level languages. Consequently, the invention enables real-time access to a shared data memory or data storage device, even when using program modules written in different programming languages.
[0020] For example, the IEC 61131 standard currently regulates the syntax and semantics of programming languages for programmable controllers. It proposes a unified suite of programming languages for programmable controllers. This suite includes two text languages (Instruction List and Structured Text) and two graphical languages (Ladder Diagram and Function Block Diagram). Furthermore, the IEC 61131 standard (edition 3.0, 2013-02) defines features intended to simplify communication between program controllers and other components of an automated system.
[0021] However, other programming languages that are being replaced by the current classic programming languages according to IEC 61131 or that are currently being used in parallel with them can also be used according to the invention. For example, program modules can be used that are each programmed in at least one of the programming languages according to the IEC 61131 standard, in Matlab / Simulink, C++, C#, JAVA, or Python. Other programming languages are also possible.
[0022] This means that a single programming language can be used for all program modules. It is also possible to use different programming languages for two or more program modules.
[0023] The program modules are controlled, for example, using a programming interface, particularly an API (application programming interface). The description file can be provided, for example, as an XML file (Extensible Markup Language file).
[0024] The data storage device's programming interface or API enables application developers to browse published variables and their metadata and establish connectors at runtime. In addition to static linking via connectors, dynamic connections can also be established via connectors. This may be necessary for components whose data access changes at runtime, such as an OPC-UA server (OPC-UA = Open Platform Communications Unified Architecture), which can offer browsing of data points at any time. For detailed analysis and troubleshooting, the programming interface or API also offers the option of listing all established connectors.
[0025] The data storage device and its connectors can be configured using a description file or multiple description files, for example, in the form of one or more XML files. These description files allow configuration instead of programming. This allows the function of a system to be changed at runtime without having to recompile the individual application components. The use of description files or an XML-based configuration also allows the user to make adjustments directly to the controller or to use their own external tools and toolchains. The structure of a description file or XML file is specified by clearly defined schema files, which enable quick verification of the configuration.
[0026] In addition to configuring the data storage device, the program modules or programs and their connections or ports can also be defined using description files, particularly XML-based description files. The description files can be understood as meta-description files, with which each connection or port can be specified with its respective data type and data direction. In addition, further attributes can be specified that can be used for dynamic searches in the data storage device. Examples of these are units or company-specific tags. To be able to link variables from different programming domains, it is advantageous to define all data types in a common language. This common language makes it possible to describe programs that use primitive, self-defined, or library-defined data types.This general description language is advantageous for linking structures or individual elements of these structures.
[0027] Specifying the data storage device, connectors, and program metadata in multiple description files or XML configuration files allows an overall application to be divided into functional modules that can be created by different development groups or suppliers. This not only facilitates the development of a complex plant control system, but also the gradual expansion of an existing plant. Thus, the overall application does not have to be available from the outset, but can be composed of submodules. In this context, an overall application refers to all programs or program modules, tasks, and configuration settings required for execution on a control device.
[0028] In this context, the terms "program" and "program module" are used interchangeably.
[0029] The description file contains metadata. Metadata describes variables and programs, e.g., which variable ports a program offers and their data type. Ports are variables that represent inputs or outputs of programs or components and can thus be (directly) interconnected by allocating memory space for them in the data storage device. Metadata describes the entire program, i.e., the sum of all incoming and outgoing connections or ports. Metadata describes the type of variables and their structure, e.g., Bool, Integer, or complex, composite data types. An example of metadata is the Boolean variable "Freigabe" (release). A connector can transmit a variable, for example, from "Freigabe" to another program to the Bit variable "Go."This converts the value of the variable from Boolean to Bit.
[0030] The variable's data can be written to and read from the memory of the data storage device. The method for this is described by a connector. Metadata is required to describe which variables a program offers using ports. For example, program "A" can offer the variable "Enable" with the type "Boolean." This variable is created in the memory of the data storage device, and the value of the variable is written by program "A." Other programs can read this value via a connector that knows where the variable is stored in the memory of the data storage device.
[0031] In an exemplary embodiment, the method further comprises providing variables in the data storage device by a first program module of the program modules, publishing the provided variables by the data storage device for at least a second program module of the program modules, and
[0032] Accessing the variables in the data storage device by at least the second program module.
[0033] In a further embodiment of the method, provision is made of at least one buffer mechanism for storing variables in the meta information in the data storage device.
[0034] Different buffering mechanisms or storage mechanisms can be used, such as a quadruple buffer or a single buffer for single storage. The buffering mechanism can be adapted, for example, for scaling to systems with small RAM.
[0035] According to the invention, in a further embodiment, the method further comprises using a programming interface on a program module, wherein the programming interface enables searching of the meta information in the data storage device.
[0036] Furthermore, the method can advantageously provide for dynamic generation of connectors.
[0037] For example, browsing the metadata allows for dynamic creation of connectors (subscriptions), e.g., via an OPC UA server. Dynamic in this context means that this connection is not configured via a description file but can be created and destroyed at runtime via an API of the data storage device.
[0038] Furthermore, the method advantageously provides that the data storage device is designed to provide at least some of the program modules with meta information in response to the description file in such a way that they can be executed in different processes managed by the real-time operating system.
[0039] In a further embodiment of the method, a conversion of the variables from a first data type to a second data type can be provided by the connector.
[0040] Furthermore, the method may advantageously comprise performing a functional operation with the connector.
[0041] Another option for connectors is the ability to perform functional operations similar to type conversion. For example, a temperature can be converted from Fahrenheit to Celsius without additional programming.
[0042] In a further embodiment of the method, an extension of the data storage device by an additional program module can be provided without a restart of a control system.
[0043] A control system is a sequential control system in which program modules can typically be loaded, started, debugged, stopped, and unloaded. The control system is based on the real-time operating system.
[0044] It is advantageous that the control system can be expanded without having to interrupt the system for a restart. This allows operations to continue uninterrupted.
[0045] Furthermore, the method can advantageously provide for the provision of a replacement value by the connector in the event that no update of a published variable has taken place within a defined time interval.
[0046] To meet the diverse requirements of programs, connectors can have different properties. This allows users to choose between different connectors that focus on real-time capability, data consistency, memory usage, or a combination of these properties, depending on the application's design goals. The connectors can also take on the task of providing fallback values if programs fail to update their published variables within a defined time interval.
[0047] In a further advantageous embodiment, the method comprises configuring the data memory with the description file by defining a connection, a data type for the connection and a data direction of the connection.
[0048] Here, the term "connection" is synonymous with the term "port." The data direction of a connection can be defined as an inport or an outport. The connection between an outport of a publishing program and an inport of a subscribing program is implemented using a connector. The connector provides a variety of functionalities. For example, the connector can be used to perform a possible conversion between different data types from the participating program domains. For example, an INT from an IEC 61131-3 program can be easily converted to an int16 of a C++ program.
[0049] Data from other components, such as data from fieldbus systems, can also be mapped in the data storage device as linkable ports. This allows the user to easily connect IO (Input Output) data with programs from different programming domains. For example, the devices of a fieldbus can be represented in a structured manner as variables and assigned user-defined names.
[0050] An exemplary data storage device for data exchange between program modules of the same or different programming languages in a real-time operating system has a memory for carrying out the method.
[0051] The data storage device is preferably designed as a global data storage device (GDS). Furthermore, the data storage device can be installed as a centrally implemented software component of a controller in an automation system. In this case, the data storage device can provide device-local data for exchange between programs via a memory and can be used equally by all processes.
[0052] In one embodiment of the data storage device, an exchange area is provided in the memory of the data storage device into which data can be written and data can be read, wherein program modules can access the data storage device via interfaces.
[0053] The data storage device and its connectors can support consistent exchange of variables within a task and across task boundaries. The principle of classic IEC 61131-3 program execution is applied to task execution. This ensures that the input data is available to programs in other tasks in a task-consistent manner. Furthermore, metadata or data can be exchanged directly between programs within a task.
[0054] An exemplary device for data exchange between program modules of the same or different programming languages in a real-time operating system has a data storage device, at least one processor and at least one interface to an automation device.
[0055] An exemplary real-time operating system for data exchange between program modules of the same or different programming languages comprises a data storage device, at least one stored description file with which the data storage device can be configured, and a plurality of program modules executable by the real-time operating system, which are created using the same or different programming languages. The data storage device is configured to interconnect the program modules using connectors in order to exchange at least one variable between program modules, wherein the metadata associated with the at least one variable is stored in the data storage device.
[0056] The metadata with the at least one variable can be used by the connectors to establish the connection. Furthermore, one or more description files are used, which can be configured as XML files, for example. If there are multiple description files, these can be combined into a single configuration or overall configuration. This can be done by creating a configuration file that is superordinate to the description files.
[0057] The computer program advantageously comprises program code means for carrying out the described method, wherein the computer program runs on a computer system in a real-time operating system.
[0058] Some embodiments of the invention are shown purely schematically in the drawings and are described in more detail below. It shows: Fig. 1 shows an embodiment of a device for data exchange between program modules in a real-time operating system; Fig. 2 shows an embodiment of linking ports with different data types for controlling a machine; and Fig. 3 shows an embodiment of executing tasks with different program modules in a real-time operating system.
[0059] Fig. 1 shows an embodiment of a device 10 for data exchange between program modules 11, 12, 13 in a real-time operating system. Real-time data is exchanged between the program modules 11, 12, 13 via a data storage device 20. The program modules 11, 12, 13 with the programs CPP_Filter, IEC_Sync, and SIM_CTRL can be connected to one another via connectors for data exchange. An exemplary connector 14, also referred to as an "intelligent connector," is shown schematically as an arrow between the program modules 11 and 12, which can be referred to as an "intelligent connector." The connector 14 provides a connection from the program module 11 to the program module 12 via the data storage device 20.
[0060] Here, Fig. 1 The connection from program module 11 with the CPP_Filter to global memory 20 and then from there to program module 12 with the IEC_Sync program provides a simplified representation of how data is accessed and stored. Connector 20 defines how the data source (CPP_Filter) can write the variables / data and how the data sink (IEC_Sync) can read them. The term "intelligent connector" refers to the fact that, among other things, information about data conversions can also be included.
[0061] In addition to the variable name, additional metadata can be stored in the data storage device 20. This includes, among other things, the time of the last change, access rights, visibility, data type, user-defined attributes, or descriptive text.
[0062] In addition to the basic data types familiar from every programming language, the connectors 14 can also link user-defined data types, such as structures, arrays, or combinations of these two. A link can be applied to the entire data type or parts of it.
[0063] Furthermore, Fig. 1 Further components are shown schematically, which are designed, for example, as software components, such as a fieldbus 15, an OPC-UA server 16, a web server 17 and any other component 18 of an automation system, which each have read and write access to provided data 21-31 in the data storage device 20.
[0064] Furthermore, the data storage device 10 has a processor 32 and an interface 33 to an automation device. In the present example, the data storage device 20 is connected to the processor 32 as well as to the interface 33. The connections can be wired or wireless. Furthermore, in the present embodiment, the interface 33 is connected to a component of the fieldbus 15.
[0065] The data storage device 11 of the Fig. 1 is a global memory for storing data, wherein the data 21-31 are embodied as metadata or metainformation and contain at least one variable. These variables can be published in the data storage device 11 and made available to other program modules 11, 12, 13 or components 15, 16, 17, 18 by subscribing to them and receiving them in real time.
[0066] Each program module 11, 12, 13, regardless of its programming domain, is given the ability to store variables in the data storage device 20 as a global data space through the use of a predefined API. Storing and publishing variables can be done through a static configuration at system startup or dynamically at runtime. The variables are given a unique name by which they can be searched for in the data storage device 20. After publishing, the variable can be subscribed to by other program modules, and their values can thus be used. A published variable is defined as an inport or outport, depending on the read or write data direction.
[0067] Fig. 2 shows an exemplary embodiment for linking ports with different data types for controlling a machine, in particular for controlling a drive train of the machine. Connections 41 to 46 represent connectors, as shown in Fig. 1 The ports that are shown in Fig. 1 are not shown in the other figures. Connector 41 shows a conversion from Boolean to BIT, connector 44 the interconnection of structures and their elements, and connector 46 the interconnection of vector elements including byte swapping, scaling / offset correction, and type conversion. A connection can be applied to the entire data type or parts of it.
[0068] Fig. 3 shows an embodiment for executing tasks 50, 51 with different program modules 11, 12, 13 in a real-time operating system. The program modules 11, 12, 13 receive their data, in particular subscribed variables, from the data storage device 20, as in Fig. 1 presented and described.
[0069] Fig. 3 shows an exemplary structure of tasks 50, 51, or tasks, programs, and connectors, taking into account a sequential control system. The task-consistent data exchange between task 50 as the main cyclic task and task 51 as the control cyclic task, or control task, is implemented by buffer mechanisms 54 of the data storage device 20. Data consistency is independent of the individual tasks 50, 51, or tasks, their priority, and their temporal behavior.
[0070] The first task 50 comprises program modules 11 and 12 with the programs CPP_Filter and IEC_Sync, whereby the programming languages of program modules 11 and 12 differ from each other. Furthermore, the second task 51 comprises program module 13 with the program SIM_CTRL. Program module 13 is also written in a different programming language than the programming languages of program modules 11 and 12. Thus, all of the program modules use a different programming language.
[0071] Fig. 3 shows a schematic diagram of connections between ports. There are incoming and outgoing ports, referred to as inports 52 and outports 53, through which input data and output data are sent, respectively.
[0072] The connectors are the ones in Fig. 3 The arrows inside and outside tasks 50, 51 are shown. The connectors are synchronized via buffer mechanisms 54, such as a quadruple memory, for non-blocking and cycle-consistent data exchange between program modules 11, 12, and 13. The connectors define how the data will later be copied to the destination. An example of a connector is the entire path from the output 53 of task 51 to the input 52 of task 50 via the buffer mechanism 54 of the data storage device 20.
[0073] In Fig. 3 In task 50, there is also a direct connection from program module 11 with CPP_Filter to program module 12 with IEC_Sync, without using a path via the connectors shown below. This connection is not in Fig. 1 shown.
[0074] By providing the data storage device 20 according to the invention as a global data storage or Global Data Space (GDS) and as part of a data storage device 10, a possibility for equivalent communication between programs or program modules 11, 12, 13 of different programming domains is realized. Real-time data exchange is possible between program modules 11, 12, 13 or programs, which may also be written in different programming languages. In this case, the data storage device 20 can assume the function of a data pool that allows the linking of both primitive and complex data types from different programming languages. This requires and fulfills high requirements for data consistency and data exchange performance, particularly in real-time operation.The data storage device 20 enables management of the established data connections between programs and the meta information that enables browsing and dynamic linking to the existing data.
[0075] Overall, the invention enables functionality as part of a new firmware architecture, on the basis of which new industrial controls can be implemented. This architecture is initially designed for use on a device or control unit.
[0076] The aim here is to support the addition of high-level languages to traditional control programming. To achieve this, a smooth transition between IEC 61131-3 and the world of high-level languages is sought. In addition to supporting such languages, this requires seamless integration of the various programming domains. These include Matlab / Simulink, C++, C#, Java, Python, and the languages of IEC 61131-3. To achieve such seamless integration, the controller should be able to transfer the familiar IEC 61131-3 workflow with program instances and tasks to the workflow of the other programming domains. Despite these more complex requirements for the technical implementation, additional aspects of data security, usability, flexibility, and, above all, performance are ensured.
[0077] The following is an example of a possible content of a description file for configuring a data storage device in XML format: <?xml version="1.0" encoding="utf-8"?> <gdsconfigurationdocument> <gdscomponentsettings> <shareddatasettings Size="1000000" / > <sharedmetadatasettings Size="1000000" / > <sharedmetaconfigsettings Size="1000000" / > <metadatapaths> <metadatapath ConfigPath=". / CppCounter.meta.config" / > <metadatapath ConfigPath=". / CppConfig.meta.config" / > <metadatapath ConfigFath=". / PizController.meta.config" / > < / metadatapaths> < / gdscomponentsettings> <taskbufferrelations> <task-bufferrelation Task="TaskConf" BufferType="Single" / > <taskbufferrelation Task="TaskMain" BufferType="Default" / > <taskbufferrelation Task="TaskCount' BufferType=" Quad" / > < / taskbufferrelations> <connections> <connection StartPort="Arp. Demonstrator.CppCounter-1 / CppCounter-1: Counterl6" EndPort="Arp.Fbi.Profinet.Pnc-0 / 3.3:D016" Min="" Max="" Log="True" RangeCheck="false" / > <connection StartPort="Arp.Fbi.Profinet.Pnc-0 / 2.2:FreigabeTaster" EndPort="Arp.Demonstrator.CppConfig-1 / CppConfig-1:FreigabeTaster" Min="" Max="" Log="True" RangeCheck="false" / > <connection StartPort="Arp.Demonstrator.CppConfig-1 / CppConfig-1:Freigabe" EndPort="Arp.Fbi.Profinet.Pnc-0 / 2.2:FreigabeLed" Min="" Max="" Log="True" RangeCheck="false" / > <connection StartPort="Arp.Demonstrator.CppConfig-1 / CppConfig-1:Freigabe" EndPort="Arp. Demonstrator. PizController-I / PizController-1:Freigabe_Regler" Min="" Max="" Log="True" RangeCheck="false" / > <connection StartPort="Arp.Demonstrator.CppConfig-1 / CppConfig-I:theta_soll" EndPort="Arp.Demonstrator.PizController-I / PizController-1:theta_soll" Min="" Max="" Log="True" RangeCheck="false" / > <connection StartPort="Arp.Demonstrator.CppConfig-1 / CppConfig-I:psi_soll" EndPort="Arp. Demonstrator.PizController-I / PizController-1:psi_soll" Min="" Max="" Log="True" RangeCheck="false" / > <connection StartPort="Arp.Demonstrator.PizController-I / PizController-1:U_G_converted" End Port="Arp. Fbi. Profinet. Pnc-0 / 2.2: U_G_converted" Min="" Max="" Log="True" RangeCheck="false" / > <connection StartPort="Arp. Demonstrator.PizController-I / PizController-1:U_N_converted" EndPort="Arp. Fbi. Profinet. Pnc-0 / 2.2: U_N_converted" Min="" Max="" Log="True" RangeCheck="false" / > <connection StartPort="Arp.Fbi.Profinet.Pnc-0 / 1.1:theta" EndPort="Arp.Demonstrator.PizController- I / PizController-1:theta" Min="" Max="" Log="True" RangeCheck="false" / > <connection StartPort="Arp.Fbi.Profinet.Pnc-0 / 1.1:psi" EndPort="Arp.Demonstrator.PizController- I / PizController-1:psi" Min="" Max="" Log="True" RangeCheck="false" / > <connection StartPort="Arp.Fbi. Profinet.Pnc-0 / 1.1:dot_theta" EndPort="Arp.Demonstrator.PizController-I / PizController-1:dot_theta" Min="" Max="" Log="True" RangeCheck="false" / > <connection StartPort="Arp.Fbi.Profinet.Pnc-0 / 1.1:dot psi" EndPort="Arp.Demonstrator.PizController-I / PizController-1:dot_psi" Min="" Max="" Log="True" RangeCheck="false" / > < / connections> < / gdsconfigurationdocument>
[0078] The following is an example of a possible content of a file with meta information about a program module in XML format: <MetaConfigurationDocument xmlns:td="http: / / www.phoenixcontact.com / schema / typedomain" xmlns="http: / / www.phoenixcontact.com / schema / metaconfig" xmlns:xsi="http: / / www.w3.org / 2001 / XMLSchema-instance" xsi:schemaLocation="http: / / www.phoenixcontact.com / schema / metaconfig" schemaVersion="I.3" > < Program name="PizController" version="1.0" typeDomain="com.phoenixcontact.arp.basetypes.cpp"> <descriptions> <description languageld="DE" text="Eine Programmbeschreibung" / > <description languageld="EN" text="A program description" / > < / descriptions> <!-- List of events that can be triggered by this program --> <events> <event name="ExampleEventThrownByAProgram"> <descriptions> <description languageld="EN" text="An example Event that is thrown by this program" / > < / descriptions> < / event> < / events> <ports> <port name="CompPerson" type="Arp.Demonstrator.PizControllerComponent:Person" kind="Output" multiplicity="1"> <descriptions> <description languageld="DE" text="Typ wurde in Komponente definiert" / > < / descriptions> < / port> <port name="FunktionsStatus" type="float" kind="Output" multiplicity="I"> <descriptions> <description languageld="DE" text="Typ wurde in externer Typdomain definiert" / > < / descriptions> < / port> <port name="theta_soll" type="float" kind="lnput" multiplicity="1"> <attributes> <attribute name="Farbe" value="Rot" / > < / attributes> <descriptions> <description languageld="DE" text="Typ gehoert zur typeDomain des Programms. Dazu kommt noch ein Attribut." / > < / descriptions> < / port> <port name="psi_soll" type="float" kind="lnput" multiplicity="1" / > <port name="theta" type="float" kind="lnput" multiplicity="1" / > <port name="psi" type="float" kind="lnput" multiplicity="1" / > <port name="dot_theta" type="float" kind="Input"" multiplicity="I" / > <port name="dot_psi" type="float" kind="lnput" multiplicity="1" / > <port name="Freigabe_Regler" type="bool" kind="Input" multiplicity="1" / > <port name="IAnteil_Aktiv" type="bool" kind="Input" multiplicity="1" / > <port name="U_N" type="float" kind="Output" multiplicity="I" / > <port name="U_G" type="float" kind="Output" multiplicity="I" / > <port name="Sine" type="float" kind="Output" multiplicity="1" / > <port name="U_G_converted" type="intl6" kind="Output" multiplicity="1" / > <port name="U_N_converted" type="intl6" kind="Output" multiplicity="1" / > < / ports>
[0079] In the following, exemplary embodiments of a method, a data storage device, a device, a real-time operating system, and a computer program product are described with reference to the figures.
[0080] An exemplary method for exchanging real-time data between program modules, such as program modules 11, 12, 13, comprises: providing a data storage device 20, storing meta information 21-31 in the data storage device 20, wherein the meta information 21-31 has at least one variable, providing at least one description file, configuring the data storage device 20 with the description file, providing at least one connector 14, wherein the connector 14 can be used to establish a connection between program modules via the data storage device 20 depending on a query in the description file, wherein the program modules are created using the same or different programming languages and are executable by a real-time operating system, and exchanging at least one variable between one of the program modules and the data storage device 20 via the connector 14.
[0081] Another exemplary method for exchanging real-time data between program modules 11, 12, 13, wherein the program modules are executed on a control device in an automation system, and wherein the program modules are part of an overall application for execution on the control device, comprises providing a data storage device 20 that provides a global data space in which the program modules can store variable values so that other program modules can access them, wherein the data storage device has a software component that forms part of the firmware of the control device. The exemplary method further comprises providing at least one description file, wherein the description file has metainformation that describes which variables a program module offers using ports, configuring the data storage device 20 with the description file,wherein the meta information of the description file is stored in the data storage device, wherein the stored meta information 21-31 comprises at least one variable, and wherein at least one connector 14 is provided, wherein the connector designates a functionality of the data storage device which provides a connection from one of the program modules to another of the program modules via the data storage device, wherein the connector describes the manner in which data of the variable are written and read in a memory of the data storage device, so that a connection can be established between the program modules 11, 12, 13 via the data storage device 20, wherein the program modules 11, 12, 13 are executable by a real-time operating system, and an exchange of the variables between one of the program modules 11, 12,13 and the data storage device 20 via the connector 14. Furthermore, the exemplary method provides for the provision of variables in the data storage device 20 by a first program module of the program modules 11, 12, 13, as well as the publication of the provided variables by the data storage device 20 for at least a second program module of the program modules 11, 12, 13, and the access to the variables in the data storage device 20 by at least the second program module.
[0082] Preferably, the method comprises providing variables in the data storage device 20 by a first program module of the program modules, publishing the provided variables by the data storage device 20 for at least a second program module of the program modules, and accessing the variables in the data storage device 20 by at least the second program module.
[0083] Preferably, the method further comprises providing at least one buffer mechanism 34 for storing variables in the data storage device 20.
[0084] According to the invention, the method provides for the use of a programming interface on a program module, for example one of the program modules 11, 12, 13, wherein the programming interface enables a search of the meta information in the data storage device 20.
[0085] In an advantageous embodiment, the method may further comprise dynamically generating connectors 14.
[0086] Advantageously, the method can provide that the data storage device 20 is designed to supply at least some of the program modules, for example the program modules 11, 12, 13, with meta information, for example the meta information 21-31, in response to the description file, such that they can be executed in different processes managed by the real-time operating system.
[0087] Advantageously, the method may further comprise converting the variables from a first data type to a second data type by the connector 14.
[0088] Furthermore, the method may advantageously comprise performing a functional operation with the connector 14.
[0089] Furthermore, the method can advantageously provide for an extension of the data storage device 20 by an additional program module without a restart of a control system being carried out.
[0090] Advantageously, the method provides for a replacement value to be provided by the connector 14 in the event that no update of a published variable has taken place within a defined time interval.
[0091] Preferably, the method may provide that the data storage device 20 is configured with the description file by defining a port, a data type for the port, and a data direction of the port.
[0092] An exemplary data storage device 20 for data exchange between program modules of the same or different programming languages in a real-time operating system, for example between the program modules 11, 12, 13, has a memory and is designed to carry out the method described above, wherein the data storage device 20 preferably comprises a software component for this purpose, which can preferably form part of a firmware of a control device.
[0093] Another example of a data storage device 20 for data exchange between program modules in a real-time operating system, for example between the program modules 11, 12, 13, comprises a memory and a software component, wherein the program modules can be executed by the real-time operating system on a control device in an automation system as part of an overall application for execution on the control device, and wherein the software component forms part of the firmware of the control device, and wherein the data storage device provides a global data space in which the program modules can store variable values so that other program modules can access them, and wherein the data storage device is configurable with a description file, wherein the description file has meta information that describes which variables a program module offers using ports,and wherein the metainformation of the description file is stored in the data storage device, wherein the stored metainformation 21-31 comprises at least one variable, and wherein the data storage device is designed to provide at least one connector 14, wherein the connector designates a functionality of the data storage device that provides a connection from one of the program modules to another of the program modules via the data storage device, wherein the connector describes the manner in which data of the variable are written and read in a memory of the data storage device, so that a connection can be established between the program modules via the data storage device 20, and wherein the data storage device is designed to exchange the variables between one of the program modules and the data storage device 20 via the connector 14,and wherein the data storage device is further configured to publish variables provided by a first program module of the program modules in the data storage device 20 for at least a second program module of the program modules, so that the variables in the data storage device 20 can be accessed by at least the second program module.
[0094] Preferably, the data storage device 20 has an exchange area in the memory into which data can be written and data can be read, wherein program modules, for example the program modules 11, 12, 13, can access the data storage device 20 via interfaces.
[0095] An exemplary device 10 for data exchange between program modules of the same or different programming languages in a real-time operating system, for example the program modules 11, 12, 13, has a data storage device 20 described above, at least one processor 32, and at least one interface 33 to an automation device.
[0096] An exemplary real-time operating system for data exchange between program modules of the same or different programming languages, for example between the program modules 11, 12, 13, comprises a data storage device 20 or a software component of a data storage device 20, at least one stored description file with which the data storage device 20 or its software component can be configured, wherein a plurality of program modules 11, 12, 13 created using the same or different programming languages can be executed by the real-time operating system, wherein the data storage device 20 is designed to connect the program modules 11, 12, 13 to one another using at least one connector 14 in order to exchange at least one variable 21-31 between program modules 11, 12, 13, wherein meta information with the at least one variable 21-31 is stored in the data storage device 20.
[0097] An exemplary computer program product comprises program code means for carrying out the method described above, wherein the computer program product runs on a computer system in a real-time operating system. List of reference symbols
[0098] 10Device 11Program module 12Program module 13Program module 14Connector 15Fieldbus 16OPC-UA Server 17Data storage device 18Component 20Data storage device 21-31Data 32Processor 33Interface 41-46Connectors 50Task 51Task 52Input or inport 53Output or outport 54Buffer mechanism
Claims
1. A computer program, designed as part of a firmware of a control device in an automation system, comprising instructions that cause the control device to perform the following steps for data exchange between program modules (11, 12, 13) which can be executed on the control device as part of an overall application for execution on the control device by a real-time operating system: - providing a global data space in which the program modules can store variable values so that other program modules can access them; - configuring the computer program using a description file, wherein the description file comprises meta information that describes which variables a program module offers by using ports; - storing the meta information of the description file, wherein the stored meta information (21-31) comprises at least one variable; - providing at least one connector (14), wherein the connector denotes a functionality of the computer program which provides a connection from one of the program modules to another one of the program modules, wherein the connector describes the manner in which data of the at least one variable is written and read in a memory, so that a connection can be established between the program modules (11, 12, 13), so that the at least one variable can be exchanged between one of the program modules and the computer program; - publishing variables provided by one of the program modules (11, 12, 13) for at least one second program module of the program modules (11, 12, 13), so that the published variables can be accessed by at least the second program module, further comprising instructions that cause the control device to perform the following step: - providing a programming interface that enables a program module (11, 12, 13) to search the meta information (21-31).
2. The computer program according to claim 1, wherein the program modules (11, 12, 13) are created using different programming languages.
3. The computer program according to any one of claims 1 or 2, further comprising instructions that cause the control device to perform the following step: - providing at least one buffer mechanism (34) for the storing of variables (21 31).
4. The computer program according to any one of the preceding claims, further comprising instructions that cause the control device to perform dynamic generation of connectors (14).
5. The computer program according to any one of the preceding claims, further comprising instructions that cause the control device to respond to the description file by supplying at least some of the program modules (11, 12, 13) with meta information (21 31) such that they can be executed in different processes managed by the real-time operating system.
6. The computer program according to any one of the preceding claims, further comprising instructions that cause the control device to perform conversion the variables from a first data type to a second data type by the connector (14).
7. The computer program according to any one of the preceding claims, further comprising instructions that cause the control device to perform a functional operation using the connector (14).
8. The computer program according to any one of the preceding claims, further comprising instructions that cause the control device to perform the following step: - expanding the program by an additional program module (11, 12, 13) without restarting a control system.
9. The computer program according to any one of the preceding claims, further comprising instructions that cause the control device to perform the following step: - providing a substitute value by the connector (14) in the event that a published variable has not been updated within a predefined time interval.
10. The computer program according to any one of the preceding claims, further comprising instructions that cause the control device to perform the following step: - configuring the computer program with the description file by defining a port, a data type for the port, and a data direction of the port.
11. A computer program, designed as a real-time operating system, comprising a computer program according to any one of claims 1 to 10.
