A control system and control method

By adopting a scheduler-free control system architecture, utilizing a distributed key-value database and graceful shutdown mechanism, the performance waste and low stability caused by schedulers in traditional control systems are solved, enabling efficient and flexible deployment of control modules and non-stop updates.

CN117193216BActive Publication Date: 2026-06-09SUPCON TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUPCON TECH CO LTD
Filing Date
2023-10-18
Publication Date
2026-06-09

Smart Images

  • Figure CN117193216B_ABST
    Figure CN117193216B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of industrial control, in particular to a control system and a control method, wherein a display layer is used for transmitting user identity information and graphical configuration information edited by a user to an application layer after receiving the user identity information and the graphical configuration information; the application layer is used for authenticating the right of the user according to the user identity information, and if the authentication result is true, the graphical configuration information is sent to an algorithm layer; the algorithm layer is used for checking and compiling the graphical configuration information to obtain a corresponding control program; a data layer is used for creating corresponding parameter data and task data chains according to the control program; and the algorithm layer is further used for creating all tasks of the task data chains and triggering corresponding production equipment to execute according to the parameter data and the task data chains. The system has higher overall performance and stability, and the difficulty of network configuration is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial control technology, and in particular to a control system and control method. Background Technology

[0002] According to existing technology, a control system typically includes one or more schedulers, which provide functions such as control algorithm scheduling, data transmission updates, and status judgment and detection. This design is common in DCS, PLC, APC, batch control software, process control software, and intermittent control software. In actual development and application, the following problems may be encountered:

[0003] 1. Schedulers are typically designed based on finite state machines. Under standards such as ISA 88 and ISA 106, a scheduler contains approximately 10 commands and 20 states. The scheduler should determine all transition conditions and attempt to execute control programs and algorithms in all states during scheduling. However, for most control programs and algorithms, execution is only required in a very small number of states. Therefore, the scheduler incurs performance waste and increases the workload and difficulty for developers.

[0004] 2. The scheduler rapidly generates a large number of state transitions for control programs and algorithms. On the one hand, in scenarios with strict auditing requirements, such as pharmaceuticals, recording these state transitions can lead to a decline in database state. If batch writes to the database are performed in time slices within the scheduling cycle, it may cause the scheduler to lag. On the other hand, if a scheduler capable of handling redundancy or a distributed scheduler is required, a large number of state synchronization events need to be handled, increasing system performance requirements and the difficulty of development and maintenance.

[0005] 3. At the software layer, the scheduler often calls the control module through direct linking, dynamic libraries, inter-thread communication, and inter-process communication. This leads to a strong dependency between the scheduler and the control module, making it very difficult to update the control module online.

[0006] Therefore, there is an urgent need for a scheduler-free control system and control method. Summary of the Invention

[0007] (a) Technical problems to be solved

[0008] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a control system and control method, which solves the technical problems of performance waste caused by the scheduler in traditional control systems, high system performance requirements, low stability, and difficulty in online updating of control modules.

[0009] (II) Technical Solution

[0010] To achieve the above objectives, the main technical solutions adopted by the present invention include:

[0011] In a first aspect, embodiments of the present invention provide a control system.

[0012] The present invention provides a control system for automatic control of industrial production, comprising a data layer, an algorithm layer, an application layer, and a presentation layer;

[0013] The presentation layer is used to transmit the user identity information and the graphical configuration information edited by the user to the application layer after receiving the user identity information and the graphical configuration information.

[0014] The graphical configuration information includes parameter information of industrial production materials, parameter information of the production process, and tag information of production equipment;

[0015] The application layer is used to authenticate the user's permissions based on the user's identity information. If the authentication result is true, the graphical configuration information is sent to the algorithm layer.

[0016] The algorithm layer is used to check and compile the graphical configuration information to obtain the corresponding control program;

[0017] The data layer is used to create corresponding parameter data and task data chains according to the control program;

[0018] The algorithm layer is also used to create all tasks in the task data chain based on the parameter data and the task data chain, and to trigger the corresponding production equipment to execute them.

[0019] Optionally, the data layer further includes:

