Automatic generation method and system of electrical external wiring diagram

By embedding spreadsheets and writing functions in CAD software, the remote control module address conversion is automatically handled, which solves the problems of low efficiency and poor accuracy in drawing electrical external wiring diagrams, and realizes efficient and accurate wiring diagram generation and update.

CN120408911APending Publication Date: 2025-08-01BEIJING MATERIALS HANDLING TECH INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510368190.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

In the prior art, the drawing efficiency of electrical external wiring diagrams is low and prone to errors, and the manual calculation of the remote control module address is cumbersome and inaccurate, resulting in construction delays and equipment abnormalities.

Method used

Embed a spreadsheet as an OLE object in CAD software, pre-store conversion rules and write functions, automatically convert remote control module addresses through multi-layer IF condition judgment functions, and combine OLE objects with CAD drawings to realize automated address conversion and drawing updates.

Benefits of technology

It improves the drawing efficiency and accuracy of electrical external wiring diagrams, avoids manual calculation errors, ensures the accuracy and real-time update of address conversion, and improves construction quality and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120408911A_ABST
    Figure CN120408911A_ABST
Patent Text Reader

Abstract

The invention provides an automatic generation method and system for an electrical external wiring diagram, and belongs to the technical field of electrical engineering, and the method comprises the steps: writing a function in a spreadsheet, embedding a conversion rule into calculation logic of the function, and enabling the function to be used for carrying out the automatic conversion of a custom address and a physical address of a remote control module; receiving and inputting parameters of external equipment; calling corresponding conversion logic from the conversion rule according to the type of the remote control module, and calculating parameters through functions to obtain external wiring information; and displaying the external wiring information in a CAD drawing in a visual form, and associating the external wiring information with the CAD drawing through an OLE object to edit and update an external wiring diagram. According to the method, the electronic table in which the conversion rule and the automatic conversion function are pre-stored is embedded in the CAD drawing, so that automatic conversion and real-time visual display of the self-defined address and the physical address of the remote control module are realized, and the drawing efficiency and accuracy of the electrical external wiring diagram are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electrical engineering technology, and in particular to a method and system for automatically generating an electrical external wiring diagram. Background Art

[0002] Electrical external wiring diagrams are an essential component of electrical system design, and their quality directly impacts the efficiency and accuracy of on-site construction and equipment maintenance. Currently, connections between electrical cabinets and external devices are typically drawn manually using CAD software.

[0003] In the prior art, when drawing electrical external wiring diagrams, technicians typically need to manually calculate and mark the location of each module terminal based on the mapping relationship between the physical address of different remote control modules and manually defined addresses. However, there are many types of remote control modules, and their physical address structures and corresponding rules vary. Manual address conversion is not only cumbersome and time-consuming, but also prone to calculation errors. Address errors can lead to inconsistencies between the drawing information and the actual on-site installation, resulting in on-site rework, construction delays, and equipment operation anomalies, seriously affecting project progress and quality.

[0004] Therefore, how to improve the efficiency and accuracy of drawing electrical external wiring diagrams has become an important technical problem that needs to be solved urgently. Summary of the Invention

[0005] The present invention provides a method, system, electronic device and storage medium for automatically generating an electrical external wiring diagram, which are used to solve the defects in the prior art and improve the efficiency and accuracy of drawing the electrical external wiring diagram.

[0006] The present invention provides a method for automatically generating an electrical external wiring diagram, comprising the following steps: Embed a spreadsheet in a CAD software environment as an object connection and embedding an OLE object, and pre-store conversion rules for different remote control module types in the spreadsheet; Writing a function in the electronic form and embedding the conversion rule into the calculation logic of the function, wherein the function is used to automatically convert the custom address to the physical address of the remote control module; receiving and inputting parameters of an external device, and storing the parameters in designated cells of the electronic table; Calling corresponding conversion logic from the conversion rule according to the remote control module type, and operating the parameters through the function to obtain external wiring information including the remote control module terminal position mark; The external wiring information is displayed in the CAD drawing in a visual form and is associated with the CAD drawing in real time through the OLE object to achieve the editing and updating of the external wiring diagram.

[0007] According to an automatic generation method of an electrical external wiring diagram provided by the present invention, the corresponding conversion logic is called from the conversion rules according to the remote control module type, and the parameters are calculated through the function to obtain external wiring information including the terminal position mark of the remote control module, including: Determine the address mapping relationship in the conversion rules according to the remote control module type; Input the parameters into the function, execute the conversion logic through the function, and convert the custom address into the physical address of the remote control module; Generate external wiring information including the terminal position mark of the remote control module according to the physical address.

[0008] According to an automatic generation method of an electrical external wiring diagram provided by the present invention, the function is a multi-layer nested IF conditional judgment function; the inputting the parameters into the function and executing the conversion logic through the function to convert the custom address into the physical address of the remote control module includes: Determine the nested level number of the IF conditional judgment function according to the tree-shaped block structure of the remote control module; wherein, the nested level number is the same as the level number of the tree-shaped block structure, and each nested level corresponds to a level in the tree-shaped block structure respectively; Input the parameters into the IF conditional judgment function, judge the value of the custom address layer by layer, and map the custom address to the corresponding physical address in the tree-shaped block structure step by step.

[0009] According to an automatic generation method of an electrical external wiring diagram provided by the present invention, the tree-shaped block structure includes at least one of the following types: 4×4 tree-shaped block structure, corresponding to 16 physical addresses of the UR20 module, and each block corresponds to a judgment branch in the IF conditional judgment function; 3×3 tree-shaped block structure, corresponding to 9 physical addresses of the Siemens ET200 module or the Beckhoff I / O module, and each block corresponds to a judgment branch in the IF conditional judgment function.

