Method, system, device and medium for monitoring logic configuration of a distributed control system
By traversing each controller in a distributed control system to obtain the number of memory variables, function blocks, and intermediate variables, calculating margins, and visualizing the results, the problem of unreasonable resource utilization in configuration design is solved, thereby improving design efficiency and system reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-04
- Publication Date
- 2026-03-24
AI Technical Summary
In the configuration design of distributed control systems, engineers cannot keep track of the remaining system resources in real time, which leads to unreasonable design, low efficiency and high error probability, requiring readjustment.
By traversing each controller in the distributed control system, the number of memory variables, function blocks, and intermediate variables of each program organization unit is obtained, the margin is calculated, and the data is visualized so that engineers can monitor resource usage in real time.
It provides a method for real-time monitoring of controller resource usage, reducing design adjustment time, improving system security and reliability, avoiding design flaws caused by human factors, and ensuring stable system operation.
Smart Images

Figure CN117006476B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of distributed control systems and relates to a method, system, device and medium for monitoring the logic configuration of a distributed control system. Background Technology
[0002] For a specific distributed control system controller, its system resources have an upper limit. For example, a complete gas turbine control system can be divided into multiple subsystems such as a start-up control system, a speed control system, an acceleration control system, a temperature control system, a shutdown control system, and a manual control system. To achieve high reliability of the control system, the control functions of different systems, as well as those of the same system, need to be distributed among multiple controllers.
[0003] In designing the control configuration of a gas turbine, engineers must adhere to the principle of "distributed control, centralized management" in distributed control systems to ensure high reliability of the gas turbine control system. Currently, engineers designing distributed control systems cannot monitor the remaining system resources in real time and rely solely on their experience. This leads to the discovery of resource allocation inefficiencies after configuration, resulting in low efficiency and a high error rate. Consequently, reconfiguration is often necessary, wasting significant human and material resources. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, system, device and medium for monitoring the logic configuration of a distributed control system.
[0005] To achieve the above objectives, the present invention employs the following technical solution:
[0006] In a first aspect, the present invention provides a method for monitoring the logic configuration of a distributed control system, comprising:
[0007] The process iterates through each controller in the distributed control system and performs a first processing step on each controller. The first processing step includes: iterating through each task under the current controller and performing a second processing step on each task. The second processing step includes: iterating through each program organization unit under the current task and performing a third processing step on each program organization unit. The third processing step includes: obtaining the number of memory variables, the number of function blocks, and the number of intermediate variables of the current program organization unit.
[0008] Based on the number of memory variables and the upper limit of the number of memory variables in each program organization unit, the memory variable margin of each program organization unit is obtained; based on the number of function blocks and the upper limit of the number of function blocks in each program organization unit, the function block margin of each program organization unit is obtained; based on the number of intermediate variables in each program organization unit under each task, the number of intermediate variables in each task is obtained; and based on the number of intermediate variables and the upper limit of the number of intermediate variables in each task, the intermediate variable margin of each task is obtained.
[0009] The system provides a visual representation of the memory and functional block margins of each program organization unit, as well as the intermediate variable margins of each task.
[0010] Optional, also includes:
[0011] The number of memory variables and the number of function blocks of each controller are obtained based on the number of memory variables and the number of function blocks of each program organization unit in each controller.
[0012] Based on the number of memory variables and function blocks of each controller, as well as the upper limit of the number of memory variables and function blocks of each controller, the memory variable margin and function block margin of each controller are obtained.
[0013] The number of intermediate variables for each controller is obtained based on the number of intermediate variables for each task in each controller.
[0014] The intermediate variable margin of each controller is obtained based on the number of intermediate variables of each controller and the upper limit of the number of intermediate variables of each controller.
[0015] Based on the memory variable margin, function block margin, and intermediate variable margin of each controller, the load margin of each controller is obtained and visualized.
[0016] Optionally, obtaining the load margin of each controller based on the memory variable margin, function block margin, and intermediate variable margin of each controller includes: obtaining the load margin of each controller using the following formula based on the memory variable margin, function block margin, and intermediate variable margin of each controller:
[0017]
[0018] in, For the load margin of controller i, For the memory margin of controller i, For the function block margin of controller i, η1, η2, and η3 are the intermediate variable margins of controller i, and η1, η2, and η3 are the preset load calculation coefficients, 0≤η≤11, 0≤η2≤1, 0≤η3≤1, and η1+η2+η3=1.
[0019] Optionally, obtaining the memory variable margin of each program organization unit based on the number of memory variables and the upper limit of the number of memory variables includes: obtaining the memory variable margin of each program organization unit using the following formula based on the number of memory variables and the upper limit of the number of memory variables:
[0020]
[0021] in, MAX_MEMVAR is the memory variable margin of program organization unit k, MAX_MEMVAR is the upper limit of the number of memory variables in program organization unit k, and memVarNum is the number of memory variables in program organization unit k.
[0022] Based on the number of function blocks and the upper limit of the number of function blocks in each program organization unit, the function block margin of each program organization unit is obtained as follows: Based on the number of function blocks and the upper limit of the number of function blocks in each program organization unit, the function block margin of each program organization unit is obtained through the following formula:
[0023]
[0024] in, MAX_BLOCK is the functional block margin of program organization unit k, MAX_BLOCK is the upper limit of the number of functional blocks of program organization unit k, and blockNum is the number of functional blocks of program organization unit k.
[0025] The step of obtaining the intermediate variable margin for each task based on the number of intermediate variables and the upper limit of the number of intermediate variables for each task includes: obtaining the intermediate variable margin for each task using the following formula based on the number of intermediate variables and the upper limit of the number of intermediate variables for each task:
[0026]
[0027] in, MAX_MIDVAR represents the margin of intermediate variables for task j, MAX_MIDVAR represents the upper limit of the number of intermediate variables for task j, and midVarNum represents the number of intermediate variables for task j.
[0028] Optionally, the maximum number of memory variables in each program organization unit is 1024; the maximum number of function blocks in each program organization unit is 128; and the maximum number of intermediate variables in each task is Period*100, where Period is the number of cycles of the task.
[0029] Optional, also includes:
[0030] Based on the preset hierarchical strategy, the memory variable margin level and function block margin level of each program organization unit, as well as the intermediate variable margin level of each task, are obtained.
[0031] The system provides a visual representation of the memory variable margin level and function block margin level of each program organization unit, as well as a visual representation of the intermediate variable margin level of each task.
[0032] Optionally, the hierarchical strategy includes:
[0033] When the memory margin of the current program organization unit is ≤60%, the memory margin level of the current program organization unit is low; when 60% < memory margin of the current program organization unit is ≤85%, the memory margin level of the current program organization unit is medium; when the memory margin of the current program organization unit is >85%, the memory margin level of the current program organization unit is high.
[0034] When the functional block margin of the current program organization unit is ≤60%, the functional block margin level of the current program organization unit is low; when 60% < functional block margin of the current program organization unit is ≤85%, the functional block margin level of the current program organization unit is medium; when the functional block margin of the current program organization unit is >85%, the functional block margin level of the current program organization unit is high.
[0035] When the margin of intermediate variables in the current task is ≤60%, the margin level of intermediate variables in the current task is low; when 60% < the margin of intermediate variables in the current task is ≤85%, the margin level of intermediate variables in the current task is medium; when the margin of intermediate variables in the current task is >85%, the margin level of intermediate variables in the current task is high.
[0036] A second aspect of the present invention provides a distributed control system logic configuration monitoring system, comprising:
[0037] The data processing module is used to traverse each controller in the distributed control system and perform a first processing step on each controller. The first processing step includes: traversing each task under the current controller and performing a second processing step on each task. The second processing step includes: traversing each program organization unit under the current task and performing a third processing step on each program organization unit. The third processing step includes: obtaining the number of memory variables, the number of function blocks, and the number of intermediate variables of the current program organization unit.
[0038] The margin calculation module is used to obtain the memory variable margin of each program organization unit based on the number of memory variables and the upper limit of the number of memory variables; to obtain the function block margin of each program organization unit based on the number of function blocks and the upper limit of the number of function blocks; to obtain the number of intermediate variables of each task based on the number of intermediate variables of each program organization unit under each task; and to obtain the intermediate variable margin of each task based on the number of intermediate variables and the upper limit of the number of intermediate variables.
[0039] The display module is used to visually represent the memory variable margin and function block margin of each program organization unit, as well as the intermediate variable margin of each task.
[0040] In a third aspect, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps of the above-described distributed control system logic configuration monitoring method.
[0041] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, it implements the steps of the above-described distributed control system logic configuration monitoring method.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] This invention provides a distributed control system logic configuration monitoring method. It acquires the memory variable margin and function block margin of each program organization unit, as well as the intermediate variable margin of each task, as a basis for judging system resource occupancy. The method visualizes the memory variable margin and function block margin of each program organization unit, and the intermediate variable margin of each task. Memory variable margin measures memory usage within a program organization unit from the perspective of the computer's underlying storage medium; function block margin measures memory usage from the user application layer; and intermediate variable margin measures whether the primary and backup controllers of the distributed control system can synchronize data normally. This provides engineers with a way to monitor controller resource usage and the distribution of different subsystems within the controller in real time. It helps eliminate hidden design flaws during configuration design and avoids repeated adjustments and modifications. This significantly shortens configuration design time, ensures the configuration structure adheres to system design principles, improves the security and reliability of the entire distributed control system, and standardizes the distributed control design process, eliminating system design flaws caused by human factors and ensuring the safe and stable operation of the distributed control system. Attached Figure Description
[0044] Figure 1 This is a flowchart of the distributed control system logic configuration monitoring method according to an embodiment of the present invention.
[0045] Figure 2 This is a diagram illustrating a distributed control system logic configuration monitoring example according to an embodiment of the present invention.
[0046] Figure 3 This is a block diagram of the distributed control system logic configuration monitoring system according to an embodiment of the present invention. Detailed Implementation
[0047] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0048] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0049] The present invention will now be described in further detail with reference to the accompanying drawings:
[0050] See Figure 1 In one embodiment of the present invention, a distributed control system logic configuration monitoring method is provided, which provides engineers with a way to grasp the real-time use of controller resources and the distribution of different subsystems in the controller. This effectively avoids the shortcomings of relying solely on the engineer's experience during the configuration design process, which leads to very low configuration design efficiency and a high probability of errors.
[0051] Specifically, the distributed control system logic configuration monitoring method includes the following steps:
[0052] S1: Traverse each controller in the distributed control system and perform the first processing step on each controller.
[0053] The first processing step includes: traversing each task under the current controller and performing the second processing step on each task; the second processing step includes: traversing each program organization unit under the current task and performing the third processing step on each program organization unit; the third processing step includes: obtaining the number of memory variables, the number of function blocks, and the number of intermediate variables of the current program organization unit.
[0054] S2: Based on the number of memory variables in each program organization unit and the upper limit of the number of memory variables, obtain the memory variable margin of each program organization unit; based on the number of function blocks in each program organization unit and the upper limit of the number of function blocks, obtain the function block margin of each program organization unit; based on the number of intermediate variables in each program organization unit under each task, obtain the number of intermediate variables in each task; and based on the number of intermediate variables in each task and the upper limit of the number of intermediate variables, obtain the intermediate variable margin of each task.
[0055] S3: Visualizes the memory variable margin and function block margin of each program organization unit, as well as the intermediate variable margin of each task.
[0056] This invention provides a distributed control system logic configuration monitoring method. It acquires the memory variable margin and function block margin of each program organization unit, as well as the intermediate variable margin of each task, as a basis for judging system resource occupancy. The method visualizes the memory variable margin and function block margin of each program organization unit, and the intermediate variable margin of each task. Memory variable margin measures memory usage within a program organization unit from the perspective of the computer's underlying storage medium; function block margin measures memory usage from the user application layer; and intermediate variable margin measures whether the primary and backup controllers of the distributed control system can synchronize data normally. This provides engineers with a way to monitor controller resource usage and the distribution of different subsystems within the controller in real time. It helps eliminate hidden design flaws during configuration design and avoids repeated adjustments and modifications. This significantly shortens configuration design time, ensures the configuration structure adheres to system design principles, improves the security and reliability of the entire distributed control system, and standardizes the distributed control design process, eliminating system design flaws caused by human factors and ensuring the safe and stable operation of the distributed control system.
[0057] In one possible implementation, the distributed control system logic configuration monitoring method further includes:
[0058] Based on the number of memory variables and function blocks in each program organization unit of each controller, the number of memory variables and function blocks of each controller are obtained; based on the number of memory variables and function blocks of each controller, as well as the upper limit of the number of memory variables and function blocks of each controller, the memory variable margin and function block margin of each controller are obtained; based on the number of intermediate variables in each task of each controller, the number of intermediate variables of each controller is obtained; based on the number of intermediate variables and the upper limit of the number of intermediate variables of each controller, the intermediate variable margin of each controller is obtained; based on the memory variable margin, function block margin, and intermediate variable margin of each controller, the load margin of each controller is obtained and visualized.
[0059] Specifically, during the configuration design process, the larger the load margin of each controller, the lower the load on the controller will be during configuration operation. Engineers can refer to this indicator when designing the configuration.
[0060] In one possible implementation, the distributed control system logic configuration monitoring method of the present invention is illustrated using a gas turbine control system in a distributed control system as an example.
[0061] Specifically, after completing the design of a subsystem of the gas turbine control system, the Program Organization Unit (POU) page statistics function can be selected at the entire project node (including all controllers of the gas turbine control system). Each POU has a limit on the number of function blocks and the amount of memory. Each task has a limit on intermediate variables. The number of function blocks and the number of memory variables are configurable resources of the controller and have upper limits. Intermediate variables are data that needs to be synchronized between the primary and standby controllers. To achieve synchronization between the primary and standby controllers, the number of intermediate variables also has an upper limit.
[0062] The distributed control system logic configuration monitoring method includes the following detailed steps:
[0063] Step 1: The number of controllers (DPU, Distributed Processing Unit) in the gas turbine control system is N. Let the controller number i = 0, and traverse all controllers in the entire gas turbine control system.
[0064] Step 2: Traverse all tasks under DPU[i]. Assume there are M tasks under DPU[i], and let the task number j = 0.
[0065] Step 3: Iterate through all POUs under Task[j]. Assume the total number of POUs under the task is K. Let the POU number k = 0, and let the initial value of the number of intermediate variables in Task[j] be Task[j].midVarNum = 0.
[0066] Step 4: Check if POU[k] is open. If not, read the POU resource file, verify the validity of the file content, and read the file into memory. If the resource file has been read and verified, proceed directly to Step 5.
[0067] Step 5: Set the initial value of the memory variable POU[k] to POU[k].memVarNum = 0, and set the initial value of the intermediate variable of POU[k] to POU[k].midVarNum = 0.
[0068] Traverse all function blocks within the POU according to the operation sequence of the function blocks, obtain the memory variables of the function blocks, set the number of memory variables of the function block as MemVarCount, the number of inputs as InputVarCount, the number of outputs as OutputVarCount, and the number of parameters as ParaVarCount. Then the number of memory variables MemVarCount = InputVarCount + OutputVarCount + ParaVarCount. The number of memory variables corresponding to POU[k] is POU[k].memVarNum = POU[k].memVarNum + MemVarCount.
[0069] Step 6: Traverse all function blocks in POU[k] according to the execution sequence of the function blocks, obtain the number of intermediate variables MidVarCount of the function blocks, and calculate the number of intermediate variables POU[k].midVarNum in POU[k] as POU[k].midVarNum = POU[k].midVarNum + MidVarCount.
[0070] Step 7: Record the number of function blocks POU[k].blockNum in POU[k].
[0071] Step 8: Save the number of intermediate variables under the task:
[0072] Task[j].midVarNum = Task[j].midVarNum + POU[k].midVarNum.
[0073] Step 9: Execute k = k + 1. If k < K, return to Step 4; otherwise, execute Step 10.
[0074] Step 10: Execute j = j + ". If j < M, return to Step 3; otherwise, execute Step 11.
[0075] Step 11: Execute i = i + 1. If i < N, return to Step 2; otherwise, execute Step 12.
[0076] Step 12: Process the data obtained in Steps 1 to 12. In a distributed control system, to ensure that the controller CPU operates within the allowable load range, the system has specific limitations on each type of resource.
[0077] In this embodiment, the gas turbine control system limits the number of functional blocks within the POU to MAX_BLOCK, with a value of 128. The limit for POU memory variables is MAX_MEMVAR, with a value of 1024. The maximum intermediate value for each task is MAX_MIDVAR, and the value of this intermediate variable is related to the number of task cycles: MAX_MIDVAR = Period * 100, where Period represents the number of task cycles.
[0078] Step 13: Define three metrics (memory variable margin, function block margin, and intermediate variable margin) for resources in the gas turbine control system as the basis for judging system resource usage.
[0079] Step 14: Based on the number of memory variables and the upper limit of the number of memory variables in each program organization unit, obtain the memory variable margin of each program organization unit using the following formula:
[0080]
[0081] in, MAX_MEMVAR represents the memory variable margin of program organization unit k, MAX_MEMVAR represents the upper limit of the number of memory variables in program organization unit k, and memVarNum represents the number of memory variables in program organization unit k.
[0082] Memory margin is an indicator that measures the current memory usage in a Point of Unit (POU) from the perspective of the computer's underlying storage media.
[0083] Step 15: Based on the number of function blocks and the upper limit of the number of function blocks in each program organization unit, obtain the function block margin of each program organization unit using the following formula:
[0084]
[0085] in, MAX_BLOCK represents the functional block margin of program organization unit k, MAX_BLOCK represents the upper limit of the number of functional blocks in program organization unit k, and blockNum represents the number of functional blocks in program organization unit k.
[0086] Internal variables are metrics that measure the current memory usage in the POU from the perspective of the user application layer.
[0087] Step 16: Based on the number of intermediate variables and the upper limit of the number of intermediate variables for each task, obtain the intermediate variable margin for each task using the following formula:
[0088]
[0089] in, MAX_MIDVAR represents the margin of intermediate variables for task j, MAX_MIDVAR represents the upper limit of the number of intermediate variables for task j, and midVarNum represents the number of intermediate variables for task j.
[0090] Intermediate variables are indicators that measure whether the primary and backup controllers of the system can synchronize data normally. During the configuration design process, the magnitude of this indicator should be monitored in real time.
[0091] Step 17: Traverse all POUs under the gas turbine control system and perform level labeling on the results of each indicator. The processing principle is as follows:
[0092] When the memory margin of the current program organization unit is ≤60%, the memory margin level of the current program organization unit is low (MEM_LOW); when 60% < memory margin of the current program organization unit is ≤85%, the memory margin level of the current program organization unit is medium (MEM_MID); when the memory margin of the current program organization unit is >85%, the memory margin level of the current program organization unit is high (MEM_HIGH).
[0093] When the function block margin of the current program organization unit is ≤60%, the function block margin level of the current program organization unit is low (BLC_LOW); when 60% < function block margin of the current program organization unit is ≤85%, the function block margin level of the current program organization unit is medium (BLC_MID); when the function block margin of the current program organization unit is >85%, the function block margin level of the current program organization unit is high (BLC_HIGH).
[0094] Step 18: Iterate through all Tasks under the gas turbine control system and process the intermediate variable margins of the Tasks. When the intermediate variable margin of the current task is ≤60%, the intermediate variable margin level of the current task is low MIV_LOW; when 60% < intermediate variable margin of the current task is ≤85%, the intermediate variable margin level of the current task is medium MIV_MID; when the intermediate variable margin of the current task is >85%, the intermediate variable margin level of the current task is high MIV_HIGH.
[0095] Step 19: Based on the number of memory variables and function blocks in each program organization unit of each controller, obtain the number of memory variables and function blocks in each controller; based on the number of memory variables and function blocks in each controller, as well as the upper limit of the number of memory variables and function blocks in each controller, obtain the memory variable margin and function block margin of each controller; based on the number of intermediate variables in each task of each controller, obtain the number of intermediate variables in each controller; based on the number of intermediate variables in each controller and the upper limit of the number of intermediate variables in each controller, obtain the intermediate variable margin of each controller.
[0096] Step 20: Based on the memory variable margin, function block margin, and intermediate variable margin of each controller, obtain the load margin of each controller using the following formula:
[0097]
[0098] in, For the load margin of controller i, For the memory margin of controller i, For the function block margin of controller i, Here, η1, η2, and η3 represent the intermediate variable margin for controller i, and η1, η2, and η3 are preset load calculation coefficients, where 0 ≤ η ≤ 11, 0 ≤ η2 ≤ 1, 0 ≤ η3 ≤ 1, and η1 + η2 + η3 = 1. During configuration design, a smaller load margin for controller i indicates a higher load on the controller during runtime.
[0099] Step 21: Display the margin indicators for POU, Task, and controller load margin. See [link / reference] Figure 2 When the memory margin is MEM_LOW, it is displayed in green; when the memory margin is MEM_MID, it is displayed in orange; when the memory margin is MEM_HIGH, it is displayed in red. The display method for function block margin and task margin is similar.
[0100] The following are embodiments of the apparatus of the present invention, which can be used to execute embodiments of the method of the present invention. For details not disclosed in the apparatus embodiments, please refer to the embodiments of the method of the present invention.
[0101] See Figure 3 In another embodiment of the present invention, a distributed control system logic configuration monitoring system is provided, which can be used to implement the above-mentioned distributed control system logic configuration monitoring method. Specifically, the distributed control system logic configuration monitoring system includes a data processing module, a margin calculation module, and a display module.
[0102] The data processing module is used to traverse each controller in the distributed control system and perform a first processing step on each controller. The first processing step includes: traversing each task under the current controller and performing a second processing step on each task. The second processing step includes: traversing each program organization unit under the current task and performing a third processing step on each program organization unit. The third processing step includes: obtaining the number of memory variables, the number of function blocks, and the number of intermediate variables of the current program organization unit. The margin calculation module is used to obtain the memory variable margin of each program organization unit based on the number of memory variables and the upper limit of the number of memory variables. It also obtains the function block margin of each program organization unit based on the number of function blocks and the upper limit of the number of function blocks. Furthermore, it obtains the number of intermediate variables of each task based on the number of intermediate variables of each program organization unit under each task. Finally, it obtains the intermediate variable margin of each task based on the number of intermediate variables and the upper limit of the number of intermediate variables. The display module is used to visually display the memory variable margin and function block margin of each program organization unit, as well as the intermediate variable margin of each task.
[0103] In one possible implementation, the margin calculation module is further configured to: obtain the number of memory variables and function blocks of each controller based on the number of memory variables and function blocks of each program organization unit in each controller; obtain the memory variable margin and function block margin of each controller based on the number of memory variables and function blocks of each controller, as well as the upper limit of the number of memory variables and function blocks of each controller; obtain the number of intermediate variables of each controller based on the number of intermediate variables of each task in each controller; obtain the intermediate variable margin of each controller based on the number of intermediate variables of each controller and the upper limit of the number of intermediate variables of each controller; and obtain the load margin of each controller based on the memory variable margin, function block margin, and intermediate variable margin of each controller. The display module is further configured to visually display the load margin of each controller.
[0104] All relevant content of each step involved in the aforementioned embodiments of the distributed control system logic configuration monitoring method can be referenced to the functional description of the corresponding functional module of the distributed control system logic configuration monitoring system in the embodiments of the present invention, and will not be repeated here.
[0105] The module division in this embodiment of the invention is illustrative and represents only one logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional modules in the various embodiments of the invention can be integrated into a single processor, exist as separate physical entities, or be integrated into a single module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0106] In another embodiment of the present invention, a computer device is provided, comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions from the computer storage medium to achieve a corresponding method flow or corresponding function. The processor described in this embodiment of the present invention can be used for the operation of a distributed control system logic configuration monitoring method.
[0107] In another embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the distributed control system logic configuration monitoring method in the above embodiments.
[0108] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0109] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0110] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0111] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for monitoring the logic configuration of a distributed control system, characterized in that, include: The process iterates through each controller in the distributed control system and performs a first processing step on each controller. The first processing step includes: iterating through each task under the current controller and performing a second processing step on each task. The second processing step includes: iterating through each program organization unit under the current task and performing a third processing step on each program organization unit. The third processing step includes: obtaining the number of memory variables, the number of function blocks, and the number of intermediate variables of the current program organization unit. Based on the number of memory variables and the upper limit of the number of memory variables in each program organization unit, the memory variable margin of each program organization unit is obtained by the following formula: in, As a program organization unit k Memory variable margin, As a program organization unit k The upper limit of the number of memory variables, As a program organization unit k The number of memory variables; Based on the number of function blocks and the upper limit of the number of function blocks in each program organization unit, the function block margin of each program organization unit is obtained as follows: Based on the number of function blocks and the upper limit of the number of function blocks in each program organization unit, the function block margin of each program organization unit is obtained through the following formula: in, As a program organization unit k Functional block margin, As a program organization unit k The maximum number of function blocks. As a program organization unit k The number of function blocks; Based on the number of intermediate variables and the upper limit of the number of intermediate variables for each task, the intermediate variable margin for each task is obtained as follows: The intermediate variable margin for each task is obtained using the following formula: in, For the task j The margin of intermediate variables, For the task j The upper limit of the number of intermediate variables, For the task j The number of intermediate variables; Based on the number of function blocks in each program organization unit and the upper limit of the number of function blocks, the function block margin of each program organization unit is obtained; based on the number of intermediate variables in each program organization unit under each task, the number of intermediate variables in each task is obtained; and based on the number of intermediate variables in each task and the upper limit of the number of intermediate variables, the intermediate variable margin of each task is obtained. Visualize the memory variable margin and function block margin of each program organization unit, as well as the intermediate variable margin of each task; Also includes: The number of memory variables and the number of function blocks of each controller are obtained based on the number of memory variables and the number of function blocks of each program organization unit in each controller. Based on the number of memory variables and function blocks of each controller, as well as the upper limit of the number of memory variables and function blocks of each controller, the memory variable margin and function block margin of each controller are obtained. The number of intermediate variables for each controller is obtained based on the number of intermediate variables for each task in each controller. The intermediate variable margin of each controller is obtained based on the number of intermediate variables of each controller and the upper limit of the number of intermediate variables of each controller. Based on the memory variable margin, function block margin, and intermediate variable margin of each controller, the load margin of each controller is obtained and visualized.
2. The distributed control system logic configuration monitoring method according to claim 1, characterized in that, The process of obtaining the load margin of each controller based on its memory variable margin, function block margin, and intermediate variable margin includes: obtaining the load margin of each controller using the following formula based on the memory variable margin, function block margin, and intermediate variable margin of each controller: in, For controller i The load margin, For controller i Memory variable margin, For controller i Functional block margin, For controller i The margin of intermediate variables, , and The preset load calculation factor, , , , .
3. The distributed control system logic configuration monitoring method according to claim 1, characterized in that, The maximum number of memory variables in each program organization unit is 1024; the maximum number of function blocks in each program organization unit is 128; and the maximum number of intermediate variables in each task is... , This represents the number of cycles in the task.
4. The distributed control system logic configuration monitoring method according to claim 1, characterized in that, Also includes: Based on the preset hierarchical strategy, the memory variable margin level and function block margin level of each program organization unit, as well as the intermediate variable margin level of each task, are obtained. The system provides a visual representation of the memory variable margin level and function block margin level of each program organization unit, as well as a visual representation of the intermediate variable margin level of each task.
5. The distributed control system logic configuration monitoring method according to claim 4, characterized in that, The hierarchical strategy includes: When the memory margin of the current program organization unit is ≤60%, the memory margin level of the current program organization unit is low; when 60% < memory margin of the current program organization unit is ≤85%, the memory margin level of the current program organization unit is medium; when the memory margin of the current program organization unit is >85%, the memory margin level of the current program organization unit is high. When the functional block margin of the current program organization unit is ≤60%, the functional block margin level of the current program organization unit is low; when 60% < functional block margin of the current program organization unit is ≤85%, the functional block margin level of the current program organization unit is medium; when the functional block margin of the current program organization unit is >85%, the functional block margin level of the current program organization unit is high. When the margin of intermediate variables in the current task is ≤60%, the margin level of intermediate variables in the current task is low; when 60% < the margin of intermediate variables in the current task is ≤85%, the margin level of intermediate variables in the current task is medium; when the margin of intermediate variables in the current task is >85%, the margin level of intermediate variables in the current task is high.
6. A distributed control system logic configuration monitoring system based on the distributed control system logic configuration monitoring method of claim 1, characterized in that, include: The data processing module is used to traverse each controller in the distributed control system and perform a first processing step on each controller. The first processing step includes: traversing each task under the current controller and performing a second processing step on each task. The second processing step includes: traversing each program organization unit under the current task and performing a third processing step on each program organization unit. The third processing step includes: obtaining the number of memory variables, the number of function blocks, and the number of intermediate variables of the current program organization unit. The margin calculation module is used to obtain the memory variable margin of each program organization unit based on the number of memory variables and the upper limit of the number of memory variables; to obtain the function block margin of each program organization unit based on the number of function blocks and the upper limit of the number of function blocks; to obtain the number of intermediate variables of each task based on the number of intermediate variables of each program organization unit under each task; and to obtain the intermediate variable margin of each task based on the number of intermediate variables and the upper limit of the number of intermediate variables. The display module is used to visually represent the memory variable margin and function block margin of each program organization unit, as well as the intermediate variable margin of each task.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the distributed control system logic configuration monitoring method as described in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the distributed control system logic configuration monitoring method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Off-line configuration comparison method and system for distributed control system
CN113778038A