Method for quickly and automatically positioning DCS (Distributed Control System) control logic

By using hash table matching and configuration page logic diagram drawing, the algorithm module in the distributed control system can be quickly and automatically located, which solves the problem of difficult location caused by the dispersion of subsystems and improves analysis efficiency and query capability.

CN120802883APending Publication Date: 2025-10-17NANJING GUODIAN NANZI WEIMEIDE AUTOMATION CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511126443.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-12
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

In a distributed control system, subsystems are scattered across different control units, making it difficult to quickly locate the control logic, affecting the efficiency of accident analysis and equipment maintenance.

Method used

By matching the label name and description information of the algorithm module using a hash table, the algorithm module's graphical elements are drawn, and the system automatically navigates to the corresponding configuration page logic diagram, enabling rapid location of the algorithm module.

Benefits of technology

It improves the query efficiency of control logic, reduces the dependence on configuration information, supports complex query requirements, and realizes comprehensive analysis based on logical relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120802883A_ABST
    Figure CN120802883A_ABST
Patent Text Reader

Abstract

The invention discloses a DCS (Distributed Control System) control logic rapid automatic positioning method, which comprises the following steps: firstly, finding a corresponding algorithm module, finding a controller where the algorithm module is located according to the algorithm module, reading all configuration page information from the controller, and drawing each algorithm module in a configuration page view and an algorithm module primitive of a corresponding reference relationship; all algorithm module information in the configuration page is read, a configuration page logic diagram is drawn, and the algorithm modules are automatically positioned according to the input matching query algorithm modules; automatically jumping to the configuration page where the algorithm module corresponding to the reference is located according to the reference label which is drawn at the pin in the algorithm module primitive and contains the reference information, drawing a jump logic diagram in the configuration page, and selecting the algorithm module corresponding to the reference information in the jump logic diagram. According to the method, the configuration page logic diagram is automatically drawn according to the configuration page information, logic jump and automatic positioning of the algorithm module are realized according to the configuration page logic diagram, and the query efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of control logic positioning, in particular to a method for quickly and automatically positioning DCS control logic. BACKGROUND

[0002] A distributed control system is a new generation of instrument control system based on microprocessors, which adopts the design principle of decentralized control function, centralized display operation, and comprehensive coordination. It is also called DCS (Distributed Control System). As a general process control platform, the distributed control system plays a key role in the operation of industrial process systems. Currently, the common application needs are that when power plant operators need to switch from monitoring pictures, alarm systems and other software to corresponding logic diagrams for logic analysis. Taking a 1000MW unit DCS as an example, there are about 15,000 to 20,000 tag names for this type of unit. When an accident occurs in the power plant, it is difficult for maintenance personnel to quickly locate the control logic configuration of the equipment through detailed tag names. In addition, for accident analysis, when a device moves abnormally, a comprehensive logic analysis of the entire device system is often required. For example, when a primary fan fails, a comprehensive analysis of the drive motor, moving blade adjustment, and lubricating oil system of the primary fan is often required. However, when designing the control logic of the controlled device, in order to improve the reliability of the control system, the above-mentioned subsystems are dispersed in different control units, which affects the quick positioning of the control logic.

[0003] Therefore, we designed a method for quickly and automatically positioning DCS control logic to solve the above problems. SUMMARY

[0004] The purpose of the present application is to solve the problem of the prior art that when designing the control logic of the controlled device, the subsystems are dispersed in different control units, which affects the quick positioning of the control logic. A method for quickly and automatically positioning DCS control logic is proposed, which matches the input conditions (such as tag names of algorithm modules or description information of algorithm modules), draws algorithm module graph elements, and automatically switches to the configuration page logic diagram where the corresponding algorithm module is located by selecting the reference tag of the algorithm module graph element, and quickly locates the referenced algorithm module.

[0005] In order to achieve the above purpose, the present application adopts the following technical scheme: A method for quickly and automatically positioning DCS control logic, characterized in that it comprises the following steps: Step S1, the system finds the corresponding algorithm module according to the tag name of the input algorithm module or the description information of the algorithm module; Step S2, according to the algorithm module, find the controller where the algorithm module is located, and read all the configuration page information from the controller, draw the algorithm module graph element of each algorithm module and the corresponding reference relationship in the configuration page view; Step S3, read all the algorithm module information in the configuration page, draw the configuration page logic diagram of each algorithm module and the corresponding reference relationship in the configuration page view; Based on the configuration page logic diagram, according to the input matching query algorithm module, automatically locate the algorithm module; Step S4, according to the pin in the algorithm module graph element, draw the reference label containing reference information, automatically jump to the configuration page where the corresponding algorithm module is located according to the reference label, and draw the jump logic diagram in the configuration page, select the algorithm module corresponding to the reference information in the jump logic diagram.