[0010] According to an automatic generation method of an electrical external wiring diagram provided by the present invention, the parameters of the external device include the control point number of the external device, the cable core wire specification, the power terminal block address, and the remote control module type; The specified cell is divided into a hidden area and a display area. Among them, the hidden area is used to receive and store the parameters of the external device for the function to call and calculate; the display area is used to display in real time the physical address of the remote control module automatically calculated by the function based on the parameters in the hidden area.

[0011] A method for automatically generating an electrical external wiring diagram according to the present invention further includes: According to the cable core wire specification, dynamically adjust the column width and row height of the corresponding cell in the display area of the spreadsheet to ensure that the content of the specified cell is completely displayed; So that the terminal position mark of the remote control module automatically calculated in the specified cell is completely displayed in the display area.

[0012] The present invention also provides an automatic generation system for an electrical external wiring diagram, including the following modules: The first processing module is used to embed a spreadsheet as an object linking and embedding (OLE) object in the CAD software environment, and pre-store the conversion rules for different types of remote control modules in the spreadsheet; The second processing module is used to write a function in the spreadsheet and embed the conversion rules into the calculation logic of the function. The function is used to automatically convert the custom address and the physical address of the remote control module; The third processing module is used to receive and input the parameters of the external device and store the parameters in the specified cell of the spreadsheet; The fourth processing module is used to call the corresponding conversion logic from the conversion rules according to the remote control module type, and perform operations on the parameters through the function to obtain the external wiring information including the terminal position mark of the remote control module; The fifth processing module is used to display the external wiring information in a visual form in the CAD drawing and be real-time associated with the CAD drawing through the OLE object to realize the editing and updating of the external wiring diagram.

[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the method for automatically generating an electrical external wiring diagram as described in any one of the above.

[0014] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the method for automatically generating an electrical external wiring diagram as described in any one of the above.

[0015] The present invention also provides a computer program product, including a computer program which, when executed by a processor, implements the automatic generation method of the electrical external wiring diagram as described in any one of the above.

[0016] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: By embedding a spreadsheet as an OLE object in the CAD software environment and pre-storing conversion rules for different types of remote control modules in the spreadsheet, a data basis and rule basis are provided for subsequent automatic address conversion, ensuring the accuracy of the mapping relationship between the physical addresses and custom addresses of each module; by writing functions in the spreadsheet and embedding the pre-stored conversion rules into the calculation logic of the functions, automatic conversion between custom addresses and the physical addresses of remote control modules is achieved, avoiding the error risks brought by traditional manual calculations and improving the efficiency and stability of the conversion process; by receiving and inputting the parameters of external devices and storing these parameters in specified cells of the spreadsheet, centralized management and invocation of data are realized, avoiding repeated input of parameters and thus improving the overall work efficiency; by calling the corresponding conversion logic from the conversion rules according to the type of remote control module and performing operations on the stored parameters through functions, external wiring information including terminal position marks of remote control modules is automatically generated, ensuring the accuracy and real-time update of the conversion results; by displaying the external wiring information in a visual form on the CAD drawing and establishing a real-time association with the CAD drawing through the OLE object, dynamic editing and timely update of the external wiring diagram are achieved, thus effectively improving the drawing efficiency and accuracy of the electrical external wiring diagram. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0018] Figure 1 is one of the flow schematic diagrams of the automatic generation method of the electrical external wiring diagram provided by the present invention.

[0019] Figure 2 is the second flow schematic diagram of the automatic generation method of the electrical external wiring diagram provided by the present invention.

[0020] Figure 3 is the third flow schematic diagram of the automatic generation method of the electrical external wiring diagram provided by the present invention.

[0021] Figure 4 It is the fourth flow schematic diagram of the method for automatically generating the electrical external wiring diagram provided by the present invention.

[0022] Figure 5 It is the overall schematic diagram of the external wiring diagram provided by the present invention.

[0023] Figure 6 It is the schematic diagram of the external wiring diagram provided by the present invention Figure 3 Partial composition schematic diagram.

[0024] Figure 7 It is one of the schematic diagrams of the spreadsheet editor for OLE nested objects provided by the present invention.

[0025] Figure 8 It is the second schematic diagram of the spreadsheet editor for OLE nested objects provided by the present invention.

[0026] Figure 9 It is the schematic diagram of the traditional external wiring diagram provided by the present invention.

[0027] Figure 10 It is the schematic diagram of the external wiring diagram of this solution provided by the present invention.

[0028] Figure 11 It is the structural schematic diagram of the automatic generation system of the electrical external wiring diagram provided by the present invention.

[0029] Figure 12 It is the structural schematic diagram of the electronic device provided by the present invention. Detailed implementation manners

[0030] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without making creative efforts based on the embodiments in the present invention belong to the scope of protection of the present invention.

[0031] It should be noted that in the description of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element. The orientation or positional relationship indicated by terms such as "upper", "lower", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the system or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and thus cannot be construed as a limitation of the present invention. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0032] The terms "first", "second", etc. in the present invention are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are usually of the same category, and do not limit the number of objects. For example, the first object can be one or more. In addition, "and / or" means at least one of the connected objects, and the character " / ", generally indicates that the related objects before and after are in an "or" relationship.

[0033] The following will be combined with Figures 1-12 to describe the automatic generation method, system, electronic device and storage medium of the electrical external wiring diagram provided by the present invention.

[0034] Figure 1 is one of the schematic flowcharts of the automatic generation method of the electrical external wiring diagram provided by the present invention, as Figure 1 shown, including but not limited to the following steps: Step 101: Embed a spreadsheet as an Object Linking and Embedding (OLE) object in the CAD software environment, and pre-store the conversion rules for different types of remote control modules in the spreadsheet.

[0035] In the method for automatically generating an electrical external wiring diagram, step 101 constitutes the basic implementation link of the entire technical solution by embedding a spreadsheet as an Object Linking and Embedding (OLE) object in the CAD software environment and pre-storing conversion rules. The innovative design of this step mainly aims at the problems of low efficiency and easy errors in module address conversion in the traditional CAD drawing method. Through the deep integration of the spreadsheet and the CAD software, a breakthrough improvement of the technical solution is achieved.