[0020] The information storage module is used to store the control program ID, control program header type, control program structure tree, control program header runtime information, control program type, control program configuration, control program entry point, control program variable name, control program running status, control module name, element ID in the control program, preceding element ID in the control program, following element ID in the control program and selection judgment conditions, parameter information of production equipment, and status and result information of manual processing.

[0021] Among them, the control program variables include operation time variable information and material consumption variable information;

[0022] The variable storage module is used to store the control system startup time, control system abnormal information, and variables of the control program;

[0023] Among them, control program variables include built-in variables and user-defined variables;

[0024] Built-in variables include those that control program execution time and program execution status;

[0025] User-defined variables are created by the user and include material consumption, equipment running time, number of logical loops, intermediate variables, etc.

[0026] Optionally, the task data chain includes multiple task data, each task data has its own pointer information, and adjacent task data are arranged sequentially based on the pointer information.

[0027] Optionally, the algorithm layer includes:

[0028] The control module is used to create and trigger the corresponding production equipment to execute the first task of the task data chain according to the parameter data and the pointer information of the task data chain; after the first task is completed, it creates and triggers the corresponding production equipment to execute the second task according to the parameter data and the pointer information of the task data chain, until all tasks in the task data chain are completed; and after all tasks are completed, it reads and records all parameter data in the data layer.

[0029] The running module is used to determine the abnormal situation that has occurred in the control module based on the running status of the control module when the control module crashes or deadlocks.

[0030] Optionally, the application layer includes:

[0031] The gateway module is used to determine user permissions;

[0032] The permissions module is used to manage user permissions;

[0033] The encapsulation module is used to encapsulate the data in the data layer and algorithm layer, and to provide an interface for the presentation layer;

[0034] The business module is used to check the compilation control program, monitor system anomalies, manage the control program, and read the control program's historical information.

[0035] Optionally, the presentation layer includes:

[0036] The information receiving module is used to receive graphical configuration information edited by the user and transmit the graphical configuration information to the application layer;

[0037] The information receiving module can be a client, browser, or mobile device;

[0038] The information display module is used to show the progress of the control program during its operation;

[0039] The information confirmation module is used to receive confirmation information from users for events that require manual confirmation.

[0040] Secondly, embodiments of the present invention provide a control method.

[0041] An embodiment of the present invention proposes a control method, which is implemented based on any of the control systems described in the first aspect above, and the control method includes:

[0042] S1. After receiving the user identity information and the graphical configuration information edited by the user, the presentation layer transmits the user identity information and the graphical configuration information to the application layer.

[0043] The graphical configuration information includes parameter information of industrial production materials, parameter information of the production process, and tag information of production equipment;

[0044] S2. The application layer authenticates the user's permissions based on the user's identity information. If the authentication result is true, the graphical configuration information is sent to the algorithm layer.

[0045] S3. The algorithm layer checks and compiles the graphical configuration information to obtain the corresponding control program;

[0046] S4. The data layer creates corresponding parameter data and task data chains according to the control program;

[0047] S5. The algorithm layer creates all tasks in the task data chain based on the parameter data and task data chain, and triggers the corresponding production equipment to execute them.

[0048] Optionally, the control method further includes:

[0049] During the execution of the control program, the control system generates one or more control commands based on the execution status of the control program.

[0050] The control commands include start, stop, pause, resume, and suspend;

[0051] The generation of control commands is achieved by changing the running state of the control program in the program information unit.

[0052] Optionally, the control method further includes:

[0053] During the operation of the control program, information on control markers added by the user on control program elements is received. The control markers include: skip marker, step skip marker, and pause marker.

[0054] When the control program encounters a skip flag during execution, it skips the flagged control program element and continues to execute subsequent control program elements.

[0055] When a jump mark is encountered during the execution of the control program, execution will start directly from another related control program element based on the information in the jump mark.

[0056] When the control program encounters a pause marker during its operation, it will not modify the control program's running state and will not continue execution until the pause marker is removed.

[0057] Optionally, the control method further includes: updating the control module online upon receiving an update request from a user;

[0058] The online update of the control module includes:

[0059] The control module performs a graceful stop upon receiving a stop signal;

[0060] Graceful stopping refers to completing the currently executing task after receiving a stop notification, and then stopping the process.

[0061] After the control module stops, release the current control module and restart the new control module.

[0062] (III) Beneficial Effects