[0006] The further preferred scheme of the present application, step S1, the tag name of the algorithm module is the key of the hash table, recorded as tagname, and the description information of the algorithm module is the value of the hash table, recorded as description value, the set of the tag name and the description information of the algorithm module in all controllers is established, and the tag name and the description information of all algorithm modules are stored in the key-value pair in the hash table hash<tagname, description>; The system finds the corresponding algorithm module from the hash table according to the input algorithm module tag name or algorithm module description information, and uses the following method: Traverse the hash table, take out each tagname or description value in the hash table, and perform string fuzzy matching with the input query condition of the system, find the corresponding algorithm module through the algorithm module tag name or algorithm module description information.

[0007] The further preferred scheme of the present application, step S2, according to the algorithm module, find the controller where the algorithm module is located, and read all the configuration page information from the controller, including the following contents: According to the algorithm module tag name, find the controller where the algorithm module is located, read the handle value svc_handle of the algorithm module and the handle value svc_paren_thandle of the configuration page where the algorithm module is located from the controller where the algorithm module is located, and use the structure Diagram to store each configuration page information, and the structure Diagram is defined as follows: diagram_tagname is the tag name of the configuration page, diagram_description is the description of the configuration page, diagram_handle is the handle number of the configuration page, and diagram_parent_handle is the handle value of the parent node to which the configuration page belongs; Save all the configuration page information read in the hash table diagram_hash<diagram_handle, diagram>, the key value of the hash table is diagram_handle, and the value of the hash table is the Diagram object.

[0008] Further preferably, based on reading all the configuration page information from the controller where the algorithm module is located, draw the algorithm module graph element of each algorithm module and the corresponding reference relationship in the configuration page view, the process is as follows: Traverse the hash table diagram_hash<diagram_handle, diagram>, take out the configuration page handle number diagram_hash[i]->diagram_handle in the i-th hash table, judge whether the algorithm module corresponds to the configuration page diagram_hash[i]->diagram and the handle value svc_parent_handle of the configuration page where the algorithm module is located are the same, if they are the same, find the configuration page diagram_hash[i]->diagram corresponding to the input algorithm module; Read all the algorithm module and algorithm module pin reference information in the configuration page diagram_hash[i]->diagram from the controller, according to the read algorithm module and algorithm module pin reference information, draw the algorithm module graph element of each algorithm module and the mutual reference relationship between the algorithm modules in the configuration page view.

[0009] Further preferably, in step S3, read all the algorithm module information in the configuration page, including: Read all the algorithm module information in the configuration page from the controller, represented by the Block structure, display the coordinates of the algorithm module, the type of the algorithm module in the visual configuration page view; According to the read algorithm module information, create the representation of the algorithm module graph element through the type of the algorithm module svc_type, represented by Block_Element; use the x-axis coordinate value svc_x of the algorithm module and the y-axis coordinate value svc_y of the algorithm module to represent the coordinates of the algorithm module graph element Block_Element in the configuration page view, display the label name svc_tagname information of the algorithm module in the algorithm module graph element; Store all the algorithm module information in a configuration page in the hash table Block_Hash<svc_handle, Block>, find the algorithm module information according to the handle number svc_handle of the algorithm module; The algorithm module information and the algorithm module graph element information are stored in a hash table Block_Element_Hash<Block, Element>, and the algorithm module graph element is searched according to the algorithm module information.

[0010] Preferably, the reading of all the algorithm module information in the configuration page comprises: The reference information of all the algorithm module input and output pins in the configuration page is read, and the reference information of each algorithm module pin is represented by a structure body Attr_ref, including the handle number of the algorithm module, the handle of the configuration page to which the algorithm module belongs, the attribute name of the algorithm module, and the reference information of the algorithm module pin. The reference information of the algorithm module pin is stored in a linked list, and if the algorithm module pin has no reference information, the linked list is empty; the reference information of an algorithm module pin is represented by a structure body Svc_refinfo, and the definition of the structure body Svc_refinfo is as follows: ref_svc_handle represents the handle of the algorithm module represented by the reference; ref_svc_parent represents the handle of the configuration page in which the algorithm module represented by the reference is located; ref_string represents the reference information of the algorithm module pin; The reference information of all the algorithm module pins in the configuration page is stored in a linked list Attr_List<Attr_ref>.