[0036] During specific implementation, technicians first need to create a new drawing file in CAD software (such as Auto CAD or Zhongwang CAD), and select to embed a spreadsheet as an OLE object through the insert object function. The spreadsheet preferably uses the Excel or WPS spreadsheet format because of its perfect function calculation ability and cell format control characteristics. In the spreadsheet, the address conversion rules for different models of remote control modules (such as Weidmüller UR20 module, Siemens ET200 module, etc.) need to be pre-stored. These conversion rules are formed based on the accumulation of actual project experience. For example, the UR20 module adopts 16 groups of physical address mapping relationships corresponding to a 4×4 tree-shaped block structure, while the ET200 module may adopt 9 groups of mapping relationships corresponding to a 3×3 tree-shaped block structure. The pre-storing process needs to ensure that the conversion rules for each module model are stored independently, and a fast indexing mechanism is established through the module type identifier.

[0037] The implementation effect of this step is reflected in three dimensions: First, the embedding of the OLE object enables the data calculation ability of the spreadsheet and the graphic display ability of the CAD software to complement each other, solving the defect that traditional pure CAD drawing cannot achieve dynamic calculation; second, the pre-stored modular conversion rules provide a standardized processing basis for subsequent automatic address conversion, and technicians do not need to repeatedly write conversion logic; finally, this design establishes a structured data carrier for parameter input and function operation in subsequent steps, and the cells of the spreadsheet can accurately control the data display position and format.

[0038] Step 102: Write a function in the spreadsheet and embed the conversion rule into the calculation logic of the function. The function is used to automatically convert the custom address and the physical address of the remote control module.

[0039] Step 102 realizes the automatic conversion function of the manually defined address and the physical address of the remote control module by writing a specific function in the spreadsheet and embedding the conversion rule into the calculation logic. This step solves the problems of low efficiency and easy errors in manual conversion in traditional electrical design. Especially for remote control modules with complex tree structures such as Weidmüller UR20, the traditional method requires technicians to manually consult technical manuals and perform multiple-step conversions, which is both time-consuming and error-prone.

[0040] In the specific implementation process, technicians write multi-layer nested IF conditional judgment functions in a spreadsheet embedded in the CAD environment. Taking the UR20 module as an example, for its specific 4×4 tree-shaped block structure, 16 layers of IF function nesting need to be written, and each nested level precisely corresponds to a physical block of the module. The specific form of the function is a structure like "L2&IF(M2=0,"1-1",IF(M2=1,"1-2"...)", for example, I2 = L2&+IF(M2=0,"1-1",IF(M2=1,"1-2",IF(M2=2,"1-3",IF(M2=3,"1-4",IF(M2=4,"2-1",IF(M2=5,"2-2",IF(M2=6,"2-3",IF(M2=7,"2-4",IF(M2=8,"3-1",IF(M2=9,"3-2",IF(M2=10,"3-3",IF(M2=11,"3-4",IF(M2=12,"4-1",IF(M2=13,"4-2",IF(M2=14,"4-3",IF(M2=15,"4-4"))))))))))))))))). Among them, L2 represents the module letter identifier. The first digit of the remote module address is represented by a letter as a convention and is sorted in alphabetical order. For example: the letter "a" represents the module arranged in the first position. The letter "b" represents the module arranged in the second position. And so on in alphabetical order. M2 represents the manually defined address value input. IF(M2=0,"1-1",IF(M2=1,"1-2",IF(M2=2,"1-3",IF(M2=3,"1-4",IF(M2=4,"2-1",IF(M2=5,"2-2",IF(M2=6,"2-3",IF(M2=7,"2-4",IF(M2=8,"3-1",IF(M2=9,"3-2",IF(M2=10,"3-3",IF(M2=11,"3-4",IF(M2=12,"4-1",IF(M2=13,"4-2",IF(M2=14,"4-3",IF(M2=15,"4-4")))))))))))))))) is composed of IF nested statements. According to the characteristics of the tree structure of the UR20 module, 4 block nested statements are used, and each block contains 4 layers of nesting, with a total of 16 groups of nested statements. For other types of remote control modules, such as modules with a 3×3 tree structure, 9 layers of IF function nesting need to be written correspondingly. These functions are embedded in specific cells of the spreadsheet, usually in the hidden parameter input area.

[0041] The implementation of this step has brought significant technical effects. Through automated address conversion, errors that may occur during manual conversion are completely avoided, ensuring the accuracy of address conversion. At the same time, the conversion process is completed instantaneously, greatly improving work efficiency. In addition, this functional design also has good scalability. When new module models need to be supported, only the corresponding function logic needs to be added to the spreadsheet, without modifying the overall architecture. In practical applications, this solution can handle the address conversion requirements of multiple different types of remote control modules simultaneously.

[0042] Step 103: Receive and input the parameters of the external device, and store the parameters in the specified cells of the spreadsheet.

[0043] In a possible implementation, the parameters of the external device include the control point number of the external device, the cable core wire specification, the power terminal block address, and the type of remote control module; The specified cells are divided into a hidden area and a display area. Among them, the hidden area is used to receive and store the parameters of the external device for function call and calculation; the display area is used to display in real time the physical address of the remote control module automatically calculated by the function based on the parameters in the hidden area.

[0044] By receiving and storing the parameters of the external device in the specified cells of the spreadsheet, Step 103 provides the necessary data basis for subsequent automatic address conversion. In the traditional electrical design process, technicians need to repeatedly consult the equipment list and manually mark various parameters on the drawings, which is not only inefficient but also prone to omissions or errors in marking. This step effectively solves this problem by establishing a structured parameter input mechanism.