[0063] The present invention provides a control system and control method that, by changing the traditional method of executing the control module from calling the control module to active execution by the control module, achieves distributed deployment of the control module. Compared with the prior art, this improves the overall performance and stability of the system, makes the deployment more flexible, and reduces the difficulty of network configuration, such as firewalls and DCOM.

[0064] Since the control module only needs to complete the control algorithm and does not need to handle state transitions, the workload of developers can be reduced when designing and developing the control module compared to existing technologies.

[0065] Because different control modules are used in combination with the application layer, multiple control methods can be achieved, such as continuous control, sequential control, batch control, and even mixed mode control.

[0066] Because the control module is updated using a graceful stop method, this invention enables online updates of the control module compared to existing technologies, achieving updates without stopping the machine or production, thus ensuring the continuous stability of production operations. Attached Figure Description

[0067] Figure 1 This is a schematic diagram of a control system architecture design provided in an embodiment of the present invention;

[0068] Figure 2 This is a schematic diagram of a control method provided in another embodiment of the present invention. Detailed Implementation

[0069] To better explain and facilitate understanding of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0070] The control system and control method proposed in this invention change the control module execution method from the traditional calling of the control module to active execution by the control module. This realizes the distributed deployment of the control module, improves the overall performance and stability of the system, makes the deployment more flexible, and reduces the difficulty of network configuration, such as firewalls and DCOM.

[0071] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present invention can be understood more clearly and thoroughly, and that the scope of the present invention can be fully conveyed to those skilled in the art.

[0072] Example 1

[0073] like Figure 1 As shown, this embodiment provides a control system, which may include a data layer, an algorithm layer, an application layer, and a presentation layer.

[0074] The presentation layer is used to transmit the user identity information and the graphical configuration information edited by the user to the application layer after receiving the user identity information and the graphical configuration information.

[0075] The graphical configuration information includes parameter information of industrial production materials, parameter information of the production process, and tag information of production equipment;

[0076] For example, the presentation layer can be a browser, a client, or a mobile device.

[0077] The application layer is used to authenticate the user's permissions based on the user's identity information. If the authentication result is true, the graphical configuration information is sent to the algorithm layer.

[0078] Specifically, the application layer includes:

[0079] The gateway module is used to determine user permissions;

[0080] The permissions module is used to manage user permissions;

[0081] The encapsulation module is used to encapsulate the data in the data layer and algorithm layer, and to provide an interface for the presentation layer;

[0082] The business module is used to check the compilation control program, monitor system anomalies, manage the control program, and read the control program's historical information.

[0083] The application layer, tailored to business characteristics and in conjunction with specific control procedures, can perform higher-level control and management, such as sequence control.

[0084] The presentation layer is the user interface, which provides users with an interface for configuring the control program, viewing the control program during runtime, and tracing the control program history.

[0085] Specifically, the presentation layer includes:

[0086] The information receiving module is used to receive graphical configuration information edited by the user and transmit the graphical configuration information to the application layer;

[0087] The information receiving module can be a client, browser, or mobile device;

[0088] The information display module is used to show the progress of the control program during its operation;

[0089] The information confirmation module is used to receive confirmation information from users for events that require manual confirmation.

[0090] For example, in industrial production processes, if there are events that require manual confirmation, on-site operators can receive the information and make confirmation operations on their mobile devices.

[0091] The algorithm layer is used to check and compile the graphical configuration information to obtain the corresponding control program.

[0092] The data layer is used to create corresponding parameter data and task data chains according to the control program.

[0093] Specifically, the data layer needs to support redundant operation functions and fast read / write characteristics, and is not sensitive to data structure. Therefore, the data layer preferentially uses a high-performance distributed key-value database cluster. In this embodiment, the data layer is built with Redis.

[0094] To better understand the following data layer concepts, the concepts of "key" and "stream" in Redis are explained below:

[0095] In Redis, Key and Stream are two different data structures used for different purposes.

[0096] Key:

[0097] A key is an identifier for storing data in Redis, similar to a table name or filename in other databases. Keys can be used to store various data types, including strings, lists, hashes, sets, etc. Keys are typically used for simple data storage and retrieval operations, such as storing user session information, cached data, counters, etc. Keys can be set with an expiration time so that they are automatically deleted after a certain period of time.