[0011] Preferably, according to the linked list Attr_List<Attr_ref>, a configuration page logic diagram of each algorithm module and the corresponding reference relationship in the configuration page view is automatically drawn, and the process is as follows: The i-th structure body Attr_ref object in the linked list Attr_List<Attr_ref> is taken out, where i is in the range of 0 to the number M of Attr_ref contained in the linked list Attr_List<Attr_ref>, and is marked as Attr_List[i]; According to Attr_List[i], the handle value Attr_List[i]->svc_handle of the algorithm module corresponding to the algorithm module pin, the handle Attr_List[i]->svc_parent_handle of the configuration page in which the algorithm module is located, and the reference information Attr_List[i]->Ref_List<Svc_refinfo> of the algorithm module pin are taken out; Traverse the reference information of the algorithm module pin in the linked list Attr_List[i]->Ref_List<Svc_refinfo>, take out the jth structure body Svc_refinfo object in the linked list, represented by Attr_List[i]->Ref_List[j], where j ranges from 0 to the number N of structure bodies Svc_refinfo contained in the linked list Attr_List[i]->Ref_List<Svc_refinfo>; Traverse the linked list Attr_List[i]->Ref_List[j], take out the jth reference in the linked list, and take out the configuration page handle Attr_List[i]->Ref_List[j]->ref_svc_parent where the algorithm module represented by the reference is located and the handle Attr_List[i]->Ref_List[j]->ref_svc_handle of the algorithm module represented by the reference; Determine whether the handle Attr_List[i]->Ref_List[j]->ref_svc_parent of the algorithm module represented by the jth reference taken out is the same as the configuration page handle Attr_List[i]->svc_parent_handle of the algorithm module; If the two values are the same, it means that the algorithm module and the algorithm module corresponding to the algorithm module pin are in the same configuration page, the corresponding algorithm module information is found in the hash table Block_Hash<svc_handle, Block> according to the handle Attr_List[i]->Ref_List[j]->ref_svc_handle of the algorithm module represented by the reference, the corresponding algorithm module graph element is found in the hash table Block_Element_Hash according to the algorithm module information, and the two algorithm modules are connected by a wire in the configuration page. If the two values are different, it means that the algorithm module and the algorithm module corresponding to the algorithm module pin are in different configuration pages, the algorithm module information is found in the hash table Block_Hash<svc_handle, Block> according to the algorithm module Attr_List[i]->svc_handle, the algorithm module graph element is found in the hash table Block_Element_Hash according to the algorithm module information, and the reference label containing the reference information is drawn at the pin in the algorithm module graph element.

[0012] Further preferably, based on the configuration page logical diagram, the algorithm module is automatically located according to the input matching query algorithm module, including: According to the input matching query algorithm module, the query algorithm module in the configuration page logical diagram is matched, and the Attr_List[i]->svc_handle obtained by traversal is matched with the handle value svc_handle of the input query algorithm module. If the two are equal, the algorithm module element represented by Attr_List[i]->svc_handle is the algorithm module element queried by the input, and the algorithm module element is selected in the configuration page logical diagram.

[0013] Further preferably, in step S4, the algorithm module reference information selected in the configuration page logical diagram is automatically jumped to the configuration page where the corresponding algorithm module is located, and a jump logical diagram is automatically generated in the configuration page. The algorithm module corresponding to the reference information is selected in the jump logical diagram, and the process is as follows: Click the reference tag containing reference information drawn in the pin of the algorithm module element to jump to the configuration page where the algorithm module displayed in the reference tag is located, and draw a jump logical diagram; Click the tag of the algorithm module pin in the jump logical diagram to obtain the current algorithm module reference information Svc_ref_info, and reference the configuration page handle ref_svc_parent where the algorithm module is located according to the reference information Svc_ref_info. According to the reference algorithm module in the configuration page handle ref_svc_parent in the hash table diagram_hash, the configuration page is matched, the hash table diagram_hash is traversed, the i-th configuration page handle number diagram_hash[i]->diagram_handle of the hash table diagram_hash is taken out, and it is judged whether the i-th configuration page handle number diagram_hash[i]->diagram_handle is the same as the reference algorithm module in the configuration page handle ref_svc_parent. If the two values are the same, there is no need to read the configuration page information, and the algorithm module is automatically positioned; if the two values are different, the configuration page information needs to be read, and the algorithm module is automatically positioned.