[0045] During specific implementation, technicians classify and input the key parameters of the external device into the specified cell area pre-divided in the spreadsheet. These parameters include important information such as the control point number of the external device, the cable core wire specification, the power terminal block address, and the type of remote control module. Among them, the cable core wire specification needs to be input according to the actual project requirements, such as different specifications like 18×0.3 core, 12×0.3 core, etc.; the power terminal block address needs to be accurately input in standard formats such as "3X5", "3X6", etc. To optimize the user experience, the specified cells of the spreadsheet are intelligently divided into two parts: a hidden area and a display area. The hidden area is specifically used to receive and store the original input parameters, which serve as the input source for function calculation; the display area then displays in real time the result information such as the physical address of the remote control module obtained after function calculation. This partition design not only protects the integrity of the original data but also ensures the simplicity of the drawing output interface.

[0046] The implementation of this step brings technical advantages in multiple aspects. First of all, the structured parameter input method avoids the format chaos problem that may be caused by traditional free annotation. All parameters are stored in the specified location according to the predetermined format, greatly improving the data consistency and traceability. Secondly, the division design of the hidden area and the display area not only meets the needs of technicians to view the complete parameters, but also ensures the simplicity and professionalism of the final drawing output to customers. Most importantly, this parameter storage mechanism provides a reliable data source for the automatic calculation of functions in subsequent steps, ensuring the accuracy and reliability of the entire address conversion process. In the actual application process, this design significantly reduces the parameter input error rate and improves the efficiency of drawing production.

[0047] Step 104: Call the corresponding conversion logic from the conversion rules according to the type of the remote control module, and perform operations on the parameters through a function to obtain the external wiring information including the terminal position mark of the remote control module.

[0048] Step 104 realizes the automatic conversion from the manually defined address to the physical address of the remote control module by calling the pre-stored conversion logic and performing function operations. This is the core innovation of this solution. In the traditional method, technicians need to manually consult the module technical manual and perform complex address conversions, which is not only time-consuming and laborious, but also extremely error-prone. Especially when facing remote control modules of different manufacturers and different models, the conversion rules vary greatly and the error rate remains high.

[0049] In a possible implementation manner, referring to Figure 2 , Figure 2 is the second flow schematic diagram of the method for automatically generating the electrical external wiring diagram provided by the present invention. Step 104 specifically includes steps 201-203: Step 201: Determine the address mapping relationship in the conversion rules according to the type of the remote control module.

[0050] Step 201 establishes an accurate rule basis for subsequent automatic address conversion by determining the address mapping relationship corresponding to the type of the remote control module. In traditional electrical design practices, due to the different physical address coding systems adopted by remote control modules of different manufacturers, technicians must memorize the address correspondence rules of various modules, which not only increases the work burden but also easily leads to conversion errors. The innovation of this step lies in the intelligent matching of the module type and the conversion rules by pre-storing the standardized address mapping relationship.

[0051] During the specific implementation process, the system retrieves the corresponding address mapping relationship from the pre-stored rule library according to the type identifier of the remote control module input. Taking the Weidmüller UR20 module as an example, which adopts a unique 4×4 tree-shaped block physical address structure, the system will automatically call the physical address coding rules in the formats of "b3-1", "b3-2", etc.; for other modules such as Siemens ET200, its unique 3×3 block address structure will be matched. These pre-stored mapping relationships completely record the corresponding rules between the module physical address and the user-defined address, including the sorting rules of letter identifiers (such as a, b, c represent the first, second, and third modules in sequence) and the hierarchical relationship of digital blocks.

[0052] The implementation of this step has brought significant technological progress. First, by establishing a standardized address mapping rule library, it ensures that accurate conversion bases can be obtained for different module types, avoiding the rule confusion that may be caused by manual memory. Second, this modular design makes it simple and efficient to support new module types, only requiring expanding the rule library without modifying the system architecture. Most importantly, this step provides accurate conversion rules for subsequent function operations and is a key link to ensure the accuracy and reliability of the entire automatic address conversion process.

[0053] Step 202: Input the parameters into the function, and through the function to execute the conversion logic, convert the user-defined address into the physical address of the remote control module.

[0054] Step 202 converts the user-defined address into the physical address by performing function operations, which is the core link for this solution to achieve automatic conversion. In the traditional electrical design process, technicians need to manually convert the input point such as "I4.1" into the physical address such as "b3-2" through module rules. This process is not only cumbersome but also extremely error-prone when facing multiple module models. The innovation of this step lies in achieving the complete automation of this conversion process through pre-programmed function logic.

[0055] In a possible implementation manner, the function is a multi-layer nested IF conditional judgment function; referring to Figure 3 , Figure 3 Figure 3 of the flow schematic diagram of the method for automatically generating the electrical external wiring diagram provided by the present invention, step 202 specifically includes the following steps: Step 301: Determine the nesting level number of the IF conditional judgment function according to the tree-shaped block structure of the remote control module; where the nesting level number is the same as the level number of the tree-shaped block structure, and each nesting level corresponds to a level in the tree-shaped block structure respectively.

[0056] Step 302: Input the parameters into the IF conditional judgment function, and by judging the value of the user-defined address layer by layer, map the user-defined address to the corresponding physical address in the tree-shaped block structure level by level.

[0057] In a possible implementation, the tree-shaped block structure includes at least one of the following types: 4×4 tree-shaped block structure, corresponding to 16 physical addresses of the UR20 module, and each block corresponds to a judgment branch in the IF conditional judgment function; 3×3 tree-shaped block structure, corresponding to 9 physical addresses of the Siemens ET200 module or the Beckhoff I / O module, and each block corresponds to a judgment branch in the IF conditional judgment function.

[0058] Step 301 provides an accurate logical framework for automatic address conversion by establishing the corresponding relationship between the tree-shaped block structure of the remote control module and the nested levels of the IF function. In the traditional electrical design method, technicians need to understand the physical structure characteristics of different modules by themselves and manually perform address conversion. Especially when facing modules with complex tree structures such as UR20, it is very easy to make mistakes in manually judging the hierarchical relationship. The innovation of this step lies in transforming the physical structure characteristics of the module into programmable function logic levels, realizing the precise matching of the structure characteristics and the calculation rules.