[0098] Stream:

[0099] Stream is a data structure introduced in Redis version 5.0, used to process time-series data. A Stream can be viewed as a continuously growing log file, where each record has a unique ID, along with associated fields and values. Stream is suitable for recording ordered data such as events, messages, and logs, and is particularly suitable for implementing message queues and publish / subscribe systems. Stream provides rich functionality, including Consumer Groups, blocking reads, and range queries, making it very suitable for handling event-driven applications.

[0100] In summary, Key is used for general key-value storage needs, while Stream is used to handle ordered time-series data, and is particularly suitable for message passing and event-driven applications. The choice of which data structure to use depends on the specific requirements and use case.

[0101] Optionally, the data layer is designed in detail as follows:

[0102] 1. Databases should support distributed clusters and prioritize consistency, because in control systems, accurate data is often more important than short-term delays caused by availability.

[0103] 2. Namespaces are used within the database to distinguish keys with different functions. Specifically: (where "<" and ">" form placeholders)

[0104] (1) “sv:info” means Server Information, which is a HashMap containing global server configuration, names of all server variables, etc.

[0105] (2) "sv:var: <name>"Indicates Server Variable, where" <name>" is the name of the server variable. The value type is not restricted. The server variable is a global variable and can be used to store system startup time, system exception information, etc. It can also be used to control the algorithm to store variables across control programs, such as the number of times a certain algorithm is executed, the total amount of materials used, equipment running time, etc.

[0106] (3) "proc: <id>":head" represents the Procedure Header, i.e., the program header information. <id>" is the program ID, and the value is of type HashMap, which includes program header type, program structure tree (corresponding to program types with nested programs), program header runtime information, etc.;

[0107] (4) "proc: <id>":info" stands for Procedure Information, where " <id>" is the program ID, and the value is a HashMap. The HashMap includes the program type, program configuration, program entry point, IDs of all elements in the program, names of all program variables, program runtime information, etc.

[0108] (5) "proc: <id>:our: <name>" represents a Procedure Variable, where" <id>"This is the program ID." <name>" is the name of the program variable, and the value type is not restricted. Program variables are global variables and can be used to record operation information of a certain section or a batch of consumed materials, etc.

[0109] (6) "proc: <id1>:element: <id2>"" represents a Procedure Element, which corresponds to the control algorithm containing the configuration. <id1>" is the program ID, where" <id2>" is the element ID, and its value type is HashMap. The HashMap contains control algorithm configuration information, control module name, element ID, previous element ID, next element ID and selection judgment conditions. When designing this key value, it should be ensured that it contains all the configuration information required by the control module.

[0110] (7)"mod: <name>":info" stands for Module Information, which corresponds to control module information. <name>" is the name of the control module;

[0111] (8) "msg: <id>":info" stands for Message Information, where " <id>"This is the message ID. Some algorithms related to human operation (such as scanning codes to feed materials) will use messages to manage the status and results of manual processing;

[0112] 3. The database also needs to provide streams with specific functions:

[0113] mod: <name>":tasks" stands for Module Tasks, which corresponds to all tasks executed by the control module. <name>" is the name of the control module, which will be executed sequentially or concurrently from this stream.

[0114] 4. If you need to implement variable trends and execution records, you can add the above "sv:var:" as needed. <name>”、"proc: <id1>:element: <id2>Replace "etc." with streams.

[0115] The algorithm layer is also used to create all tasks in the task data chain based on the parameter data and the task data chain, and to trigger the corresponding production equipment to execute them.

[0116] Specifically, the algorithm layer includes a control module and a runtime module;

[0117] For example, the control module includes general control modules such as start, end, parallel start, parallel end, up jump, down jump, conditional AND, conditional OR, subroutine, resource occupancy, resource release, script execution, write bit, write variable, numerical calculation, string operation, HTTP request, read file, write file, manual confirmation, timer control, timer judgment, and program control. It can also include algorithm control modules such as PID control, SPID control, and stage control, as well as global automatic triggering system modules such as anomaly monitoring and automatic execution.

[0118] The runtime modules include:

[0119] The program management module is used to manage and control programs;

[0120] The guard module is used to determine possible abnormalities in the control module based on its operating status when the control module crashes or deadlocks.