[0014] Further preferably, the system draws a configuration page tree diagram node according to all the configuration page information read from the controller, and the steps are as follows: Traverse the configuration page hash table diagram_hash<diagram_handle, Diagram> in the controller, and take out the configuration page handle value diagram_handle in the i-th configuration page Diagram object in the hash table, where i takes a value from 0 to N-1, the number of Diagram elements contained in the hash table. The handle value diagram_parent_handle of the parent node to which the configuration page belongs in the jth configuration page Diagram object in the configuration page hash table diagram_hash in the traversal controller is taken out, j ranges from i+1 to N, and a Diagram set in which the handle value diagram_parent_handle of the parent node to which the configuration page belongs in all nodes is the same as the handle value diagram_handle of the configuration page is found, and the Diagram set is used as List <diagram>The node is expressed as a child node of the i th node, and the relationship between the parent node and the child node is displayed by a configuration page tree diagram. Click the configuration page tree diagram node to draw a configuration page logic diagram, and locate the algorithm module through the configuration page logic diagram positioning algorithm module.

[0015] Compared with the prior art, the beneficial effects of the present application are: the present application automatically matches the configuration of the controller according to the input conditions, on the one hand, reduces the dependence on pre-configuration of configuration information, and on the other hand, can be linked with a third-party system, obtains configuration page information from the controller, automatically draws algorithm module graphics according to the configuration page information, automatically draws the configuration page logic diagram of the algorithm module according to the read algorithm module information, realizes logical jump and automatic positioning of the algorithm module according to the configuration page logic diagram, improves the efficiency of the query, meets the more complex query requirements of the user, and can realize comprehensive analysis based on logical relationship. BRIEF DESCRIPTION OF DRAWINGS

[0016] Figure 1 A whole flowchart of a DCS control logic fast automatic positioning method is provided for the present application. Figure 2 A flowchart of logical jump in a DCS control logic fast automatic positioning method is provided for the present application. DETAILED DESCRIPTION

[0017] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments.

[0018] A DCS control logic fast automatic positioning method is provided for the present application. Figure 1 The method mainly includes the following steps: Step S1, the system finds the corresponding algorithm module according to the tag name or the description information of the algorithm module input by the user.

[0019] Step S2, the algorithm module is found according to the algorithm module, the controller where the algorithm module is located is found, all configuration page information is read from the controller, and the algorithm module graphics of each algorithm module and the corresponding reference relationship in the configuration page view are drawn.

[0020] Step S3, all algorithm module information in the configuration page is read, and the configuration page logic diagram of each algorithm module and the corresponding reference relationship in the configuration page view is drawn. Based on the configuration page logic diagram, the algorithm module is automatically positioned according to the input matching query algorithm module.

[0021] Step S4, according to the pin in the algorithm module graph element drawing contains reference information reference label, according to the reference label automatically jump to the corresponding algorithm module reference configuration page and draw jump logic diagram in the configuration page, in the jump logic diagram selected algorithm module corresponding to the reference information.

[0022] Specifically, in step S1, the tag name of the algorithm module is the key of the hash table, denoted as tagname, and the description information of the algorithm module is the value of the hash table, denoted as description value. The set of the tag name and the description information of the algorithm module in all controllers is established, and the tag name and the description information of all algorithm modules are stored in the key-value pair in the hash table hash<tagname, description>.

[0023] The system searches for the corresponding algorithm module from the hash table according to the input tag name or description information of the algorithm module, and uses the following method: Traverse the hash table, take out each tagname or description value in the hash table, and perform string fuzzy matching with the query condition input by the system. The corresponding algorithm module is found through the tag name or description information of the algorithm module.

[0024] As shown in Figure 2 In step S2, the controller where the algorithm module is located is found according to the algorithm module, and all configuration page information is read from the controller, including the following contents: According to the tag name tagname of the algorithm module, the controller where the algorithm module is located is found, and the handle value svc_handle of the algorithm module and the handle value svc_paren_thandle of the configuration page where the algorithm module is located are read from the controller where the algorithm module is located. All configuration page information is read from the controller where the algorithm module is located, and each configuration page information is stored in a structure Diagram. The structure Diagram is defined as follows: diagram_tagname is the tag name of the configuration page; diagram_description is the description of the configuration page; diagram_handle is the handle number of the configuration page; diagram_parent_handle is the handle value of the parent node to which the configuration page belongs; All read configuration page information is saved in the hash table diagram_hash<diagram_handle, diagram>, and the key value of the hash table is diagram_handle, and the value of the hash table is the structure Diagram object.