[0059] In the specific implementation process, the system first analyzes the physical structure characteristics of the remote control module to determine the specific hierarchical architecture of its tree-shaped blocks. Taking the Weidmüller UR20 module as an example, its 4×4 tree-shaped block structure is decomposed into 4 main blocks, and each block contains 4 sub-levels, forming a total of 16 terminal physical addresses. Based on this structure characteristic, the system automatically configures 16 layers of nested IF conditional judgment functions, and each layer of function corresponds to a specific level in the tree structure. For example, the first layer of IF judgment corresponds to the letter identification of the module (such as b1, b2, etc.), and the subsequent layers sequentially judge the digital block positions (such as 1-1 to 4-4). For other module types such as 3×3 structured modules, such as the Siemens ET200 module or the Beckhoff I / O module, 9 layers of nested IF functions are configured accordingly. This hierarchical correspondence ensures that the function can accurately simulate the physical address distribution characteristics of the module.

[0060] Furthermore, step 302 realizes the accurate conversion from the manually defined address to the physical address through the implementation of the address mapping mechanism of layer-by-layer judgment, which is the most innovative technical breakthrough in this solution. In the traditional electrical design method, technicians need to manually track the corresponding positions of each address in the physical structure of the module. This process is not only time-consuming, but also very prone to hierarchical judgment errors when dealing with multi-layer tree structures. This step perfectly solves this technical problem by deeply binding the tree-shaped block structure and the conditional judgment function.

[0061] In specific implementation, the system sequentially performs IF condition judgments on each layer according to the hierarchical correspondence established in step 301 for the input user-defined address values. Taking the 4×4 structure of the UR20 module as an example, when the input value is "5", the system first determines that this value is in a large-scale hierarchical level such as the first block (values 0 - 3), the second block (values 4 - 7), etc., and then gradually refines to the specific sub-hierarchical position. Each layer of judgment precisely corresponds to an actual block in the physical structure of the module, and finally outputs a complete physical address such as "b2-3". The entire process simulates the thinking process of manual address search, but ensures 100% accuracy through programmed execution. For modules with different structures, the system automatically adapts the corresponding number of judgment levels. For example, a 3×3 structure module uses a 9-layer judgment logic.

[0062] The implementation of this step has achieved revolutionary technical effects. First, it shortens the address search work that originally took several minutes for professional technicians to milliseconds-level automatic calculation, resulting in a significant improvement in efficiency. Second, through hierarchical and precise judgment, it completely eliminates the problems of hierarchical confusion or position misjudgment that may be caused by manual operations. Third, this structured judgment mechanism enables the system to easily expand to support new module types, simply by configuring the corresponding hierarchical judgment rules.

[0063] Step 203: Generate external wiring information containing the terminal position mark of the remote control module according to the physical address.

[0064] By generating external wiring information containing precise position marks, step 203 realizes the standardized output of electrical design data, which is a key link to ensure the accuracy of on-site construction. In traditional design methods, the presentation forms of physical addresses are not unified, which easily leads to misunderstandings among construction personnel and then wiring errors. The innovation of this step lies in converting the calculated physical address into a standardized terminal position mark to form complete wiring information that can directly guide construction.

[0065] In the specific implementation process, the system intelligently combines the physical address obtained by function operation (such as "b3-2") with parameters such as the external device control point number and cable core wire specification to generate external wiring information in a standard format. These information not only include the physical connection point positions of the module, but also integrate key parameters such as cable specifications and power terminal block addresses to form complete connection instructions. The system automatically fills these information into the display area of the spreadsheet and formats them according to the preset drawing specifications to ensure that the output wiring information is clear and easy to read.

[0066] Step 105: Display the external wiring information in a visual form in the CAD drawing and establish real-time association with the CAD drawing through an OLE object to realize the editing and updating of the external wiring diagram.

[0067] Step 105 realizes the efficient output and dynamic maintenance of electrical design results by visually presenting external wiring information on the CAD drawing and maintaining real-time association with OLE objects. In traditional design methods, the CAD drawing is separated from the calculation data, and any parameter modification requires manual synchronization of the drawing, which is not only inefficient but also prone to inconsistencies between the drawing and the data. The innovation of this step lies in the seamless integration of spreadsheet calculation data and CAD drawing display using OLE technology.

[0068] During specific implementation, the system automatically presents the external wiring information generated in the spreadsheet, including the terminal position markings of remote control modules, cable connection information, etc., at the specified position on the CAD drawing through OLE object linking technology. When technicians modify any parameter in the spreadsheet, such as adjusting the external device number or cable specification, these changes will be immediately reflected in the CAD drawing through the two-way linking mechanism of the OLE object, without the need for manual redrawing or annotation. At the same time, graphic elements in the CAD drawing, such as connection lines and device symbols, will also automatically adjust their layouts according to the changes in the wiring information to keep the drawing clean and standardized. This dynamic association mechanism not only supports updating the drawing by modifying parameters in the spreadsheet but also allows directly adjusting the drawing layout in the CAD environment while maintaining the accuracy of the data source.

[0069] In a possible implementation manner, referring to Figure 4 , Figure 4 is the fourth flowchart of the method for automatically generating an electrical external wiring diagram provided by the present invention. The method further includes the following steps: Step 401: Dynamically adjust the column width and row height of the corresponding cells in the display area of the spreadsheet according to the cable core wire specification to ensure the complete display of the content in the specified cells.

[0070] Step 402: Ensure that the remotely controlled module terminal position markings automatically calculated in the specified cells are completely displayed within the display area.

