An open industrial real-time control platform

Through an open industrial real-time control platform, the configuration editing manager and program running engine are used to support third-party programming languages ​​and compilers, the problems of low development efficiency and repetitive work caused by closed platforms are solved, and the flexibility and efficient development of user programs are achieved.

CN114296699BActive Publication Date: 2025-04-22BEIJING HOLLYSYS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111664863.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-04-22
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

The existing industrial real-time control platform is mainly closed, limiting the application of third-party algorithm providers in algorithm optimization and advanced control algorithms. Due to the high platform dependence, it leads to low development efficiency and many repetitive work.

Method used

It provides an open industrial real-time control platform, which supports third-party programming languages ​​and compilers through configuration editing managers and program running engines, reduces user programs' dependence on the platform, and improves development efficiency and portability.

Benefits of technology

It realizes flexibility and efficient development of user programs, reduces duplicate development work, and improves the portability and user experience of the platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114296699B_ABST
    Figure CN114296699B_ABST
Patent Text Reader

Abstract

This article discloses an open industrial real-time control platform, including: a configuration editing manager, configured to provide a platform function library and a platform management interface to an integrated development environment for user programs to call during the configuration process, and download the user program compiled by the compiler to the program running engine; the program running engine is configured to allocate corresponding code areas and data areas to the user program, and load the user program into the corresponding code area; create a management thread for the user program, and monitor and schedule the operation of the user program through the management thread; wherein the integrated development environment includes a code editor and a compiler; the code editor supports third-party programming languages ​​and third-party function libraries; the compiler supports third-party compilers. The open industrial real-time control platform provided in this article can increase the flexibility of user programs using third-party programming languages ​​and compilers, and improve the development efficiency and portability of user programs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of industrial control, and in particular to an open industrial real-time control platform. Background Art

[0002] Industrial real-time control platform is the core software of industrial control system. As users' demand for control quality gradually increases, some specialized third-party optimization algorithm manufacturers, colleges and universities, and research institutes (hereinafter referred to as third-party algorithm providers) may have deeper research in algorithm optimization and advanced control algorithms than industrial real-time control platform developers, but third-party algorithm providers lack the environment and platform for algorithm operation.

[0003] At present, most of the industrial real-time control platforms on the market are closed. User programs can only be developed based on the configuration language provided by the industrial real-time control platform and compiled based on the compiler provided by the platform. If a third-party algorithm provider uses a closed industrial real-time control platform to implement a control algorithm, it may face the risk of algorithm code leakage and intellectual property protection failure. In addition, in order to connect to different industrial control platforms, third-party algorithm providers need to reconfigure or program on each industrial control platform, resulting in a lot of repeated development work, and the development workload is large, and the workload of maintaining different software versions is also huge. Summary of the invention

[0004] The embodiment of the present application provides an open industrial real-time control platform, including:

[0005] The configuration editing manager is configured to provide the platform function library and platform management interface to the integrated development environment IDE for the user program to call during the configuration process, and download the user program compiled by the compiler to the program running engine;

[0006] The program execution engine is configured to allocate a corresponding code area and a data area for the user program, load the user program into the corresponding code area, create a management thread for the user program, and monitor and schedule the execution of the user program through the management thread;

[0007] Wherein, the integrated development environment includes a code editor and a compiler; the code editor supports third-party programming languages ​​and third-party function libraries; and the compiler supports third-party compilers.

[0008] The open industrial real-time control platform provided by the embodiment of the present application includes a configuration editing manager and a program running engine. The configuration editing manager can provide functional support and management support for user programs (including user programs developed using third-party programming languages ​​and compilers) by providing a platform function library and a platform management interface for the integrated development environment for user programs to call during the configuration process. After the user program is downloaded to the program running engine, the program running engine allocates corresponding code areas and data areas to the user program, and loads the user program into the corresponding code area; creates a management thread for the user program, and monitors and schedules the operation of the user program through the management thread. The open industrial real-time control platform provided by the above embodiment can reduce the user program's dependence on the platform during the configuration process, increase the flexibility of the user program to use third-party programming languages ​​and compilers, and improve the development efficiency and portability of the user program.

[0009] Other aspects will be apparent upon reading and understanding the drawings and detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The accompanying drawings are used to provide an understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.

[0011] Figure 1 A schematic diagram of an open industrial real-time control platform according to an embodiment of the present application;

[0012] Figure 2 A schematic diagram of the correspondence between a platform function external address table and a platform function internal address table according to an embodiment of the present application;

[0013] Figure 3 A schematic diagram of an interaction between a management thread and a user program according to an embodiment of the present application;