[0025] Based on the above reading all configuration page information from the algorithm module in the controller, draw configuration page view of each algorithm module and the corresponding reference relationship algorithm module graph element, the process is as follows: Traverse the hash table diagram_hash<diagram_handle, diagram>, take out the i-th hash table in the configuration page handle number diagram_hash[i]->diagram_handle, judge whether the algorithm module corresponding to the configuration page diagram_hash[i]->diagram and the handle value svc_parent_handle of the configuration page where the algorithm module is located (according to the reference information to judge whether the algorithm module is in the same controller) is the same, if the same, find the input algorithm module corresponding to the configuration page diagram_hash[i]->diagram, draw the configuration page logic diagram; If not, read all algorithm modules and algorithm module pin reference information in the algorithm module corresponding to the configuration page diagram_hash[i]->diagram from the controller, according to the algorithm module and the algorithm module pin reference information read, draw the algorithm module graph element of each algorithm module and the mutual reference relationship between the algorithm modules in the configuration page view, the algorithm module graph element is the graph element with algorithm module type in the configuration page view, which is composed of algorithm module pin connection and algorithm module pin label.

[0026] In step S3, read all algorithm module information in the configuration page, including: Step S31, read all algorithm module information in the configuration page from the controller, represented by structure Block, display the coordinates of algorithm module, the type of algorithm module in the visual configuration page view; According to the algorithm module information read, create the representation of algorithm module graph element through the type of algorithm module svc_type, represented by Block_Element.

[0027] Use the x-axis coordinate value svc_x of the algorithm module and the y-axis coordinate value svc_y of the algorithm module to represent the coordinates of the algorithm module graph element Block_Element in the configuration page view, and display the label name svc_tagname information of the algorithm module in the algorithm module graph element.

[0028] Use hash table Block_Hash<svc_handle, Block> to store all algorithm module information in a configuration page, and find the algorithm module information according to the handle number svc_handle of the algorithm module; The algorithm module information and the algorithm module graph element information are stored in a hash table Block_Element_Hash<Block, Element>, and the algorithm module graph element is searched according to the algorithm module information.

[0029] In step S32, the reference information of all algorithm module input and output pins in the configuration page is read. The reference information of each algorithm module pin is represented by a structure body Attr_ref, and the structure body Attr_ref is defined as follows: svc_handle represents the handle number of the algorithm module; svc_parent_handle represents the handle of the configuration page to which the algorithm module belongs; attr_name represents the attribute name of the algorithm module; List<Svc_refinfo> represents the reference information of the algorithm module pin; The reference information of the algorithm module pin is stored in a linked list. If the algorithm module pin has no reference information, the linked list is empty. The reference information of the algorithm module pin is represented by a structure body Svc_refinfo, and the structure body Svc_refinfo is defined as follows: ref_svc_handle represents the handle of the algorithm module represented by the reference; ref_svc_parent represents the handle of the configuration page in which the algorithm module represented by the reference is located; ref_string represents the reference information of the algorithm module pin; The reference information of all algorithm module pins in the configuration page is stored in a linked list Attr_List<Attr_ref>.

[0030] In step S33, based on the above steps, the configuration page logical diagram of each algorithm module and the corresponding reference relationship in the configuration page view is drawn, and the process is as follows: First, the linked list Attr_List<Attr_ref> is traversed, and the i-th structure body Attr_ref object in the linked list is taken out, where i is in the range of 0 to the number M of Attr_ref contained in the linked list Attr_List<Attr_ref>, and is marked as Attr_List[i]. According to Attr_List[i], the handle value Attr_List[i]->svc_handle of the algorithm module corresponding to the algorithm module pin, the handle Attr_List[i]->svc_parent_handle of the configuration page in which the algorithm module is located, and the reference information Attr_List[i]->Ref_List<Svc_refinfo> of the algorithm module pin are taken out.

[0031] Secondly, traverse the reference information of the algorithm module pin in the linked list Attr_List[i]->Ref_List<Svc_ref_info> and take out the jth structure Svc_ref_info object in the linked list, which is represented by Attr_List[i]->Ref_List[j], where j ranges from 0 to the number N of the structure Svc_ref_info contained in the linked list Attr_List[i]->Ref_List<Svc_ref_info>; Traverse the linked list Attr_List[i]->Ref_List[j] and take out the handle Attr_List[i]->Ref_List[j]->ref_svc_parent of the configuration page where the algorithm module represented by the jth reference is located and the handle Attr_List[i]->Ref_List[j]->ref_svc_handle of the algorithm module represented by the jth reference.