[0071] Steps 401 and 402 solve the key technical problem of the integrity of information display under different cable specifications by dynamically adjusting the cell layout of the spreadsheet display area. In traditional electrical design methods, fixed-format tables often cannot adapt to the changes in the number of cable cores, resulting in truncated or incomplete display of long texts, seriously affecting the readability of the drawing and the construction accuracy. The innovation of this step lies in realizing the adaptive adjustment of the display area to ensure the complete presentation of wiring information under various cable specifications.

[0072] During the specific implementation process, the system first automatically identifies the input cable core wire specification parameters, such as different specifications like 12×0.3 core, 18×0.3 core, or 60×0.3 core. According to the difference in the number of core wires, the display area of the spreadsheet will intelligently adjust the row height and column width of the corresponding cells: for specifications with a larger number of core wires (such as 60×0.3 core), the system will automatically expand the cell size to accommodate more content; while for regular specifications, it will maintain the standard layout. This adjustment is achieved through the automatic formatting function of the spreadsheet to ensure that key information such as the terminal position marking of the remote control module can be completely displayed under any specification. At the same time, the system will maintain the structural stability of the overall table to avoid layout chaos caused by local adjustments.

[0073] The implementation of this step has brought significant technical effects. First of all, the adaptive display mechanism has completely solved the problem that traditional fixed-format tables cannot be compatible with multiple cable specifications, enabling the design scheme to flexibly handle various complex scenarios. Secondly, the intelligent adjustment function ensures the complete presentation of key information and eliminates the risk of construction misreading caused by incomplete display. Most importantly, this dynamic layout ability greatly improves the versatility and professionalism of the drawings, enabling the same set of systems to perfectly handle various cable connection requirements from simple to complex.

[0074] Furthermore, the connection between the electrical cabinet and external equipment is the basis for forming a complete electrical system. The two are closely connected and jointly form a fully functional and coordinated overall system. As the core part of the power system, the electrical cabinet distributes functions to various electrical components and circuits inside the cabinet, and transmits power and signals to external equipment through external cables to achieve the purpose of controlling the operation of external equipment. Specifically, the signals transmitted by the electrical cabinet include control signals, status signals, alarm signals, etc., and these signals can realize communication and coordination between devices. For example, the electrical cabinet can achieve various control functions such as starting, stopping, speed regulation, and even forward and reverse rotation of the motor for external equipment to ensure that the external equipment operates normally according to the predetermined programs and parameters. In addition, when abnormal situations such as overload and short circuit occur in external equipment, the protection devices inside the electrical cabinet can quickly cut off the circuit to protect the safety of the equipment and personnel. This is also one of the important purposes for the electrical cabinet and external equipment to achieve a tight connection.

[0075] To further improve the quality and efficiency of drawing electrical external wiring diagrams, this embodiment optimizes and improves the traditional drawing method of external wiring diagrams, mainly achieving the following improvements: First, it realizes the automatic conversion of the addresses of remote control modules. In the past, the conversion between the physical addresses and manually defined addresses of remote control modules relied on manual calculation, which was extremely prone to errors. In this embodiment, by pre-embedding customized program statements in the spreadsheet, the conversion of module addresses can be automatically performed, not only effectively avoiding manual calculation errors, but also significantly improving the reliability and stability of drawing. Second, the data parameter input method is improved. The optimized external wiring diagram adopts a unified data input method. Users only need to input data parameters once, and then the data can be automatically saved and called, avoiding the inconvenience caused by repeated input in the past, making the drawing process of the drawing more efficient and significantly saving the drawing time. Finally, the optimized external wiring diagram is clearer and more intuitive in terms of interface design, greatly improving the recognizability of each component and connection relationship in the drawing, enabling technicians to understand the drawing content more quickly and accurately, thereby reducing misunderstandings and mistakes in work and further improving the overall construction quality and work efficiency.

[0076] Refer to Figure 5 , Figure 5 is the overall schematic diagram of the external wiring diagram provided by the present invention. As Figure 5 shown, it is an example of the external wiring diagram after adopting the optimization technology in the actual project application. From the specific structure, the optimized external wiring diagram includes all necessary electrical connections between external devices and in-cabinet devices. This diagram usually consists of three main parts. Refer to Figure 6 , Figure 6 is the schematic diagram of the composition of the external wiring diagram provided by the present invention Figure 3 part, as Figure 6 shown. In the figure, part A represents the control points of external devices, specifically including grating switch control signals and detection signals, etc.; part B is the connection method of cables and wires. In the example, a 12×0.3 core cable and a 6×0.3 core cable are combined into an 18×0.3 core cable; part C shows the physical addresses and terminal block addresses of the in-cabinet modules, including the physical addresses of remote control modules (such as b3-1, etc.) and the 24V power supply terminal block addresses (such as 3X5, 3X6).

[0077] In the actual process of drawing the external wiring diagram, this embodiment provides a variety of common drawing creation methods. One way is in the environment of a spreadsheet editor, and the content in the spreadsheet is directly inserted into the CAD drawing through copy and paste operations to form an OLE object, that is, presenting Figure 5 and Figure 6The external wiring diagram style shown; another way is to directly use the mouse operation. Select the OLE object with the left mouse button and right-click to bring up the clipboard menu to achieve the copying and pasting of the OLE object. In addition, you can also use the keyboard shortcuts Ctrl+C and Ctrl+V for the quick copying and pasting of the OLE object. These creation methods are simple and efficient, enabling technicians to quickly complete the generation and copying of the external wiring diagram, greatly improving the drawing efficiency.

[0078] In addition, during the subsequent editing and maintenance process of the external wiring diagram, it can also be conveniently modified through the spreadsheet editor embedded in the OLE object. Refer to Figure 7 , Figure 7 is one of the schematic diagrams of the spreadsheet editor of the OLE nested object provided by the present invention, and refer to Figure 8 , Figure 8 is the second schematic diagram of the spreadsheet editor of the OLE nested object provided by the present invention. As shown in Figure 7 [[ID=X]]and Figure 8 shown, technicians can quickly enter the interior of the spreadsheet through the OLE object opening method in the right-click menu. After opening the spreadsheet editing interface, it is a specified cell. The specified cell contains a display part (i.e., the display area in the foregoing embodiment) and a parameter part (i.e., the hidden area in the foregoing embodiment). The display part is used for direct external display and can be viewed jointly by customers and technicians, while the parameter part belongs to the hidden area and is only for technicians to input data and set parameters, which is invisible to customers. This design not only makes the external wiring diagram more secure and reliable but also ensures the effective protection of important parameter information and avoids misoperation.