[0014] Figure 4 A schematic diagram of another open industrial real-time control platform according to an embodiment of the present application. DETAILED DESCRIPTION

[0015] The present application describes multiple embodiments, but the description is exemplary rather than restrictive, and it is obvious to those skilled in the art that there may be more embodiments and implementations within the scope of the embodiments described in the present application. Although many possible feature combinations are shown in the drawings and discussed in the specific embodiments, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with any other feature or element in any other embodiment, or may replace any other feature or element in any other embodiment.

[0016] The present application includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features and elements disclosed in the present application may also be combined with any conventional features or elements to form a unique invention scheme defined by the appended claims. Any features or elements of any embodiment may also be combined with features or elements from other invention schemes to form another unique invention scheme defined by the appended claims. Therefore, it should be understood that any feature shown and / or discussed in the present application may be implemented individually or in any appropriate combination. Therefore, except for the limitations made according to the appended claims and their equivalents, the embodiments are not subject to other restrictions. In addition, various modifications and changes may be made within the scope of protection of the appended claims.

[0017] In addition, when describing representative embodiments, the specification may have presented the method and / or process as a specific sequence of steps. However, to the extent that the method or process does not rely on the specific order of the steps described herein, the method or process should not be limited to the steps of the specific order described. As will be understood by those of ordinary skill in the art, other sequences of steps are also possible. Therefore, the specific sequence of the steps set forth in the specification should not be interpreted as a limitation to the appended claims. In addition, the claims for the method and / or process should not be limited to the steps of performing them in the order written, and those skilled in the art can easily understand that these sequences can be changed and still remain within the spirit and scope of the embodiments of the present application.

[0018] like Figure 1 As shown, the embodiment of the present application provides an open industrial real-time control platform, including:

[0019] The configuration editing manager 100 is configured to provide the integrated development environment IDE with a platform function library and a platform management interface for the user program to call during the configuration process, and to download the user program compiled by the compiler to the program execution engine;

[0020] The program execution engine 200 is configured to allocate a corresponding code area and a data area for the user program, load the user program into the corresponding code area; create a management thread for the user program, and monitor and schedule the execution of the user program through the management thread;

[0021] Wherein, the integrated development environment includes a code editor and a compiler; the code editor supports third-party programming languages ​​and third-party function libraries; and the compiler supports third-party compilers.

[0022] The open industrial real-time control platform provided in the above embodiment includes a configuration editing manager and a program running engine. The configuration editing manager can provide functional support and management support for user programs (including user programs developed using third-party programming languages ​​and compilers) by providing a platform function library and a platform management interface for the integrated development environment for user programs to call during the configuration process. After the user program is downloaded to the program running engine, the program running engine allocates corresponding code areas and data areas to the user program, loads the user program into the corresponding code area; creates a management thread for the user program, and monitors and schedules the operation of the user program through the management thread. The open industrial real-time control platform provided in the above embodiment can reduce the dependence of the user program on the platform during the configuration process, increase the flexibility of the user program to use third-party programming languages ​​and compilers, and improve the development efficiency and portability of the user program.

[0023] A third-party programming language refers to a programming language other than the programming language provided by the open industrial real-time control platform. For example, a third-party programming language may be a user-defined programming language or some general programming language. A third-party function library refers to a function library other than the function library provided by the open industrial real-time control platform. For example, a third-party function library may be a user-defined function library or some general function library. A third-party compiler refers to a compiler other than the compiler provided by the open industrial real-time control platform. For example, a third-party compiler may be a user-defined compiler or some general compiler.

[0024] In some exemplary embodiments, the user program downloaded to the program execution engine is a binary executable code.

[0025] In some exemplary embodiments, the binary executable code is a dynamic link library.

[0026] In some exemplary embodiments, the platform management interface is used to implement management of user programs by the program execution engine.

[0027] In some exemplary embodiments, the user program downloaded to the program execution engine includes codes for interaction between the user program and the management thread implemented according to the platform management interface.

[0028] The code of the user program can inherit the platform management interface and implement the functions specified by the platform management interface. When the user program is running, the program running engine can read some information of the user program running through the platform management interface (such as the program running heartbeat signal (used to judge the execution status of the third-party program)), or set / read some parameter values, or define / control some messages. Provide a communication basis for the platform management program and the third-party algorithm program.

[0029] In some exemplary embodiments, the configuration editing manager is configured to provide the platform function library to the integrated development environment IDE for the user program to call during the configuration process in the following manner: provide the user program with a platform function external address table; the platform function external address table records the first entry address corresponding to each platform function; the first entry address is the function entry address provided to the compiler. Figure 2 As shown, the platform function external address table has a mapping relationship with one or more versions of the platform function internal address table; for any platform function, the platform function has different second entry addresses for different platform function library versions; the second entry address is the platform function entry address provided to the program execution engine.