[0032] Finally, judge whether the handle Attr_List[i]->Ref_List[j]->ref_svc_parent of the algorithm module represented by the jth reference is the same as the handle Attr_List[i]->svc_parent_handle of the configuration page where the algorithm module is located; If the two values are the same, it means that the algorithm module and the algorithm module corresponding to the algorithm module pin are in the same configuration page. According to the handle Attr_List[i]->Ref_List[j]->ref_svc_handle of the algorithm module represented by the reference, the corresponding algorithm module information is found in the hash table Block_Hash<svc_handle, Block>, and the corresponding algorithm module graph element is found in the hash table Block_Element_Hash. In the configuration page, the two algorithm modules are connected by a wire. If the two values are different, it indicates that the algorithm module and the algorithm module pin correspond to algorithm modules in different configuration pages. The algorithm module information is found in the hash table Block_Hash<svc_handle, Block> using the algorithm module Attr_List[i]->svc_handle, and the algorithm module primitive is found in the hash table Block_Element_Hash according to the algorithm module information. A reference tag containing reference information is drawn at the pin in the algorithm module primitive, and the reference tag contains reference information Attr_List[i]->Ref_List[j]->ref_string. The reference tag indicates that the algorithm module of the current configuration page references the algorithm module of another configuration page, and on the other hand, the reference tag can jump to the group where the algorithm module represented by the reference tag is located.

[0033] Based on the configuration page logical diagram, the algorithm module matching the input query is automatically located, and the process includes: According to the input matching query algorithm module, the algorithm module primitive is matched and queried in the configuration page logical diagram. The Attr_List[i]->svc_handle obtained by traversal is matched with the handle value svc_handle of the input query algorithm module. If the two values are equal, the algorithm module primitive represented by Attr_List[i]->svc_handle is the algorithm module primitive queried by the input, which is selected and framed in the configuration page logical diagram. The algorithm module is automatically located, thereby realizing fast and automatic location of the control logic.

[0034] Step S4, according to the algorithm module reference information selected in the configuration page logical diagram, automatically jump to the configuration page where the referenced algorithm module is located, and automatically generate a jump logical diagram in the configuration page. The algorithm module corresponding to the reference information is selected in the jump logical diagram, and the process is as follows: Click the reference tag containing reference information drawn at the pin in the algorithm module primitive to jump to the configuration page where the algorithm module displayed in the reference tag is located, and draw a jump logical diagram; Click the tag of the algorithm module pin in the jump logical diagram to obtain the current algorithm module reference information Svc_ref_info, and according to the reference information Svc_ref_info, reference the configuration page handle ref_svc_parent where the algorithm module is located; According to the configuration page handle ref_svc_parent where the algorithm module is located, the configuration page is matched in the hash table diagram_hash, the hash table diagram_hash is traversed, the i-th configuration page handle number diagram_hash[i]->diagram_handle of the hash table diagram_hash is taken out, and it is judged whether the i-th configuration page handle number diagram_hash[i]->diagram_handle is same as the configuration page handle ref_svc_parent where the algorithm module is located; If the two values are same, the configuration page information does not need to be read, that is, the step of automatically positioning the algorithm module is executed from step S33; if the two values are different, the configuration page information needs to be read, that is, the step of automatically positioning the algorithm module is executed from step S32.

[0035] The method provided in the application can also realize the automatic positioning of the algorithm module by drawing the configuration page tree diagram node, and the process is as follows: The system draws the configuration page tree diagram node according to reading all the configuration page information from the controller, and the specific steps are as follows: The configuration page hash table diagram_hash<diagram_handle, Diagram> in the controller is traversed, the configuration page handle value diagram_handle in the i-th configuration page Diagram object in the hash table is taken out, and the value range of i is from 0 to the number N-1 of the configuration page Diagram elements contained in the hash table; The configuration page hash table diagram_hash in the controller is traversed, the handle value diagram_parent_handle of the parent node to which the j-th configuration page Diagram object in the hash table belongs is taken out, the value range of j is from i+1 to N, the Diagram set in which the handle value diagram_parent_handle of the parent node to which the configuration page belongs is same as the configuration page handle value diagram_handle in all nodes is found, and the Diagram set is used as List <diagram>The node is displayed as a child node of the i-th node, and the relationship between the parent and child nodes is displayed by a configuration page tree diagram; The precondition of the fast positioning is to draw the logic diagram in which the function block is located, therefore the above steps create the configuration page tree diagram node, by clicking the configuration page tree diagram node, the configuration page logic diagram is drawn by using the same method as that of drawing the configuration page logic diagram in the above-mentioned algorithm module positioning mode, and the algorithm module is positioned by the configuration page logic diagram, since the method steps of drawing the configuration page logic diagram in the algorithm module positioning mode are the same, they are not described here again.

[0036] It should be noted that the parts not involved in the present application are the same as or can be realized by using the prior art. The above description is only the preferred specific implementation of the present application, but the protection scope of the present application is not limited to this, any person skilled in the art can make equivalent replacement or change according to the technical solution and the inventive concept of the present application within the technical range disclosed by the present application, which should be covered in the protection scope of the present application.< / diagram> < / diagram>

Claims