[0079] Through the above optimizations and improvements, the drawing of the external wiring diagram has achieved a significant improvement in the implementation effect. First, the number of drawings has been significantly reduced to about half of the original, greatly reducing the cost of drawing printing and the carrying burden of on-site construction personnel. Refer to Figure 9 , Figure 9 is the schematic diagram of the traditional external wiring diagram provided by the present invention. As shown in Figure 9 shown, in the traditional CAD method, only one external wiring diagram can be drawn in one drawing frame; after adopting the technical solution provided by this embodiment, refer to Figure 10 , Figure 10 is the schematic diagram of the external wiring diagram of this solution provided by the present invention. As shown in Figure 10As shown, two external wiring diagrams can be drawn in the same-sized drawing frame, thus effectively reducing the amount of drawing printing. In addition, since the spreadsheet built into the OLE object performs address conversion using program statements and the source program nested in each cell is unique, the accuracy of the module address display is significantly improved, and the address conversion calculation can be quickly and accurately completed without manual intervention. Finally, this embodiment also provides a templatized design capability. Technicians can pre-encapsulate common external wiring diagram components, standard configurations, and preset numerical positions in the template. When facing similar drawing requirements, the template can be directly called to quickly generate a new drawing, eliminating the need to re-layout the drawing and adjust the numerical positions, thus significantly shortening the project preparation time. The introduction of templatized design also makes the management of external wiring diagrams more standardized and normalized, effectively improving the team's collaboration efficiency and ensuring the smooth progress of the construction schedule of electrical engineering projects.

[0080] Referring Figure 11 , Figure 11 FIG. is a schematic structural diagram of an automatic generation system for an electrical external wiring diagram provided by the present invention. The system includes: A first processing module for embedding a spreadsheet as an Object Linking and Embedding (OLE) object in a CAD software environment and pre-storing conversion rules for different types of remote control modules in the spreadsheet; A second processing module for writing functions in the spreadsheet and embedding the conversion rules into the calculation logic of the functions. The functions are used to automatically convert custom addresses and physical addresses of remote control modules; A third processing module for receiving and inputting parameters of external devices and storing the parameters in specified cells of the spreadsheet; A fourth processing module for calling the corresponding conversion logic from the conversion rules according to the type of remote control module and performing operations on the parameters through the functions to obtain external wiring information including terminal position markers of the remote control module; A fifth processing module for displaying the external wiring information in a visual form on the CAD drawing and associating it with the CAD drawing in real time through the OLE object to achieve editing and updating of the external wiring diagram.

[0081] In a possible implementation manner, the fourth processing module is further configured to: Determine the address mapping relationship in the conversion rules according to the type of remote control module; Input the parameters into the function, execute the conversion logic through the function, and convert the custom address into the physical address of the remote control module; Generate external wiring information including terminal position markers of the remote control module according to the physical address.

[0082] In a possible implementation, the fourth processing module is further configured to: Determine the nesting level number of the IF condition judgment function according to the tree-shaped block structure of the remote control module; wherein, the nesting level number is the same as the level number of the tree-shaped block structure, and each nesting level corresponds to a level in the tree-shaped block structure respectively; Input the parameter into the IF condition judgment function, judge the value of the custom address layer by layer, and map the custom address to the corresponding physical address in the tree-shaped block structure step by step.

[0083] In a possible implementation, the fifth processing module is further configured to: Dynamically adjust the column width and row height of the cells corresponding to the display area in the spreadsheet according to the cable core wire specifications to ensure the complete display of the content of the specified cell; So that the terminal position mark of the remote control module automatically calculated in the specified cell is completely displayed in the display area.

[0084] It should be noted that the automatic generation system of the electrical external wiring diagram provided by the present invention can execute the automatic generation method of the electrical external wiring diagram in any of the above embodiments during specific operation, which will not be elaborated in this embodiment.

[0085] Figure 12 is a schematic structural diagram of the electronic device provided by the present invention. As Figure 12 shown, the electronic device may include: a processor 1210 (Processor), a communication interface 1220 (Communications Interface), a memory 1230 (Memory), and a communication bus 1240. Among them, the processor 1210, the communication interface 1220, and the memory 1230 complete mutual communication through the communication bus 1240. The processor 1210 can call the logical instructions in the memory 1230 to execute the automatic generation method of the electrical external wiring diagram, and the method includes: embedding a spreadsheet as an object linking and embedding (OLE) object in the CAD software environment, and prestoring conversion rules for different types of remote control modules in the spreadsheet; writing functions in the spreadsheet and embedding the conversion rules into the calculation logic of the functions, and the functions are used to automatically convert the custom address and the physical address of the remote control module; receiving and inputting the parameters of the external device and storing the parameters in the specified cells of the spreadsheet; calling the corresponding conversion logic from the conversion rules according to the type of the remote control module, and performing operations on the parameters through the functions to obtain the external wiring information including the terminal position mark of the remote control module; displaying the external wiring information in a visual form in the CAD drawing and associating it with the CAD drawing in real time through the OLE object to realize the editing and updating of the external wiring diagram.

[0086] In addition, when the logical instructions in the aforementioned memory 1230 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.

