A method, system, device and medium for automatically generating a wiring table of a panel device

By constructing a database of typical circuits and a detailed list of panel layouts, and using Excel and VBA programs to automatically generate wiring tables for backup panel equipment in nuclear power units, the problem of time-consuming and labor-intensive manual compilation has been solved, and efficient and accurate wiring table generation and integrated assembly have been achieved.

CN116662337BActive Publication Date: 2025-11-04CHINA NUCLEAR CONTROL SYST ENG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310599360.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-25
Publication Date
2025-11-04
Estimated Expiration
2043-05-25

AI Technical Summary

Technical Problem

In the existing technology, the generation of wiring tables for backup panel equipment in nuclear power units relies on manual compilation, which results in a large workload, long time consumption and high error rate, making it impossible to efficiently and accurately generate wiring tables for a single panel equipment.

Method used

By acquiring typical circuit diagrams of the target panel, a typical circuit database and panel detail table are constructed. Wiring tables are automatically generated using Excel and VBA programs, including data processing of equipment codes, terminals, terminal information, and prefabricated cable models.

Benefits of technology

It enables the efficient and accurate generation of panel equipment wiring tables, reducing working hours by 50%, increasing data accuracy to 100%, reducing manual intervention, and improving the efficiency and accuracy of integrated assembly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116662337B_ABST
    Figure CN116662337B_ABST
Patent Text Reader

Abstract

The application discloses a kind of disc surface equipment wiring list automatic generation method, system, equipment and medium, it is related to wiring list generation field, the method includes: obtaining the typical circuit diagram of the disc surface equipment on target disc table;One kind of equipment in disc surface equipment corresponds a typical circuit diagram;Each typical circuit diagram is converted according to the form of data table, obtains classic return data table, and constructs typical circuit database according to all classic return data table;According to the disc surface equipment list of target disc table, construct multiple disc surface detail table;One combination category corresponds one disc surface detail table;For any disc surface detail table, terminal group name is filled in A1 column of disc surface detail table, and with equipment code as index column, find the information required in typical circuit database, generate the wiring list of corresponding combination category;According to the wiring list of all combination categories, obtain the final wiring list of disc surface equipment.The application can efficiently and accurately generate the wiring list of disc surface equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wiring diagram generation, and in particular to a method, system, device, and medium for automatically generating wiring diagrams for panel devices. Background Technology

[0002] In the nuclear power industry, the number of devices on the backup panel is extremely large. For example, an average backup panel in a nuclear power unit has approximately 280 devices, with some panels containing as many as 439 devices, resulting in extremely high device density. Given this large number of devices, the number of prefabricated cables required to support them is also substantial. Furthermore, devices of different safety levels, safety groups, and protection groups need to be physically isolated, typically through different mounting surfaces, cable trays, and cable tray entry holes. The isolation design and routing of equipment and prefabricated cables is a crucial and complex issue. After designers have designed the wiring paths between the prefabricated cables and the terminals within the panel based on the panel equipment list and layout diagram, they categorize each panel device according to its safety level, safety group, and protection group, filling in the wiring table with the device's location and the wire number, type, and route information of its prefabricated cables. Transforming design information into wiring diagrams that can guide assembly workers in construction is a crucial and repetitive task that requires efficient and accurate translation.

[0003] Currently, wiring diagrams for control panel equipment are all manually compiled. Each designer needs to create a diagram for each device, a method that is extremely labor-intensive and time-consuming, requiring a significant amount of time for repetitive work, leading to worker fatigue, and making it difficult to guarantee accuracy. This results in numerous problems during actual cable placement. Given this situation, improving the accuracy and efficiency of wiring diagrams, enabling integrators to place cables correctly and smoothly, and freeing workers from repetitive tasks have become urgent technical problems that need to be solved in this field.

[0004] Currently, the only existing technology for generating similar termination files (panel cabinet terminations or system terminations) can be divided into two categories: the first category uses Excel combined with VBA scripts to generate termination files; the second category uses EPLAN or AutoCAD to generate termination files. Firstly, in the first method, the VBA script is only used for merging and simple matching functions, and most of the file generation process needs to be done manually. In the second method, both platforms use Excel spreadsheets as an intermediary for mutual conversion to obtain the termination files. Secondly, the termination lists generated by these two methods are for panel cabinet or system terminations, and are not suitable for generating wiring tables for single panel devices. This is because the crucial information in the panel device wiring table is the detailed design and planning of the wiring paths for each device or connection point, which is not provided in panel cabinet or system terminations. Therefore, how to generate panel device wiring tables remains a problem that urgently needs to be solved. Summary of the Invention

[0005] Based on this, embodiments of the present invention provide a method, system, device, and medium for automatically generating wiring tables for panel devices, so as to generate wiring tables for panel devices efficiently and accurately.

[0006] To achieve the above objectives, embodiments of the present invention provide the following solutions:

[0007] A method for automatically generating wiring diagrams for panel devices includes:

[0008] Obtain typical circuit diagrams of the panel equipment on the target panel; one typical circuit diagram corresponds to one type of equipment on the panel.

[0009] Each typical loop diagram is converted into a data table to obtain a typical loop data table, and a typical loop database is constructed based on all the typical loop data tables; the information columns in the typical loop data table include: equipment code column, loop type column, terminal column, terminal information column, and prefabricated cable model column;