[0121] The encapsulation module is used to encapsulate the data layer and provide interfaces;

[0122] Other modules related to the control system and actual operations.

[0123] The control system provided in this embodiment uses a high-performance distributed key-value database cluster, which supports redundant processing operations at the data layer, has fast read and write characteristics, and is insensitive to data structure, thereby improving the performance and stability of the system, reducing development workload, and lowering maintenance difficulty.

[0124] Example 2

[0125] like Figure 2 As shown, this embodiment provides a control method, which is implemented based on the control system provided in Embodiment 1, and includes:

[0126] S1. After receiving the user's identity information and the graphical configuration information edited by the user, the presentation layer transmits the user's identity information and the graphical configuration information to the application layer.

[0127] Specifically, user identity information is obtained by collecting user login information, which includes permission information. Before the production process begins, users can graphically configure the production process in a configuration editor on a browser or client, thereby generating the user's graphical configuration information.

[0128] S2. The application layer authenticates the user's permissions based on the user's identity information. If the authentication result is true, the graphical configuration information is sent to the algorithm layer.

[0129] S3. The algorithm layer checks and compiles the graphical configuration information to obtain the corresponding control program.

[0130] S4. The data layer creates corresponding parameter data and task data chains according to the control program.

[0131] S5. The algorithm layer creates all tasks in the task data chain based on the parameter data and task data chain, and triggers the corresponding production equipment to execute them.

[0132] After each task is completed, the task is marked as confirmed, and the program element unit is read to obtain the configuration for the next task. If the configuration can be obtained, the next task is created and execution continues according to the configuration.

[0133] Specifically, the control module is from "mod: <name>Reading tasks from the ":tasks" stream, marking the current task as confirmed, and then reading from "proc: <id1>:element: <id2>"Get the configuration for the next task."

[0134] Optionally, the "proc:" element is modified after completion by the element used to manage the program state. <id>":info" and "proc: <id1>:element: <id2>The state in the configuration ensures that no other branches will be executed; depending on the configuration, it waits for all branches to finish or terminates directly.

[0135] The results of each program element's execution are recorded by an element used to manage the program state. These results can be stored in other historical databases to reduce the pressure on the data layer.

[0136] Data from server variable units and program variable units is read and recorded to the trend server at preset time intervals or when preset key events occur.

[0137] Among them, the trend server is a server specifically for recording server variables and program variables;

[0138] Service parameters and program parameters are read periodically or when critical events occur through the program management control module. <name>”、"proc: <id>:our: <name>"And record it to a dedicated trend server."

[0139] During the execution of the control program, the control system will issue control commands according to the actual situation, such as start, stop, pause, resume, and suspend.

[0140] The control commands are issued by modifying the program running status information in the program information unit.

[0141] During the operation of the control program, information on control markers added by the user on control program elements is received. The control markers include: skip marker, step skip marker, and pause marker.

[0142] When the control program encounters a skip flag during execution, it will skip the marked program element and continue executing subsequent program elements.

[0143] When the control program encounters a jump marker during execution, it will directly start execution from another specified program element;

[0144] When the control program encounters a pause marker during its operation, it will not modify the program's running state and will not continue execution until the pause marker is removed.

[0145] Specifically, the methods and key points of the control module in the entire operation of the control system are as follows:

[0146] 1. Methods to keep the control module running: Due to the flexible deployment nature of the entire control system, the control module can be implemented in different systems in different ways. Therefore, the module can be kept running by methods such as process daemonization, service orchestration, or being managed by other services. The startup of the control module is the foundation for the execution of the control algorithm. After the control module starts, it should send a "mod:" message to the data layer. <name>The ":info" key is used to write module information and update its running status periodically;

[0147] 2. The algorithm of the control module should be completed in the shortest possible time. If an algorithm is very complex, it should be divided into multiple control modules or the same control module should be repeatedly executed with the finite state machine design by recreating the task.

[0148] 3. Execution process of the control module: After startup, the control module will read "mod: <name>The ":tasks" stream begins execution after tasks are read. Typically, the control module reads and processes a fixed number of tasks upon startup. If all tasks are completed, it uses blocking read to wait for new tasks to be generated. This "fixed number" can be estimated based on task timeouts and the average time the control module takes to execute tasks. After execution, the control module should use transaction operations: mark the current task as confirmed, and read "proc: <id1>:element: <id2>"Get the configuration for the next task; if available, create the next task."