1. A method for rapid automatic positioning of DCS control logic, characterized in that: The following steps are involved: Step S1: The system finds the corresponding algorithm module according to the label name of the input algorithm module or the description information of the algorithm module; Step S2: Find the controller where the algorithm module is located according to the algorithm module, read all configuration page information from the controller, and draw each algorithm module in the configuration page view and the algorithm module primitives of the corresponding reference relationship; Step S3, reading all algorithm module information in the configuration page, and drawing a configuration page logic diagram of each algorithm module and corresponding reference relationship in the configuration page view; Based on the configuration page logic diagram, the algorithm module is automatically located according to the algorithm module that matches the query input; Step S4, draw a reference label containing reference information at the pin in the algorithm module graphic element, automatically jump to the configuration page where the algorithm module corresponding to the reference is located according to the reference label, draw a jump logic diagram in the configuration page, and select the algorithm module corresponding to the reference information in the jump logic diagram.

2. The method for rapid automatic positioning of DCS control logic according to claim 1, characterized in that: Step S1: The tag name of the algorithm module is the key of the hash table, and the description information of the algorithm module is the value of the hash table. A set of the tag names and description information of the algorithm modules in all controllers is established, and the tag names and description information of all algorithm modules are stored in the key-value pairs in the hash table; The system searches the hash table based on the input algorithm module tag name or algorithm module description information to find the corresponding algorithm module in the following way: Traverse the hash table, take out the label name or description information of each algorithm module in the hash table, perform string fuzzy matching with the query conditions input by the system, and find the corresponding algorithm module through the label name or description information of the algorithm module.

3. The method for rapid automatic positioning of DCS control logic according to claim 1, characterized in that: Step S2: Find the controller where the algorithm module is located according to the algorithm module, and read all configuration page information from the controller, including the following: According to the tag name of the algorithm module, find the controller where the algorithm module is located, and read the handle value of the algorithm module and the handle value of the configuration page where the algorithm module is located from the controller where the algorithm module is located, and use the structure Diagram to store each configuration page information. The structure Diagram includes: the tag name of the configuration page, the description of the configuration page, the handle number of the configuration page, and the handle number of the parent node to which the configuration page belongs. All the read configuration page information is saved in the hash table.

4. The method for rapid automatic positioning of DCS control logic according to claim 3 is characterized in that: Based on reading all configuration page information from the controller where the algorithm module is located, draw the algorithm module primitives of each algorithm module and the corresponding reference relationship in the configuration page view. The process is as follows: Traverse the hash table, take out the configuration page handle number in the i-th hash table, and determine whether the configuration page corresponding to the algorithm module is the same as the handle value of the configuration page where the algorithm module is located. If they are the same, find the configuration page corresponding to the input algorithm module; The reference information of all algorithm modules and algorithm module pins in the configuration page corresponding to the algorithm module is read from the controller. According to the reference information of the algorithm modules and algorithm module pins read, the algorithm module graphics of each algorithm module and the mutual reference relationship between each algorithm module in the configuration page view are drawn.

5. The method for rapid automatic positioning of DCS control logic according to claim 1, characterized in that: Step S3, reading all algorithm module information in the configuration page includes: Read all algorithm module information in the configuration page from the controller, and display the coordinates and type of the algorithm module in the visual configuration page view; According to the read algorithm module information, the expression mode of the algorithm module graphic element is created by the type of the algorithm module, the coordinates of the algorithm module graphic element in the configuration page view are represented by the x-axis coordinate value and the y-axis coordinate value of the algorithm module, and the label name information of the algorithm module is displayed in the algorithm module graphic element; Use a hash table to store all algorithm module information in a configuration page, and search for algorithm module information based on the handle number of the algorithm module; Use a hash table to store algorithm module information and algorithm module primitive information, and search for algorithm module primitives based on the algorithm module information.

6. The method for rapid automatic positioning of DCS control logic according to claim 5, characterized in that: Read all algorithm module information in the configuration page including: Read the reference information of all algorithm module input and output pins in the configuration page. The reference information of each algorithm module pin is represented by the structure Attr_ref, which includes the handle number of the algorithm module, the handle of the configuration page to which the algorithm module belongs, the attribute name of the algorithm module, and the reference information of the algorithm module pin; The reference information of the algorithm module pin is stored in a linked list. If the algorithm module pin has no reference information, the linked list is empty. The reference information of an algorithm module pin is represented by the structure Svc_ref_info. The structure Svc_ref_info includes: the handle of the algorithm module represented by the reference, the handle of the configuration page where the algorithm module represented by the reference is located, and the reference information of the algorithm module pin. The reference information of all algorithm module pins in the configuration page is stored in a linked list.