[0010] Based on the panel equipment list of the target panel, construct multiple panel detail tables; one combination type corresponds to one panel detail table; the data columns in the panel detail table include: safety level, safety column, emergency power supply and protection group; the combination type is a permutation and combination of safety level type, safety column type, emergency power supply type and protection group type;

[0011] For any panel detail table, enter the terminal group name in column A1 of the panel detail table, and use the equipment code as the index column to search for the required information in the typical circuit database to generate a wiring table for the corresponding combination type; the wiring table is named according to the terminal group name;

[0012] The final wiring diagram for the panel equipment is obtained based on the wiring diagrams for all combinations.

[0013] The present invention also provides an automatic generation system for panel equipment wiring diagrams, comprising:

[0014] The drawing acquisition module is used to acquire typical circuit diagrams of the equipment on the target panel; one typical circuit diagram corresponds to one type of equipment on the panel.

[0015] The drawing conversion module is used to convert each typical circuit diagram into a data table to obtain a typical circuit data table, and to construct a typical circuit database based on all the typical circuit data tables; the information columns in the typical circuit data table include: equipment code column, circuit type column, terminal column, terminal information column, and prefabricated cable model column;

[0016] The detailed list construction module is used to construct multiple panel detailed lists according to the panel equipment list of the target panel; one combination type corresponds to one panel detailed list; the data columns in the panel detailed list include: safety level, safety column, emergency power supply and protection group; the combination type is a permutation and combination of safety level type, safety column type, emergency power supply type and protection group type;

[0017] The information query module is used to fill in the terminal group name in column A1 of any panel detail table, and use the equipment code as the index column to search for the required information in the typical circuit database to generate a wiring table for the corresponding combination type; the wiring table is named according to the terminal group name;

[0018] The wiring table generation module is used to generate the final wiring table for the panel equipment based on all combinations of wiring table types.

[0019] The present invention also provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform the above-described method for automatically generating a panel device wiring table.

[0020] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for automatically generating a panel device wiring diagram.

[0021] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0022] This invention constructs a typical circuit database by converting each typical circuit diagram into a data table format, and constructs a panel detail table with different combinations according to the panel equipment list of the target panel. Finally, the typical circuit database and the panel detail table are combined to generate the final wiring table of the panel equipment, which can generate the wiring table of the panel equipment efficiently and accurately. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 A flowchart illustrating the automatic generation method of panel device wiring tables provided in this embodiment of the invention;

[0025] Figure 2 A schematic diagram illustrating the process of generating the dictionary data table provided in an embodiment of the present invention;

[0026] Figure 3 A schematic diagram showing the style interface of the data table provided in this embodiment of the invention;

[0027] Figure 4 An interface display diagram showing the table name of the panel details table provided in an embodiment of the present invention;

[0028] Figure 5 An interface diagram showing the contents of the panel detail table provided in an embodiment of the present invention;

[0029] Figure 6 This is a schematic diagram of the first part of the wiring table automatically generated according to an embodiment of the present invention;

[0030] Figure 7 This is a schematic diagram of the second part of the wiring table automatically generated according to an embodiment of the present invention;

[0031] Figure 8 This is a schematic diagram of the third part of the wiring table automatically generated according to an embodiment of the present invention;

[0032] Figure 9 An interface diagram showing partial information in the wiring table of the panel device provided in an embodiment of the present invention;

[0033] Figure 10 An interface diagram showing another part of the information in the wiring table of the panel device provided in an embodiment of the present invention;

[0034] Figure 11 A simplified flowchart of the automatic generation method for wiring tables provided in an embodiment of the present invention;

[0035] Figure 12 This is a schematic diagram comparing working hours provided in an embodiment of the present invention;

[0036] Figure 13 The structural diagram of the automatic generation system for panel device wiring tables provided in this embodiment of the invention is shown. Detailed Implementation

[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 are within the scope of protection of the present invention.

[0038] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0039] Example 1

[0040] See Figure 1 The automatic generation method for panel equipment wiring tables in this embodiment includes:

[0041] Step 101: Obtain a typical circuit diagram of the equipment on the target panel; one typical circuit diagram corresponds to one type of equipment on the panel.

[0042] Step 102: Convert each typical loop diagram into a data table to obtain a typical loop data table, and construct a typical loop database based on all the typical loop data tables.

[0043] The information columns in the data table include: equipment code column, data type column, terminal column, terminal information column, and prefabricated cable model column.

[0044] Step 102 specifically includes:

[0045] 1) Obtain the basic information of the current page of the typical loop diagram; the basic information includes: equipment code, loop type and prefabricated cable model.

[0046] 2) Use the row below the last row of the data table after the previous page is filled as the fill row for the current page.

[0047] 3) Starting from the fill row of the current page, fill the drawing information into the corresponding column of the data table to obtain the first data table.

[0048] 4) Determine the total number of three-layer terminals for each element in the current page of the typical circuit diagram. Sequentially query the wiring and terminal information for each three-layer terminal, and fill the wiring and terminal information into the corresponding column of the first data table to obtain the second data table. This second data table serves as the data table after the current page is filled. The terminal information includes: terminal name, positive power supply short circuit, negative power supply short circuit, ground short circuit, wire core number, and wire core specification. Specifically:

[0049] For any three-layer terminal of a graphic element in the current page of a typical circuit diagram, if the lead-out line on the right side of the three-layer terminal is ">0" and the other end is connected to the graphic element terminal in the device frame, then the text information on the right side of the graphic element terminal will be used as the basis for filling the terminal column in the first data table, the text information on the left side of the graphic element terminal will be used as the basis for filling the terminal name column, the positive power short-circuit column, the negative power short-circuit column, and the ground short-circuit column in the first data table, and the text label information above the lead-out line near the three-layer terminal side will be used as the basis for filling the wire core number column and the wire core specification column in the first data table.

[0050] For any three-layer terminal of a graphic element in the current page of a typical circuit diagram, if the lead-out line on the right side of the three-layer terminal is “=0” or “<0” and the other end is not connected to the graphic element terminal in the device frame, then the terminal column, terminal name column, power positive shorting column, power negative shorting column and ground shorting column in the first data table are all filled with “-”, and the wire core number column and wire core specification column in the first data table are all filled with “empty”.

[0051] 5) Determine if the current page is the last page of the typical loop diagram. If so, determine the second data table as the typical loop data table; otherwise, proceed to fill the next page.

[0052] See Figure 2 In practical applications, a more specific implementation of step 102 above is as follows:

[0053] This process converts typical circuit diagrams of panel equipment into data tables for use as a database. Each typical circuit diagram corresponds to a specific data type, meaning that each device in the "panel equipment list" can find its corresponding data type information in the diagram for wiring. For example, three-lamp, two-button combination devices on the panel belong to the same category, and their database information is of the same type. The information types and drawing methods contained in each typical circuit diagram are fixed, so we take one typical circuit diagram as an example to extract information and generate a data table. The necessary information columns required for the "data table" in the database are: equipment code (e.g., CNCS code), circuit type, wiring terminals, terminal information, and prefabricated cable model. Terminal information includes the terminal, power positive short circuit (power short circuit (+)), power negative short circuit (power short circuit (-)), ground short circuit, wire core number, and wire core specification (mm). 2 ).

[0054] The method for obtaining this information from a typical loop diagram is as follows:

[0055] ① Extract the text of “CNCS-*-*” in the equipment box on a typical circuit diagram and write it as “CNCS Code” in column A.

[0056] ② Extract the text with "*_*" below the "Type" text in the lower left corner of the typical loop diagram as column B, "Classic Loop Type".

[0057] ③ Extract the text below the "Prefabricated conductor" text in the lower left corner of the typical circuit diagram as column J, which contains the text "Prefabricated cable model".

[0058] ④ The extraction method for "terminal" and "terminal information" is as follows: Select the graphic element "three-layer terminal". Query each terminal in a "top-down" order. For each terminal with three layers, judge in a "bottom-up" order. The total number of "three-layer terminal" graphic elements is n. Then (n-1)*3 is the number of rows occupied by this type in the data table. At this time, fill in the (n-1)*3 rows in the "terminal" column D of the data table with "a", "b", and "c" in sequence. Start querying from the 2nd (i=2, i<=n) three-layer terminal. The text in this three-layer terminal, "bottom-up", contains the words "a", "b", and "c". Judge in turn whether there is a lead wire connected to the graphic element "terminal" in the device frame on the right side of the text containing "a", "b", and "c".

[0059] a. If the lead-out line on the right side of the three-layer terminal is ">0" and the other end is connected to the "terminal" element in the device frame, then extract the text information to the right of the "terminal" element as column C "Terminal"; extract the text information to the left of the "terminal" element as the filling basis for column E "Power Short Circuit (+)" and column F "Power Short Circuit (-)" (if it is "+, 24V", then fill the Power Short Circuit (+) column with "X", otherwise fill with "-", similarly "-, 0V, COM" will fill the Power Short Circuit column with "X"). (Fill "X" in column (-) otherwise fill "-"); For the grounding short circuit column G, determine whether the terminal in column D is "c". If it is "c", fill "X"; otherwise fill "-"; The text label information above the "three-layer terminal" side of the lead wire is column H, which is "core number"; For the core specification column I, fill it by judging the "core number" column. If there is a non-empty value and it is a number in the "core number" column, fill "0.5" in the core specification column, otherwise fill "empty".

[0060] b. If the lead-out line on the right side of the three-layer terminal is “=0” or ">0” and the other end connection point is not connected to the element “terminal”, then column C “connection terminal”, column E “power short circuit (+)”, and column F “power short circuit (-)” are all filled with “-”, and column H “core number” is empty.

[0061] At this point, all the information needed to extract from a typical circuit diagram has been extracted into the data table. Then, the data table can be enriched and improved: the wires of each device have a shielding layer, and the terminal name of the shielding layer is defined as "SHIELD". That is, the terminal in the last row ((n-1)*3) of each circuit type in the data table is filled with "SHIELD" as an identifier; the first row of data in the "CNCS encoding" and "circuit type" columns is filled down by (n*3-1) rows.

[0062] Other typical loop diagrams obtain and process data according to the above process. First, determine the row value of the last row in the data table. The row position of the last row value + 1 is the first row position that needs to be filled after the content is retrieved for each typical loop diagram.

[0063] The final generated database table is displayed in the interface as follows: Figure 3 As shown.

[0064] Step 103: Construct multiple tray detail tables according to the tray equipment list of the target tray platform; one combination type corresponds to one tray detail table.

[0065] The data columns in the panel details table include: security level, security column, emergency power supply and protection group; the combination type is the permutation and combination of security level type, security column type, emergency power supply type and protection group type.

[0066] Step 103 specifically includes:

[0067] 1) Use Excel's permutation and combination function to permutate and combine different safety levels, different safety columns, different emergency power supplies, and different protection groups to obtain a variety of combinations.

[0068] 2) Create multiple sheets; each sheet includes columns named Security Level, Security Column, Emergency Power Supply and Protection Group (PAMS); one sheet corresponds to one combination type.

[0069] 3) Traverse and query the data information in the list of panel equipment on the target panel, fill the corresponding data into the corresponding sheet, and generate multiple panel detail tables; the data information includes: safety level information, safety column information, emergency power supply information, and protection group information.

[0070] In practical applications, a more specific implementation of step 103 above is as follows:

[0071] (1) Using Excel's permutation and combination function, the data of the "panel equipment list" is divided into 4 safety levels, 6 safety columns, 3 emergency power supplies and 2 protection groups. Then, the data columns of each combination are merged into a data column A by using "." as the separator, thus obtaining the "New table with specified table name" in the table name list.

[0072] (2) Create corresponding sheets from top to bottom according to the table names in "Create a table with specified table name". For example, after creating the first sheet, use SQL statements to query the data in the "panel equipment list" with the "safety level / safety column / emergency power supply / protection group" columns corresponding to the table name for exact matching. Then, sort the queried data according to the specified order of "equipment tag number, equipment type, safety level, safety column, horizontal axis, vertical axis, equipment code, target terminal group, path and other information" and fill it into the newly created sheet. This will give you a "panel details table" with specified naming rules that contains data from the panel equipment list. At the same time, fill in the required target terminal group name in A1. The table for "wiring table" is named according to the terminal group name, which makes it easier to generate the directory and view it.

[0073] The display of the panel details table name in the interface is as follows: Figure 4 As shown, the contents of the chart details table are displayed in the interface as follows: Figure 5 As shown.

[0074] Step 104: For any panel detail table, enter the terminal group name in column A1 of the panel detail table, and use the equipment code as the index column to search for the required information in the typical circuit database to generate a wiring table for the corresponding combination type. The wiring table is named according to the terminal group name.

[0075] Step 104 specifically includes:

[0076] 1) If the working name of the current market detail sheet contains security level (F-SC) characters or non-security level (NC) characters, then open and activate the current market detail sheet and define the current market detail sheet as a sourcesheet.

[0077] 2) Create an empty table named after the terminal group and define the empty table as destsheet.

[0078] 3) Based on the data required for each row in the destsheet, retrieve the corresponding data from the sourcesheet and assign values ​​to the destsheet.

[0079] 4) For empty data rows in the destsheet after assignment, query and assign values ​​in the typical circuit database's typical circuit data table to obtain the wiring table of the combination type corresponding to the current panel details table.

[0080] See Figure 6 , Figure 7 and Figure 8 In practical applications, a more specific implementation of step 104 above is as follows:

[0081] After obtaining the typical circuit database and panel details table, a wiring table is generated.

[0082] ① After creating several "panel detail tables" with all terminal group names in the "New Table with Specified Table Name" section, open and activate the tables whose names contain "F-SC" or "NC" in sequence. Check if the second row of the table is empty. If it is empty, meaning there is no equipment in the table, delete the table. If it is not empty, obtain the maximum number of rows occupied by the table content (maxRows). Then, check if the data in the "Equipment Type" column contains "*ID-1*". If it does, insert a blank row above the second row, copy the found data to the newly inserted row, and delete the original row. Repeat this process, inserting the matching data after the new row. This arranges the digital displays of the equipment requiring power supply at the beginning of each "panel detail table," which is more consistent with and easier to integrate into actual construction operations. At this point, the row order in the "panel detail table" corresponds to the order of the equipment requiring wiring in the "wiring table."

[0083] ② Open and activate the "Panel Details Sheets" whose names contain "F-SC" or "NC" in sequence. Define the currently activated "Panel Details Sheet" as "sourcesheet". Create a new table named after the content in "sourcesheet" and "A1". If the table name already exists, clear all content and formatting using the existing data table; otherwise, create the table. This table is the connection sheet (defined as "destsheet"). In the "destsheet", construct the header style for the required content in the first two rows, and construct the content in rows 3 to 6. These 6 rows are fixed for each "connection sheet".

[0084] ③ Starting from row 2 of sourceindex, combine the data characters of the x-coordinate "E[sourceindex]" and the y-coordinate "F[sourceindex]" into a single data value and assign it to column B of the first empty row in the destsheet. Assign the content of column "A[sourceindex]" to column D of the destsheet for device names. Assign the content of column "G[sourceindex]" to column E of the destsheet for CNCS codes. Assign the content of column "C[sourceindex]" to column F of the destsheet for security levels. Assign the content of column "D[sourceindex]" to the destsheet for security levels. In column G (Safety), assign the content from column "L[sourceindex]" with formatting to column U (Cable Path) in the destsheet. Assign the destsheet name to column I (Terminal Group Name). This step involves assigning the required content from the sourcesheet to the corresponding columns in the destsheet. Some fields can be directly assigned. For the path column, the path content is copied with formatting because this content in the sourcesheet contains italics, underlines, etc., which need to be preserved to guide actual wiring operations and are indispensable. If only the content is filled in, manually adding formatting later would be troublesome and prone to errors. Therefore, we choose to copy with formatting to fill the content into the cable path column of the destsheet.