[0149] 4. The process of the control module operating resources: The control module can directly read and write variables at each level of the data layer, or read and write bit numbers through protocols such as OPC, or interact with files or third-party systems through IO. Similarly, when operating resources, attention should be paid to handling issues such as timeouts and retries to increase the stability and robustness of the control system.

[0150] 5. Control Module Competition: When high performance or high availability is required, multiple identical control modules may run simultaneously in a control system. This necessitates: unique read operation: once a control module reads a task, other control modules cannot read that task again under normal circumstances; concurrent execution: after a control module reads a task, it should not block other control modules from continuing to read tasks; different control modules can execute tasks simultaneously; timeout reset: when a control module times out, the execution of the task should be prevented, terminated, and the task redistributed.

[0151] 6. Control module anomaly handling and redundancy switching: During normal operation of the control module, the control module will periodically send an error message to "mod: <name>The :info string is used to write the running status, including the heartbeat. Therefore, when the control module crashes or deadlocks, the guard system can judge the possible abnormalities of the control module based on its running status. In the case of redundant operation of the control module, the abnormal control module will redistribute the task after execution timeout, and other control modules will run normally.

[0152] 7. Control Module Execution History: In the above design, the data layer adjusts the variables to a stream to have the ability to record variable changes. Simultaneously, it reads "mod: <name>For tasks already confirmed in ":tasks", the execution history of the control module can be retrieved;

[0153] 8. Control Module Online Update: Upon receiving a stop signal, the control module will begin a graceful shutdown. First, the control module will stop reading "mod: <name>The control module is released after all read tasks have been completed or after a specified time has elapsed. After the control module stops, it can be replaced and restarted. The restart process is the same as the normal startup process.

[0154] During online updates, tasks may be read but not processed by any control module due to the control module stopping (to avoid repeated execution, a task will normally only be read once. If a control module reads a task but stops before it ends, the task may not be processed by any module). In this case, the guard module will periodically detect abnormal timeout tasks and restart and reassign these tasks to a new control module.

[0155] The control method provided in this embodiment changes the control module execution method from the traditional calling of the control module to active execution by the control module, realizing the distributed deployment of the control module. Compared with the existing technology, it improves the overall system performance and stability, makes the deployment method more flexible, and reduces the difficulty of network configuration, such as firewalls, DCOM, etc.

[0156] Since the control module only needs to complete the control algorithm and does not need to handle state transitions, the workload of developers can be reduced when designing and developing the control module compared to existing technologies.

[0157] Because different control modules are used in combination with the application layer, multiple control methods can be achieved, such as continuous control, sequential control, batch control, and even mixed mode control.

[0158] Because the control module is updated using a graceful stop method, this invention enables online updates of the control module compared to existing technologies, achieving updates without stopping the machine or production, thus ensuring the continuous stability of production operations.

[0159] In the description of this invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0160] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0161] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can mean that the first and second features are in direct contact, or that they are in indirect contact through an intermediate medium. Furthermore, "above," "over," and "on top" the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "beneath" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.

[0162] In the description of this specification, the terms "one embodiment," "some embodiments," "embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0163] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make modifications, alterations, substitutions and variations to the above embodiments within the scope of the present invention.< / name> < / name> < / name> < / name> < / name> < / name> < / id> < / name> < / id> < / name> < / name> < / name> < / name> < / id> < / id> < / name> < / name> < / name> < / id> < / name> < / id> < / id> < / id> < / id> < / id> < / name> < / name>

Claims

1. A control system, characterized in that, Used for automatic control in industrial production, including: The presentation layer is used to transmit the user identity information and the graphical configuration information edited by the user to the application layer after receiving the user identity information and the graphical configuration information. The graphical configuration information includes parameter information of industrial production materials, parameter information of the production process, and tag information of production equipment; The application layer is used to authenticate the user's permissions based on the user's identity information. If the authentication result is true, the graphical configuration information is sent to the algorithm layer. The algorithm layer is used to check and compile the graphical configuration information to obtain the corresponding control program; The data layer is used to create corresponding parameter data and task data chains according to the control program; The algorithm layer is also used to create all tasks in the task data chain based on the parameter data and the task data chain, and to trigger the corresponding production equipment to execute them.