[0087] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the automatic generation method of the electrical external wiring diagram provided in the above-mentioned embodiments. The method includes: embedding a spreadsheet as an object linking and embedding (OLE) object in a CAD software environment, and pre-storing conversion rules for different types of remote control modules in the spreadsheet; writing functions in the spreadsheet and embedding the conversion rules into the calculation logic of the functions. The functions are used to automatically convert the custom address and the physical address of the remote control module; receive and input the parameters of an external device and store the parameters in the specified cells of the spreadsheet; call the corresponding conversion logic from the conversion rules according to the type of the remote control module, and perform operations on the parameters through the functions to obtain external wiring information including the terminal position marks of the remote control module; display the external wiring information in a visual form on the CAD drawing and be associated with the CAD drawing in real time through the OLE object to achieve the editing and updating of the external wiring diagram.

[0088] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is configured to execute the automatic generation method of the electrical external wiring diagram provided in the above embodiments. The method includes: embedding a spreadsheet as an Object Linking and Embedding (OLE) object in a CAD software environment, and pre-storing conversion rules for different types of remote control modules in the spreadsheet; writing functions in the spreadsheet and embedding the conversion rules into the calculation logic of the functions, where the functions are used to automatically convert custom addresses and physical addresses of remote control modules; receiving and inputting parameters of external devices and storing the parameters in specified cells of the spreadsheet; calling corresponding conversion logics from the conversion rules according to the types of remote control modules, and performing operations on the parameters through the functions to obtain external wiring information including terminal position marks of remote control modules; displaying the external wiring information in a visual form on the CAD drawing and establishing real-time association with the CAD drawing through the OLE object to achieve editing and updating of the external wiring diagram.

[0089] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative effort.

[0090] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiments.

[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of each embodiment of the present invention.

Claims

1. An automatic generation method for an electrical external wiring diagram, characterized in that, Including: Embedding a spreadsheet as an Object Linking and Embedding (OLE) object in the CAD software environment, and pre-storing conversion rules for different types of remote control modules in the spreadsheet; Writing functions in the spreadsheet and embedding the conversion rules into the calculation logic of the functions, where the functions are used to automatically convert custom addresses to the physical addresses of remote control modules; Receiving and inputting the parameters of an external device and storing the parameters in specified cells of the spreadsheet; Invoking the corresponding conversion logic from the conversion rules according to the type of remote control module, and performing operations on the parameters through the functions to obtain external wiring information including the terminal position markers of the remote control module; Displaying the external wiring information in a visual form on the CAD drawing and associating it with the CAD drawing in real time through the OLE object to achieve the editing and updating of the external wiring diagram.

2. The automatic generation method of the electrical external wiring diagram according to claim 1, characterized in that, The step of invoking the corresponding conversion logic from the conversion rules according to the type of remote control module, and performing operations on the parameters through the functions to obtain external wiring information including the terminal position markers of the remote control module includes: Determining the address mapping relationship in the conversion rules according to the type of remote control module; Inputting the parameters into the functions, and executing the conversion logic through the functions to convert the custom addresses to the physical addresses of the remote control modules; Generating external wiring information including the terminal position markers of the remote control module according to the physical addresses.

3. The automatic generation method of the electrical external wiring diagram according to claim 2, characterized in that The functions are multi-layer nested IF conditional judgment functions; the step of inputting the parameters into the functions and executing the conversion logic through the functions to convert the custom addresses to the physical addresses of the remote control modules includes: Determining the nested level number of the IF conditional judgment functions according to the tree-like block structure of the remote control module; where the nested level number is the same as the level number of the tree-like block structure, and each nested level corresponds to a level in the tree-like block structure; Inputting the parameters into the IF conditional judgment functions, and gradually judging the values of the custom addresses and gradually mapping the custom addresses to the corresponding physical addresses in the tree-like block structure.

4. The automatic generation method of the electrical external wiring diagram according to claim 3, characterized in that The tree-like block structure includes at least one of the following types: 4×4 tree-like block structure, corresponding to 16 physical addresses of the UR20 module, and each block corresponds to a judgment branch in the IF conditional judgment function; 3×3 tree-like block structure, corresponding to 9 physical addresses of the Siemens ET200 module or the Beckhoff I / O module, and each block corresponds to a judgment branch in the IF conditional judgment function.

5. The automatic generation method of the electrical external wiring diagram according to claim 1, characterized in that The parameters of the external device include the control point number of the external device, the cable core wire specification, the power terminal block address, and the type of remote control module. The specified cell is divided into a hidden area and a display area. The hidden area is used to receive and store the parameters of the external device for the function to call and calculate. The display area is used to display in real time the physical address of the remote control module automatically calculated by the function based on the parameters in the hidden area.

6. The automatic generation method of the electrical external wiring diagram according to claim 5, characterized in that, The method further includes: dynamically adjusting the column width and row height of the cell corresponding to the display area in the spreadsheet according to the cable core wire specification to ensure the complete display of the content of the specified cell; so that the terminal position mark of the remote control module automatically calculated in the specified cell is completely displayed in the display area.

7. An automatic generation system for an electrical external wiring diagram, characterized in that, It includes: A first processing module for embedding a spreadsheet as an Object Linking and Embedding (OLE) object in the CAD software environment and pre-storing in the spreadsheet the conversion rules for different types of remote control modules; A second processing module for writing a function in the spreadsheet and embedding the conversion rules into the calculation logic of the function, where the function is used to automatically convert the custom address and the physical address of the remote control module; A third processing module for receiving and inputting the parameters of the external device and storing the parameters in the specified cell of the spreadsheet; A fourth processing module for calling the corresponding conversion logic from the conversion rules according to the type of the remote control module and performing operations on the parameters through the function to obtain the external wiring information including the terminal position mark of the remote control module; A fifth processing module for displaying the external wiring information in a visual form in the CAD drawing and associating it with the CAD drawing in real time through the OLE object to realize the editing and updating of the external wiring diagram.

8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the method for automatically generating the electrical external wiring diagram according to any one of claims 1-6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for automatically generating the electrical external wiring diagram according to any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the method for automatically generating the electrical external wiring diagram according to any one of claims 1-6.