[0030] The program running engine is also configured to search the internal address table of the platform function corresponding to the version according to the version information of the current platform function library when loading the user program into the corresponding code area, determine the second entry address of the platform function called by the user program, use the second entry address as the real entry address of the platform function, load the code and data corresponding to the second entry address to relocate the platform function.

[0031] The platform function calling method provided in the above embodiment is different from general programming development. For general programming development, if the version of the function library to be called changes, the header file and binary target file of the new function library can be used to recompile and package the user program. However, for the open industrial real-time control platform of the present application, the platform and third-party algorithms are provided by different developers. In order to make the configuration not have to be recompiled and packaged after the platform function version changes, this requires the platform to provide the user program with a "forever unchanged" platform function entry address. The platform function calling method provided in the above embodiment relocates the platform function during the user program loading phase, so that the third-party user program does not need to care about the actual entry address of the platform function, thereby facilitating the maintenance and transplantation of the user program.

[0032] In some exemplary implementations, the code area and data area allocated by the program execution engine to the user program are located in the memory.

[0033] In some exemplary implementations, the user program and the management thread share the same data area in memory.

[0034] A core indicator of the industrial real-time control platform is real-time performance. If a user program uses system computing resources indefinitely, other computing resources will not be able to obtain the required computing resources in a timely manner, thus failing to ensure the real-time performance of the system.

[0035] In order to solve the problem of user programs infinitely competing for computing resources, we introduced a mechanism for allocating computing time slices. Each user program is allocated a corresponding time slice. After the time slice is exceeded, the program running engine suspends its calculation, saves its running stack, and resumes its operation when the next time period arrives.

[0036] When the user program is editing the source code, the platform's related management functions are integrated into the user program's code by inheriting and implementing the platform's management interface; when the compiler compiles and packages the binary executable code, the binary executable code can be packaged into a dynamic link library for easy platform calling and management. Figure 3 A method for managing computing resources by a program execution engine is shown. Figure 3 As shown, when the program execution engine loads a user program, it communicates with the user program by creating a management thread. The management thread obtains relevant information (such as heartbeat signals) when the user program is running through the platform management interface. If it is detected that this information is abnormal or does not meet the scheduling operation conditions, the corresponding management action is triggered.

[0037] In some exemplary implementations, the program execution engine is configured to monitor and schedule the execution of the user program through the management thread in the following manner:

[0038] The management thread allocates time slices for user programs to use platform computing resources. When the current time slice of the user program runs out, the user program's use of computing resources is suspended, the user program's running stack is saved, and the user program's use of computing resources is resumed when the next time slice allocated to the user program arrives.

[0039] In some exemplary embodiments, the program execution engine is configured to monitor and schedule the execution of the user program through the management thread in the following manner: the management thread obtains relevant information when the user program is running through the platform management interface, and determines whether the user program is running normally based on the obtained relevant information.

[0040] In some exemplary embodiments, the relevant information when the user program is running includes: a heartbeat signal when the user program is running.

[0041] In some exemplary embodiments, Figure 4 As shown, the open industrial real-time control platform further includes: a real-time database 300;

[0042] The real-time database is configured to provide database access services to user programs.

[0043] When users write their own algorithm programs, they need to read data from the real-time database. Therefore, the open industrial real-time control platform needs to provide a real-time database access method so that user programs can transparently, correctly and efficiently access the real-time database of the industrial control platform.

[0044] When the user program accesses the real-time database of the platform, it does not know the offset information of the data points of the platform in the real-time database, and this information is also dynamically changing, and each time the user modifies the configuration, it may change. Therefore, it is necessary to provide a database access method for the user program, which can be an access method of data point naming. The embodiment of the present application provides a group of interface functions for real-time database access (reading and writing) for the user program. This function accesses the real-time database in the form of data point naming. Because the data point naming (point name, item name) information does not change with the version of the engineering configuration, the method of data point naming access can be used to ensure the correctness of the access to the real-time database, but because the data point naming is usually a string, the efficiency of string index search is low, especially in large projects, the number of data point naming is often as many as tens or even millions. It is difficult to ensure real-time performance and efficient data access cannot be achieved by accessing in this way.