2. The control system as described in claim 1, characterized in that, The data layer also includes: The information storage module is used to store the control program ID, control program header type, control program structure tree, control program header runtime information, control program type, control program configuration, control program entry point, control program variable name, control program running status, control module name, element ID in the control program, preceding element ID in the control program, following element ID in the control program and selection judgment conditions, parameter information of production equipment, and status and result information of manual processing. Among them, the control program variables include operation time variable information and material consumption variable information; The variable storage module is used to store the control system startup time, control system abnormal information, and variables of the control program; Among them, control program variables include user-built-in variables and user-defined variables; Built-in variables include those that control program execution time and program execution status; User-defined variables are created by the user and include material consumption, equipment uptime, number of logical loops, and intermediate variables.

3. The control system as described in claim 1, characterized in that, The task data chain includes multiple task data, each of which has its own pointer information, and adjacent task data are arranged sequentially based on the pointer information.

4. The control system as described in claim 3, characterized in that, The algorithm layer includes: The control module is used to create and trigger the corresponding production equipment to execute the first task of the task data chain according to the parameter data and the pointer information of the task data chain; after the first task is completed, it creates and triggers the corresponding production equipment to execute the second task according to the parameter data and the pointer information of the task data chain, until all tasks in the task data chain are completed; and after all tasks are completed, it reads and records all parameter data in the data layer. The running module is used to determine the abnormal situation that has occurred in the control module based on the running status of the control module when the control module crashes or deadlocks.

5. The control system as described in claim 1, characterized in that, The application layer includes: The gateway module is used to determine user permissions; The permissions module is used to manage user permissions; The encapsulation module is used to encapsulate the data in the data layer and algorithm layer, and to provide an interface for the presentation layer; The business module is used to check the compilation control program, monitor system anomalies, manage the control program, and read the control program's historical information.

6. The control system as described in claim 1, characterized in that, The presentation layer includes: The information receiving module is used to receive graphical configuration information edited by the user and transmit the graphical configuration information to the application layer; The information receiving module can be a client, browser, or mobile device; The information display module is used to show the progress of the control program during its operation; The information confirmation module is used to receive confirmation information from users for events that require manual confirmation.

7. A control method, characterized in that, The control method is implemented based on the control system described in any one of claims 1-6, and the control method includes: S1. After receiving the user identity information and the graphical configuration information edited by the user, the presentation layer transmits the user identity information and the graphical configuration information to the application layer. The graphical configuration information includes parameter information of industrial production materials, parameter information of the production process, and tag information of production equipment; S2. The application layer authenticates the user's permissions based on the user's identity information. If the authentication result is true, the graphical configuration information is sent to the algorithm layer. S3. The algorithm layer checks and compiles the graphical configuration information to obtain the corresponding control program; S4. The data layer creates corresponding parameter data and task data chains according to the control program; S5. The algorithm layer creates all tasks in the task data chain based on the parameter data and task data chain, and triggers the corresponding production equipment to execute them.

8. The control method as described in claim 7, characterized in that, The control method further includes: During the execution of the control program, the control system generates one or more control commands based on the execution status of the control program. The control commands include start, stop, pause, resume, and suspend; The generation of control commands is achieved by changing the running state of the control program in the program information unit.

9. The control method as described in claim 7, characterized in that, The control method further includes: During the operation of the control program, information on control markers added by the user on control program elements is received. The control markers include: skip marker, step skip marker, and pause marker. When the control program encounters a skip flag during execution, it skips the flagged control program element and continues to execute subsequent control program elements. When a jump mark is encountered during the execution of the control program, execution will start directly from another related control program element based on the information in the jump mark. When the control program encounters a pause marker during its operation, it will not modify the control program's running state and will not continue execution until the pause marker is removed.

10. The control method as described in claim 7, characterized in that, The control method further includes: updating the control module online upon receiving an update request from a user; The online update of the control module includes: The control module performs a graceful stop upon receiving a stop signal; Graceful stopping refers to completing the currently executing task after receiving a stop notification, and then stopping the process. After the control module stops, release the current control module and restart the new control module.