7. The method for rapid automatic positioning of DCS control logic according to claim 6, characterized in that: Draw the configuration page logic diagram of each algorithm module and the corresponding reference relationship in the configuration page view. The process is as follows: Traverse the linked list and take out the i-th structure Attr_ref object in the linked list, where the value of i ranges from 0 to the number M of Attr_refs contained in the linked list; According to the handle value of the algorithm module corresponding to the algorithm module pin, the configuration page handle where the algorithm module is located and the reference information of the algorithm module pin; Traverse the reference information of the algorithm module pins in the linked list and take out the j-th structure Svc_ref_info object in the linked list, where the value of j ranges from 0 to the number N of structures Svc_ref_info contained in the linked list; Traverse the linked list by reference, and take out the configuration page handle of the algorithm module represented by the j-th reference in the linked list and the handle of the algorithm module represented by the reference; Determine whether the handle of the algorithm module represented by the jth reference taken out is the same as the handle value of the configuration page where the algorithm module is located; If the two values ​​are the same, it means that the algorithm module and the algorithm module corresponding to the algorithm module pin are in the same configuration page. The corresponding algorithm module information is found in the hash table according to the handle of the algorithm module represented by the reference. The corresponding algorithm module primitive is found in the hash table according to the algorithm module information. The two algorithm modules are connected with a line in the configuration page. If the two values ​​are different, it means that the algorithm module and the algorithm module corresponding to the algorithm module pin are in different configuration pages. Use the algorithm module to find the algorithm module information in the hash table, find the algorithm module primitive in the hash table based on the algorithm module information, and draw a reference label containing the reference information at the pin in the algorithm module primitive.

8. The method for rapid automatic positioning of DCS control logic according to claim 7, characterized in that: Based on the configuration page logic diagram, the algorithm module is automatically located according to the algorithm module that matches the query input, including: According to the algorithm module of the input matching query, the query algorithm module graphic element is matched in the configuration page logic diagram, and the handle value obtained by traversal is matched with the input query algorithm module. If the two are equal, the algorithm module graphic element represented is the algorithm module graphic element obtained by the input query, and it is selected in the configuration page logic diagram.

9. The method for rapid automatic positioning of DCS control logic according to claim 7, characterized in that: Step S4: According to the algorithm module reference information selected in the configuration page logic diagram, automatically jump to the configuration page where the corresponding algorithm module is located, and automatically generate a jump logic diagram in the configuration page. Select the algorithm module corresponding to the reference information in the jump logic diagram. The process is as follows: Click the reference label containing reference information drawn at the pin in the algorithm module graphic element to jump to the configuration page where the algorithm module displayed in the reference label is located and draw the jump logic diagram; Click the label of the algorithm module pin in the jump logic diagram to obtain the current algorithm module reference information, and reference the configuration page handle where the algorithm module is located based on the reference information; Match the configuration page in the hash table according to the configuration page handle where the referenced algorithm module is located, traverse the hash table, take out the i-th configuration page handle number in the hash table, and determine whether the i-th configuration page handle number is the same as the configuration page handle where the referenced algorithm module is located; If the two values ​​are the same, there is no need to read the configuration page information and perform automatic positioning of the algorithm module; if the two values ​​are different, it is necessary to read the configuration page information and perform automatic positioning of the algorithm module.

10. The method for rapid automatic positioning of DCS control logic according to claim 3, characterized in that: The system draws the nodes of the configuration page tree diagram based on all configuration page information read from the controller. The steps are as follows: Traverse the configuration page hash table in the controller and retrieve the configuration page handle value in the i-th configuration page in the hash table, where the value of i ranges from 0 to the number of configuration page elements N-1 contained in the hash table; Traverse the configuration page hash table in the controller and retrieve the handle value of the parent node of the configuration page in the j-th configuration page object in the hash table. The value of j ranges from i+1 to N. Find the Diagram set whose parent node handle value is the same as the configuration page handle value in all nodes. Denote it as the child node of the i-th node and use the configuration page tree diagram to display the relationship between the parent and child nodes. Click the configuration page tree diagram node to draw the configuration page logic diagram and locate the algorithm module through the configuration page logic diagram.

Citation Information

Patent Citations

  • Nuclear power DCS algorithm configuration logic diagram drawing system

    CN113703405A

  • Processing method and system for searching algorithm page where variable is located in DCS, and storage medium

    CN114238342A

  • Method and system for realizing control logic configuration of control system

    CN114398071A

  • DCS logic diagram identification method and device

    CN117373049A

  • Method and system for controller to automatically generate graphical control logic

    CN120315324A