[0085] ④ After filling in the fillable data in the "sourcesheet", the remaining wiring data in the "destsheet" table needs to be retrieved by matching the content of the "CNCS code" column in the "sourcesheet" with the "CNCS code" column in the typical database table (defined as "datasheet") using the content of the "CNCS code" column in the "sourcesheet" as the key: Define a String type variable cncs_code, pass the CNCS code data in column E of the "destsheet" to the cncs_code variable, and determine the relationship between the CNCS code data in column A of the "datasheet" and cncs_code in two ways: There are two methods for finding data: 1. `datasheet.Range("A"+CStr(dataIndex)).Value = cncs_code`: This method performs an exact match when the data is equal to the column containing the CNCS code. No errors are allowed; both columns must be identical to find the data. This is an exact match method. 2. `InStr(cncs_code,datasheet.Range("A"+CStr(dataIndex)).Value)>0`: This method performs a fuzzy match when the data in column A contains the characters in the CNCS code. This is a fuzzy match method. Both methods use a single column of CNCS-coded data as the keyword for matching. However, sometimes this single column is insufficient. In such cases, additional keyword columns are needed to perform a combined search ("keyword > 1"), meaning two or more conditions are used for exact and inclusive matching to obtain the desired data.For example: Define String type variables `cncs_code` and `scheme_type`. Pass the CNCS code data in column E of the "destsheet" to the `cncs_code` variable, and the CSS data in column H of the "destsheet" to the `scheme_type` variable. Based on the relationship between the CNCS code data in column A of the "datasheet" and `cncs_code`, and the relationship between the CSS data in column B of the "datasheet" and `scheme_type`, two methods are used for judgment: First method: `datasheet.Range("A"+CStr(dataIndex)).Value = cncs_codeAnd` `datasheet.Range("B"+CStr(dataIndex)).Value = scheme_type` performs an exact match (no exceptions). This means that if the data in column A of `datasheet` exactly matches the characters in `cncs_code`, and the data in column B exactly matches the characters in `scheme_type`, then the data was found. Otherwise, no data was found. This is an exact match. The second method is `InStr(cncs_code,datasheet.Range("A"+CStr(dataIndex)).Value)>0 AndInStr(scheme_type,datasheet.Range("B"+CStr(dataIndex)).Value)>0`, which performs a fuzzy match. This means that if the data in column A of `datasheet` contains the characters in `cncs_code`, and the data in column B of `datasheet` contains the characters in `scheme_type`, then the data was found. This is a fuzzy match. The above example demonstrates a combined query using "CNCS encoding" and "return type" as conditions, employing two different query methods. For queries requiring more conditions or more combinations of conditions (e.g., condition A is equality, condition B is inclusion; condition A is inclusion, condition B is equality), similar methods can be used for flexible combination matching queries as needed. The specific combination method used depends on the actual situation. Because the encoding has a fixed pattern, exact matching is recommended for higher data accuracy.

[0086] The necessary information retrieved from the "datasheet" in the "sourcesheet" is populated into the corresponding columns starting from row 7 of the "destsheet". The process of querying and retrieving data is as follows:

[0087] a. Initialize parameters: sourceindex=2, datacount=0, dataindex=3. Based on the data content in the "CNCS code" column of the sourcesheet, perform a match search within the CNCS code of the "datasheet". Record the total number of rows found (datacount), and record the first occurrence of the row value. The corresponding terminal "a" is the content in column A of the "sourcesheet", which is also the "a" of the first three-layer terminal used by the equipment. Find and record the second occurrence of the row value. The corresponding terminal "b" is the content in column A of the "sourcesheet", which is also the "b" of the first three-layer terminal used by the equipment. Use flags to record the positions of the first "a" and the first "b". Continue searching until the last non-empty data row in the table ends. The retrieved data is concatenated into a string block and stored in "dataStr" according to a specific text format. A string block variable `dataStr` is defined, and the retrieved data described in section ④ is concatenated into the string block storage area. The retrieved data is stored in a block before further data decomposition. To facilitate data decomposition, special characters are added at specific positions as markers. Each column of data in each row is concatenated using "@#@" as a separator to form a data storage block containing all columns in that row, i.e., `CStr(dataSheet.Range("B"+CStr(dataIndex)).Value)+"@#@"+CStr(dataSheet.Range("C"+ "@#@ ... The expression `CStr(dataIndex)).Value` inserts "@#@" as a separator between two columns of data. It uses "&^&" as a separator to mark the end of each row of data retrieved, i.e., `dataStr = dataStr + CStr(dataSheet.Range("B" + CStr(dataIndex)).Value) + "@#@" + CStr(dataSheet.Range("C" + CStr(dataIndex)).Value) ... + "@#@" + CStr(dataSheet.Range("J" + CStr(dataIndex)).Value) + "&^&"`. This inserts "&^&" as the end-of-row character after the row query ends. The above method stores the retrieved data that meets the conditions in section ④ as a block after inserting separator characters as markers, and then uses this block for data decomposition and filling in the next step.

[0088] b. If discount > 0, meaning data is found, the stored "dataStr" is decomposed twice using the Split function to obtain the content of the corresponding cell in the wiring table: First: Define an array object datas, datas = Split(dataStr,"&^&"), that is, use the Split function to decompose the data in the dataStr storage block into row data using the row separator "&^&" inserted in a. of ④ as the flag, decompose it into several groups of data and store them in datas. After decomposition and storage, use the LBound and UBound functions to get the minimum sum of datas. The maximum subscript is used as the boundary condition offset for the For function loop; Second: Define an array object rowDatas, rowDatas = Split(datas(offest),"@#@"), that is, use the Split function to decompose the data of datas into column data with column separator "@#@" as the flag, decompose it into several data and store it in rowdatas, and assign the data rowDatas(0)……rowDatas(8) in rowdatas to the "H, C, J, K, L, M, P, Q, T" columns of "destsheet" in turn. Combine columns B and C with "-" + " / " + combine columns I and J with "-" to get the data of column "N", and swap the data before and after " / " in column "N" to get the data of column "O". Use the first "a" and the first "b" recorded by the flag to fill columns R and S. Fill the first row of terminal a with the cable number: terminal group number / position. Fill the second row of terminal b with the cable number: equipment name. If column C is “SHIELD”, then fill in “S / D” in column B, and N, R, and S are all empty; if column C is “-”, then the contents of the four columns from left to right starting from N are all empty values.

[0089] After the wiring information for a device is filled in, add a line with "S / V" format to separate different devices. This makes it easier to identify different devices and facilitates integrated viewing and actual wiring operations.

[0090] c. If discount = 0, the query fails and the program terminates. This indicates that the database in the datasheet is incomplete and needs to be manually checked and verified before being regenerated.

[0091] ⑤ Repeat steps ③ and ④, using a loop query to assign the content of sourceindex+1 from the "sourcesheet" to the first empty row of the "destsheet". Then, extract the "CNCS code" from sourceindex+1 and query the "datasheet" row by row starting from dataindex=3 to find the matching wiring information and fill it into the "destsheet". Continue until all data rows in the "sourcesheet" and the data found by keyword matching in the "datasheet" are processed and assigned to the corresponding columns in the "destsheet". Once all data rows in the sourcesheet have been queried, the wiring information in the destsheet is complete. At this point, adjust the format as needed.

[0092] ⑥ Because the recorder has 12 channels, there are two options depending on the requirements: 12 channels per group or 1 channel per group. If you choose 12 channels per group, you need to format the recorder data separately; if you choose 1 channel, no operation is required.

[0093] ⑦ Whether to add spare terminals, select as needed. If yes, fill in the percentage that needs to be spared, then get the total number of terminals used by the device in the destsheet, which is the number in the terminal name in the last row of the table, and define it as num. Then you need to add (num * percentage * 3) rows, and arrange them in the pattern of (num + 1)a, (num + 1)b, (num + 1)c.

[0094] ⑧ Drawing power supply and grounding short wires: By drawing straight lines to connect the "X" characters in the power supply column and the grounding column respectively, the short wires for power supply and grounding are obtained. At this time, the destsheet is a table with very intuitive and easy-to-distinguish equipment and wiring.

[0095] 9. Extract the table name from the "Wiring Table" to generate a table of contents, place it in the specified table, and add the corresponding page numbers. Finally, add header and footer information, and automatically paginate (based on the fact that the device cannot be divided into two pages, and the page break can only be in the middle of the device's dividing line). This completes a full "Wiring Table".

[0096] Step 105: Obtain the final wiring table for the panel device based on the wiring tables for all combination types. Specifically, this includes: extracting the table names to generate a table of contents; placing the table of contents in a designated table and adding corresponding page numbers; the wiring tables for all combination types and the designated table with added page numbers constitute the final wiring table for the panel device.

[0097] The final wiring diagram of the panel equipment is displayed in the interface as follows: Figure 9 and Figure 10As shown.

[0098] In summary, the simplified flowchart of the automatic generation method for wiring diagrams is as follows: Figure 11 As shown. From Figure 11 As can be seen, the process proceeds in two branches. The first branch: Based on general rules, using the control room panel equipment list as the design input list, several panel detail tables are generated, each named after a table listed in the "Create a table with specified table name" section. The second branch: Typical circuit diagrams of the panel equipment are converted into typical circuit data tables. After these two preparatory steps, based on the data tables obtained from the two branches, the panel equipment wiring table is generated by querying the common data column codes in the two tables.

[0099] The effectiveness of the automatic generation method for panel device wiring tables in this embodiment will be explained below.

[0100] Comparing the wiring table generated in this embodiment with wiring tables from previous projects, it meets all the data style requirements of the original wiring tables. Furthermore, through multiple data verifications, the data accuracy is guaranteed to be zero, ensuring a 0% error rate. Currently, this panel-type equipment wiring table tool has been applied to three nuclear power projects and four other nuclear-related projects. The minimum man-hours for nuclear power projects have been reduced to 50% of the original (this man-hour includes preliminary data processing until the official document release), and the reduction in man-hours is even more significant for a single panel. Figure 12 As shown. Figure 12 Part (a) shows the comparison of drawing time before and after optimization. Figure 12 Part (b) shows the comparison of the average drawing time before and after optimization.

[0101] The automatic generation tool for panel equipment wiring diagrams standardizes and refines repetitive tasks in the design process, reduces manual labor, improves efficiency, and, more importantly, increases accuracy. Its effectiveness is evident in the integration and assembly process, offering convenient viewing, clear paths, and 100% data accuracy. It also enables smooth and correct cable laying during the integration and assembly process.

[0102] The automatic generation method of panel equipment wiring table in this embodiment can be implemented based on VBA. Specifically, it consists of three steps: (1) creating a panel detail table to implement general rules; (2) creating a typical circuit data table; and (3) generating the panel equipment wiring table.

[0103] (1) Preparation of the order book

[0104] A new table with a specified name is generated based on the combinations of safety level, safety column, emergency power supply, and PAMS columns in the control room panel equipment list. This table is used to categorize the equipment in the control room panel equipment list and generate multiple panel detail tables with names listed in this table. There are approximately 74 such detail tables. The number of tables can vary randomly for different panels, depending on the combination of the safety level, safety column, emergency power supply, and PAMS columns of the panel equipment.

[0105] The panel detail list is generated using an Excel VBA program. Besides generating the panel detail list based on the "Create a table with a specified name" function, the program also sorts the data according to specified rules such as panel equipment type, coordinate location of the equipment, and hole and slot numbers for wiring paths. Furthermore, it categorizes and arranges the data based on whether the digital displays require separate power supplies, facilitating integration, assembly, and testing. The equipment sorting in this panel detail list is the same as the sorting in the panel equipment wiring table.

[0106] (2) Construction of typical loop data table

[0107] Typical loop diagrams are converted into typical loop data tables to serve as a database for querying equipment-related information in the panel details table. In other words, CAD drawings are converted into Excel data tables to form a general database.

[0108] (3) Automatic generation of wiring diagrams for panel equipment

[0109] An internal wiring list—also known as a panel equipment wiring table—is generated based on multiple panel detail tables and four typical circuit data tables, using a specified template. This list uses intuitive terminal group names as table titles, facilitating quick extraction of table names for subsequent catalog creation. The internal wiring list is implemented using an Excel VBA program.

[0110] A panel equipment list (design input) and a set of typical circuit tables (database) can be automatically generated into a ready-to-use panel equipment wiring table with a single click using a VBA program. For subsequent use, as long as the circuit types used in the panel equipment list are included in the circuit data table, any panel equipment list can be retrieved to automatically generate the panel equipment wiring table.

[0111] In addition, for nuclear power, the equipment in the panel equipment list may change multiple times in a project, which involves the partial upgrade of the wiring table. This tool can be used to select the specified panel details to generate the wiring table, and then a self-made VBA comparison program can be used to compare the old and new wiring tables, marking the changes and inconsistencies with colors and the revised version.

[0112] The above method effectively overcomes the various shortcomings of existing manual programming methods, and can automatically generate the required wiring table based on design input without any human intervention, thus having high utilization value.

[0113] Example 2

[0114] In order to implement the method corresponding to Embodiment 1 above and achieve the corresponding functions and technical effects, an automatic generation system for panel equipment wiring tables is provided below.

[0115] See Figure 13 The system includes:

[0116] The drawing acquisition module 801 is used to acquire typical circuit diagrams of the equipment on the target panel; one typical circuit diagram corresponds to one type of equipment on the panel.

[0117] The drawing conversion module 802 is used to convert each typical circuit diagram into a data table to obtain a typical circuit data table, and to construct a typical circuit database based on all the typical circuit data tables; the information columns in the typical circuit data table include: equipment code column, circuit type column, terminal column, terminal information column, and prefabricated cable model column.

[0118] The detail table construction module 803 is used to construct multiple panel detail tables according to the panel equipment list of the target panel; one combination type corresponds to one panel detail table; the data columns in the panel detail table include: safety level, safety column, emergency power supply and protection group; the combination type is a permutation and combination of safety level type, safety column type, emergency power supply type and protection group type.

[0119] The information query module 804 is used to fill in the terminal group name in column A1 of any panel detail table, and use the equipment code as the index column to search for the required information in the typical circuit database to generate a wiring table for the corresponding combination type; the wiring table is named according to the terminal group name.

[0120] The wiring table generation module 805 is used to obtain the final wiring table of the panel equipment based on all combinations of wiring tables.

[0121] Example 3

[0122] This embodiment provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor runs the computer program to enable the electronic device to execute the automatic generation method of panel device wiring table of Embodiment 1.

[0123] Alternatively, the aforementioned electronic device may be a server.

[0124] In addition, this embodiment of the invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the automatic generation method for panel device wiring tables of Embodiment 1.

[0125] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.

[0126] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for automatically generating wiring diagrams for panel devices, characterized in that, include: Obtain typical circuit diagrams of the tray surface equipment on the target tray; one typical circuit diagram corresponds to one type of equipment on the tray surface. Each typical loop diagram is converted into a data table to obtain a typical loop data table, and a typical loop database is constructed based on all the typical loop data tables; the information columns in the typical loop data table include: equipment code column, loop type column, terminal column, terminal information column, and prefabricated cable model column; Based on the panel equipment list of the target panel, construct multiple panel detail tables; one combination type corresponds to one panel detail table; the data columns in the panel detail table include: safety level, safety column, emergency power supply and protection group; the combination type is a permutation and combination of safety level type, safety column type, emergency power supply type and protection group type; For any panel detail table, enter the terminal group name in column A1 of the panel detail table, and use the equipment code as the index column to search for the required information in the typical circuit database to generate a wiring table for the corresponding combination type; the wiring table is named according to the terminal group name; The final wiring diagram for the panel equipment is obtained based on the wiring diagrams for all combinations.

2. The method for automatically generating a wiring diagram for panel equipment according to claim 1, characterized in that, Each typical loop diagram is transformed into a data table to obtain a typical loop data table, specifically including: Obtain basic information for the current page of the typical loop diagram; the basic information includes: equipment code, loop type, and prefabricated cable model; Use the row below the last row of the data table after the previous page is filled as the fill row for the current page; Starting from the fill row of the current page, fill the drawing information into the corresponding column of the data table to obtain the first data table; Determine the total number of three-layer terminals of the elements in the current page of the typical circuit diagram, query the wiring terminal and terminal information of each three-layer terminal in sequence, and fill the wiring terminal and terminal information into the corresponding column of the first data table to obtain the second data table; the second data table is used as the data table after the current page is filled; the terminal information includes: terminal name, power positive short circuit, power negative short circuit, ground short circuit, wire core number and wire core specification; Determine if the current page is the last page of the typical loop diagram. If so, designate the second data table as the typical loop data table; otherwise, proceed to fill the next page.

3. The method for automatically generating a wiring diagram for panel equipment according to claim 2, characterized in that, Determine the total number of three-layer terminals for each element in the current page of the typical circuit diagram. Then, sequentially query the wiring and terminal information for each three-layer terminal, and fill this information into the corresponding column of the first data table to obtain the second data table, which specifically includes: For any three-layer terminal of a graphic element in the current page of a typical circuit diagram, if the lead-out line on the right side of the three-layer terminal is ">0" and the other end is connected to the graphic element terminal in the device frame, then the text information on the right side of the graphic element terminal will be used as the basis for filling the terminal column in the first data table, the text information on the left side of the graphic element terminal will be used as the basis for filling the terminal name column, the positive power short-circuit column, the negative power short-circuit column, and the ground short-circuit column in the first data table, and the text label information above the lead-out line near the three-layer terminal will be used as the basis for filling the wire core number column and the wire core specification column in the first data table; For any three-layer terminal of an element in the current page of a typical circuit diagram, if the lead-out line on the right side of the three-layer terminal is "=0" or "<0" and the other end is not connected to the element terminal in the device frame, then the terminal column, terminal name column, power positive shorting column, power negative shorting column and ground shorting column in the first data table are all filled with "-", and the wire core number column and wire core specification column in the first data table are all filled with "empty".

4. The method for automatically generating a wiring diagram for panel equipment according to claim 1, characterized in that, Based on the list of equipment on the target panel, construct multiple panel detail tables, specifically including: Using Excel's permutation and combination function, different safety levels, different safety columns, different emergency power supplies, and different protection groups can be permuted and combined to obtain a variety of combinations; Create multiple sheets; each sheet includes columns named Security Level, Security Column, Emergency Power Supply, and Protection Group; one sheet corresponds to one combination type; The data information is traversed and queried in the list of devices on the target panel, and the corresponding data is filled into the corresponding sheet to generate multiple panel detail tables; the data information includes: safety level information, safety column information, emergency power supply information, and protection group information.

5. The method for automatically generating a wiring diagram for panel equipment according to claim 1, characterized in that, For any panel detail table, enter the terminal group name in column A1 of the panel detail table, and use the equipment code as the index column to search for the required information in the typical circuit database to generate a wiring table for the corresponding combination type, specifically including: If the working name of the current market detail sheet contains security-level characters or non-security-level characters, then open and activate the current market detail sheet, and define the current market detail sheet as a sourcesheet; Create an empty table named after the terminal group name, and define the empty table as destsheet; Based on the data required for each row in the destsheet, retrieve the corresponding data from the sourcesheet and assign values ​​to the destsheet. For empty data rows in the destsheet after assignment, query and assign values ​​in the typical circuit database's return data table to obtain the wiring table for the combination type corresponding to the current panel details table.

6. The method for automatically generating a wiring diagram for panel equipment according to claim 1, characterized in that, The final wiring diagram for the panel equipment is obtained based on the wiring diagrams for all combination types, specifically including: Extract the table names from the wiring table and generate a directory; Place the table of contents in the specified table and add the corresponding page numbers; The wiring tables for all combinations and the specified tables at the end of the supplementary pages constitute the final wiring table for the panel equipment.

7. An automatic generation system for panel equipment wiring diagrams, characterized in that, include: The drawing acquisition module is used to acquire typical circuit diagrams of the equipment on the target panel; one typical circuit diagram corresponds to one type of equipment on the panel. The drawing conversion module is used to convert each typical circuit diagram into a data table to obtain a typical circuit data table, and to construct a typical circuit database based on all the typical circuit data tables; the information columns in the typical circuit data table include: equipment code column, circuit type column, terminal column, terminal information column, and prefabricated cable model column; The detailed list construction module is used to construct multiple panel detailed lists according to the panel equipment list of the target panel; one combination type corresponds to one panel detailed list; the data columns in the panel detailed list include: safety level, safety column, emergency power supply and protection group; the combination type is a permutation and combination of safety level type, safety column type, emergency power supply type and protection group type; The information query module is used to fill in the terminal group name in column A1 of any panel detail table, and use the equipment code as the index column to search for the required information in the typical circuit database to generate a wiring table for the corresponding combination type; the wiring table is named according to the terminal group name; The wiring table generation module is used to generate the final wiring table for the panel equipment based on all combinations of wiring table types.

8. An electronic device, characterized in that, The device includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform the automatic generation method of the panel device wiring table according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the automatic generation method for panel device wiring tables as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Knowledge base system for an equipment market

    US20030074391A1

  • Cache based key-value store mapping and replication

    US20130117227A1