[0045] In order to improve the efficiency of database access, an embodiment of the present application provides a real-time database index positioning technology based on a key-index index table. The configuration editing manager provides the IDE with a database access interface based on data point naming, and the user program directly obtains data through the data point naming method. When the interface function is compiled, the data point naming information (key) is translated into database index (index) information. This index (index) information is essentially a digital index established for the data point naming (key). During the code execution process, the offset pointer of the real-time database data area is calculated through the index (index). Through the database access method of data point naming + index table, the data access efficiency is very high and is not affected by the size of the industrial control platform project.

[0046] In some exemplary embodiments, the real-time database is configured to provide database access services to user programs in the following manner: providing a database access interface and a naming index table to the configuration editing manager; wherein the database access interface accesses the real-time database by naming data points; the naming index table records the digital index of the real-time database corresponding to each data point name; the user program accesses the real-time database through the database access interface; and the compiler translates the data point naming information into the digital index information of the real-time database by querying the naming index table during the compilation process.

[0047] In some exemplary embodiments, the data point naming includes: a point name and an item name of the data point, wherein the point name is a large category name of the data point, and the item name is a small category name of the data point, wherein the point name may have a hierarchical and nested relationship, and the item name may also have a hierarchical and nested relationship.

[0048] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

Claims

1. An open industrial real-time control platform, comprising: The configuration editing manager is configured to provide the platform function library and platform management interface to the integrated development environment IDE for the user program to call during the configuration process, and download the user program compiled by the compiler to the program running engine; A program execution engine is configured to allocate a corresponding code area and a data area to a user program, and load the user program into the corresponding code area; Creating a management thread for the user program, and monitoring and scheduling the running of the user program through the management thread; Wherein, the integrated development environment includes a code editor and a compiler; the code editor supports third-party programming languages ​​and third-party function libraries; the compiler supports third-party compilers; The configuration editing manager is configured to provide a platform function library to an integrated development environment IDE in the following manner for a user program to call during a configuration process: providing a platform function external address table to the user program; the platform function external address table records a first entry address corresponding to each platform function; the first entry address is a function entry address provided to a compiler; the platform function external address table has a mapping relationship with one or more versions of a platform function internal address table; for any platform function, the platform function has different second entry addresses for different platform function library versions; the second entry address is a platform function entry address provided to a program execution engine; The program running engine is also configured to search the internal address table of the platform function corresponding to the version according to the version information of the current platform function library when loading the user program into the corresponding code area, determine the second entry address of the platform function called by the user program, use the second entry address as the real entry address of the platform function, load the code and data corresponding to the second entry address to relocate the platform function.

2. The control platform according to claim 1, characterized in that: The user program downloaded to the program execution engine is a binary executable code.

3. The control platform according to claim 2, characterized in that: The user program downloaded to the program execution engine is a dynamic link library.

4. The control platform according to claim 1, characterized in that: The user program downloaded to the program execution engine includes codes for interaction between the user program and the management thread implemented according to the platform management interface.

5. The control platform according to claim 1, characterized in that: The code area and data area allocated by the program execution engine for the user program are located in the memory.

6. The control platform according to claim 1, characterized in that: The user program and the management thread share the same data area in the memory.

7. The control platform according to claim 1, characterized in that: The program execution engine is configured to monitor and schedule the execution of the user program through the management thread in the following manner: The management thread allocates time slices for user programs to use platform computing resources. When the current time slice of the user program runs out, the user program's use of computing resources is suspended, the user program's running stack is saved, and the user program's use of computing resources is resumed when the next time slice allocated to the user program arrives.

8. The control platform according to claim 1, characterized in that: The program running engine is configured to monitor and schedule the running of the user program through the management thread in the following manner: the management thread obtains relevant information when the user program is running through the platform management interface, and determines whether the user program is running normally based on the obtained relevant information.

9. The control platform according to claim 8, characterized in that: The relevant information when the user program is running includes: a heartbeat signal when the user program is running.

10. The control platform according to claim 1, characterized in that: The open industrial real-time control platform also includes: a real-time database; The real-time database is configured to provide database access services to user programs.

11. The control platform according to claim 10, characterized in that: The real-time database is configured to provide database access services to user programs in the following manner: providing a database access interface and a naming index table to the configuration editing manager; wherein the database access interface accesses the real-time database by means of data point naming; the naming index table records the digital index of the real-time database corresponding to each data point name; the user program accesses the real-time database through the database access interface; and the compiler translates the data point naming information into the digital index information of the real-time database by querying the naming index table during the compilation process.

12. The control platform according to claim 11, characterized in that: The data point naming includes: the point name and item name of the data point.

Citation Information

Patent Citations

  • Instant compilation engine adaptive function loading method

    CN112558976A

  • System, programming method, and computer medium for developing an industrial control program

    CN112631210A