Electric cabinet automatic detection program construction method and system based on modular programming
The modular programming-based automatic detection program for electrical cabinets solves the problem of low efficiency in traditional electrical cabinet detection, achieving efficient and accurate automated detection. It adapts to different types of electrical cabinets, supports multiple network protocols, and improves the reliability of detection results and work efficiency.
Patent Information
- Application Number
- CN202510933359.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-07
- Publication Date
- 2025-10-31
AI Technical Summary
Traditional electrical cabinet testing methods are inefficient, prone to human error, lack systematic error message prompts, make it difficult to locate problems, and result in incomplete data recording, affecting the accuracy and efficiency of the test results.
An automatic testing program for electrical cabinets based on modular programming is adopted, which includes test application software, PLC automatic test cabinet, test cables and the electrical cabinet under test. Through modular program design, automated testing is achieved, fault points are recorded in real time and detailed reports are generated.
It improves the consistency and reliability of test results, reduces human error, shortens troubleshooting time, enhances the accuracy and efficiency of test results, supports multiple network protocols, adapts to different industrial environments, and has flexibility and versatility.
Smart Images

Figure CN120871810A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electrical automation technology, specifically to a method and system for constructing an automatic detection program for electrical cabinets based on modular programming. Background Technology
[0002] As is well known, in the field of industrial automation, electrical cabinets are critical control devices, and their reliability and stability are essential for the normal operation of the entire production system. Therefore, effective quality inspection of electrical cabinets is one of the key steps to ensure their performance meets standards. However, traditional manual inspection methods often have many shortcomings in error message prompts and handling, leading to low inspection efficiency and susceptibility to human error. With the development of technology, automated electrical cabinet inspection systems have gradually become mainstream, and the design of error handling mechanisms is particularly important.
[0003] In traditional manual testing, when a fault is encountered, the problem is usually determined solely by the inspector's experience. This reliance on personal experience is not only inefficient but also prone to misjudgment due to individual differences. The lack of systematic error message prompts makes problem localization extremely difficult, especially in complex electrical cabinet structures where even a small wiring error or signal anomaly can lead to overall functional failure. Finding the specific cause requires a significant amount of time. During manual testing, once an error is discovered, the usual practice is to immediately stop the current operation and have a technician inspect and repair it. While this method ensures the problem is resolved, it greatly disrupts the continuity of the testing process. For some non-fatal errors (such as minor contact defects), if the function of ignoring the error and continuing to run or retrying can be provided, more testing tasks can be completed without affecting the overall progress, thus improving work efficiency. In traditional testing methods, due to the lack of an effective data recording mechanism, a lot of important information in the testing process (such as testing time, inspector's name, main program and error point information, etc.) cannot be retained. This not only affects subsequent data analysis and improvement work, but also makes it difficult to trace and review historical data. The lack of data may also lead to repetitive work, that is, the same problem may occur repeatedly in different testing cycles, but due to the lack of detailed records, it is impossible to fundamentally solve the problem. Summary of the Invention
[0004] (a) Technical problems to be solved
[0005] To address the shortcomings of existing technologies, this invention provides a method and system for constructing an automatic detection program for electrical cabinets based on modular programming.
[0006] (II) Technical Solution
[0007] To achieve the above objectives, the present invention provides the following technical solution: a method for constructing an automatic detection program for electrical cabinets based on modular programming, comprising the following steps:
[0008] Step 1: Design the system architecture, including test application software, PLC automatic test cabinet, test cables and the electrical cabinet under test;
[0009] Step 2: Build a modular program, including a main program module, step instruction module, input / output definition module, macro instruction module, and recording module;
[0010] Step 3: Execute the test program. Start the test program through the test application software, run the step instruction file line by line, judge the signal status and record the fault point;
[0011] Step 4: Generate a test report, recording all operations and results during the testing process;
[0012] Furthermore, the present invention is improved in that, in step 2, the main program module is responsible for controlling the entire detection process, the step instruction module defines the specific detection steps, the input / output definition module defines the type and signal status of the test points, the macro instruction module writes abbreviated instructions for commonly used detection actions, and the recording module records all operations and results in the detection process.
[0013] Furthermore, the present invention is improved in that, in step 1, the test application software communicates with the PLC automatic test cabinet through the MPI network, and the PLC automatic test cabinet is connected to the ET200S module in the electrical cabinet under test through the DP network.
[0014] Furthermore, the present invention is improved in that, in step 1, the test cable consists of a multi-core test cable and a test plug, and is used to connect the test points of the PLC automatic test cabinet and the electrical cabinet under test.
[0015] Furthermore, the present invention is improved in that, in step 1, the test application software is used to write and manage the test program, and communicates with the PLC automatic test cabinet through the MPI network. The PLC automatic test cabinet consists of an S7-300 series 314 CPU and a DI / O module, which is responsible for the input and output of digital signals. It is connected to the electrical cabinet under test through the DP network. The test cable consists of a multi-core test cable and a test plug, and is used to connect the test points of the PLC automatic test cabinet and the electrical cabinet under test. The electrical cabinet under test contains an ET200S module, which is used to receive and send digital signals.
[0016] Furthermore, the present invention is improved in that, in step 3, if a fault is detected, the program pops up an alarm window prompting manual inspection or retry, and records the fault point to the detection file.
[0017] Furthermore, the present invention is improved in that, in step 4, the test report includes the test time, the name of the inspector, the name of the main program, and error point information, and can be traced through the test record file.
[0018] This invention also provides an automatic detection system for electrical cabinets based on modular programming, comprising:
[0019] Test application software is used to write and manage test programs and communicate with the PLC automatic test cabinet via MPI network;
[0020] The PLC automatic test cabinet consists of an S7-300 series 314 CPU and DI / 0 module, which are responsible for the input and output of digital signals and are connected to the electrical cabinet under test via a DP network.
[0021] The test cable consists of a multi-core test cable and various types of test plugs, used to adapt to the test point connection of different electrical cabinets;
[0022] The electrical cabinet under test contains an ET200S module for receiving and transmitting digital signals.
[0023] Furthermore, the present invention is improved in that the 314 CPU in the PLC automatic test cabinet is connected to the 315 CPU in the tested electrical cabinet through a DP network to realize the input and output of digital signals.
[0024] Furthermore, the present invention is improved in that the test application software is configured to generate a fault alarm window in real time during the detection process and record the fault point information to the detection file;
[0025] Furthermore, an improvement of the present invention is that, upon completion of the test, a report is automatically generated that includes the test time, the name of the inspector, and information on the errors.
[0026] (III) Beneficial Effects
[0027] Compared with the prior art, the present invention provides a method and system for constructing an automatic detection program for electrical cabinets based on modular programming, which has the following beneficial effects:
[0028] This modular programming-based automatic detection program construction method and system for electrical cabinets, due to its highly modular design, can easily adapt to different types of electrical cabinet detection needs. For example, when a new model of electrical cabinet needs to be detected, only the corresponding modules need to be adjusted or added, without having to redevelop the entire system. Each module is relatively independent, and updating or repairing any single module will not affect other parts, reducing maintenance costs and difficulty. Using macro instruction modules to write abbreviated instructions for common actions not only reduces repetitive work but also reduces the probability of errors, greatly improving programming efficiency.
[0029] The high degree of automation means that the entire testing process requires almost no human intervention, which greatly reduces errors caused by human factors and improves the consistency and reliability of test results. Once an error occurs during testing, the system can quickly locate and prompt the inspectors with the specific location and type of error, which helps to solve the problem quickly and shorten the troubleshooting time. The automated process not only speeds up the testing process, but also allows the simultaneous processing of testing tasks for multiple electrical cabinets, further improving the overall work efficiency.
[0030] The real-time monitoring function enables the system to detect problems immediately, avoid potential security risks, and ensure the safe operation of the equipment. Detailed error message prompts help users better understand the problem and provide multiple processing options, enhancing the user experience. Even if errors occur during the detection process, the system can record all error points to ensure the integrity and traceability of the data.
[0031] The combination of MPI and DP networks ensures high-speed data transmission, enabling the system to complete complex testing tasks in a short time, improving work efficiency. The ability to support multiple network protocols allows the system to adapt to different industrial environments and application scenarios, exhibiting strong versatility and adaptability. With the help of network communication technology, users can remotely monitor and manage the testing process, facilitating daily operation and maintenance.
[0032] Customized test cable and plug combinations enable quick and safe connection to test points on electrical cabinets of different specifications, reducing preparation time and improving work efficiency. The rationally designed test cables not only simplify the wiring process but also reduce the possibility of wiring errors, ensuring the accuracy of test results. They support multiple types of test plugs, adapting to the testing needs of different electrical cabinets, and have strong flexibility and adaptability. Attached Figure Description
[0033] Figure 1 This is a schematic diagram illustrating the principle of the SIAT automatic testing program of the present invention;
[0034] Figure 2 This is a schematic diagram of the testing process of the present invention;
[0035] Figure 3 This is a schematic diagram of the system architecture design process of the present invention;
[0036] Figure 4 This is a schematic diagram of the modular program construction process of the present invention;
[0037] Figure 5 This is a schematic diagram of the detection procedure executed by the present invention;
[0038] Figure 6 This is a schematic diagram of the error handling process of the present invention;
[0039] Figure 7 This is a schematic diagram of the process for generating a test report according to the present invention. Detailed Implementation
[0040] 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.
[0041] Please see Figure 1-7 A method for constructing an automatic detection program for electrical cabinets based on modular programming includes the following steps:
[0042] Step 1: Design the system architecture, including test application software, PLC automatic test cabinet, test cables and the electrical cabinet under test;
[0043] Step 2: Build a modular program, including a main program module, step instruction module, input / output definition module, macro instruction module, and recording module;
[0044] Step 3: Execute the test program. Start the test program through the test application software, run the step instruction file line by line, judge the signal status and record the fault point;
[0045] Step 4: Generate a test report, recording all operations and results during the testing process;
[0046] In this scheme, in step 2, the main program module is responsible for controlling the entire detection process, the step instruction module defines the specific detection steps, the input / output definition module defines the type and signal status of the test points, the macro instruction module writes abbreviated instructions for commonly used detection actions, and the recording module records all operations and results in the detection process.
[0047] In this scheme, in step 1, the test application software communicates with the PLC automatic test cabinet through the MPI network, and the PLC automatic test cabinet is connected to the ET200S module in the electrical cabinet under test through the DP network.
[0048] In this scheme, in step 1, the test cable consists of a multi-core test cable and a test plug, and is used to connect the test points of the PLC automatic test cabinet and the electrical cabinet under test.
[0049] In this solution, in step 1, the test application software is used to write and manage the test program. It communicates with the PLC automatic test cabinet via the MPI network. The PLC automatic test cabinet consists of an S7-300 series 314 CPU and DI / O modules, which are responsible for the input and output of digital signals. It is connected to the electrical cabinet under test via the DP network. The test cable consists of a multi-core test cable and a test plug, which is used to connect the test points of the PLC automatic test cabinet and the electrical cabinet under test. The electrical cabinet under test contains an ET200S module, which is used to receive and send digital signals.
[0050] In this solution, if a fault is detected in step 3, the program will pop up an alarm window prompting manual inspection or retry, and record the fault point to the detection file.
[0051] In this solution, in step 4, the test report includes the test time, the name of the inspector, the name of the main program, and error information, and can be traced through the test record file.
[0052] This invention also provides an automatic detection system for electrical cabinets based on modular programming, comprising:
[0053] Test application software is used to write and manage test programs and communicate with the PLC automatic test cabinet via MPI network;
[0054] The PLC automatic test cabinet consists of an S7-300 series 314 CPU and DI / O modules, which are responsible for the input and output of digital signals and are connected to the electrical cabinet under test via a DP network.
[0055] The test cable consists of a multi-core test cable and various types of test plugs, used to adapt to the test point connection of different electrical cabinets;
[0056] The electrical cabinet under test contains an ET200S module for receiving and transmitting digital signals.
[0057] In this solution, the 314 CPU in the PLC automatic test cabinet is connected to the 315 CPU in the tested electrical cabinet via a DP network to realize the input and output of digital signals.
[0058] In this solution, the test application software is configured to generate a fault alarm window in real time during the testing process and record the fault point information to the test file;
[0059] In this solution, a report containing the testing time, the name of the inspector, and information on errors is automatically generated after the test is completed.
[0060] The present invention relates to a modular programming-based automatic testing program construction method and system for electrical cabinets. The working principle is as follows: Inspectors first launch a testing application software written in VC++. The software interface displays a list of available testing programs. Inspectors select the appropriate testing program from the list (e.g., DMC635_8T.Lpe). This program is pre-written and contains testing steps and rules for a specific electrical cabinet. After the program starts, the system prompts the inspector to enter the cabinet serial number and the inspector's name. This information will be used to generate a testing report. If a cabinet with the same serial number already exists in the system, the system will process the report. Upon recording, the program will pop up a prompt box asking the inspector whether to overwrite the original record or rewrite the new record. The inspector can choose to overwrite, rewrite, or cancel the operation. The program will then execute the detection steps in the .hsa file line by line. Each step corresponds to a specific detection action, such as closing a switch, opening a contactor, or measuring voltage. The program uses the .1mk (macro instruction) and .pin (input / output definition) files to determine the signal status: =1: indicates the presence of a digital signal (e.g., switch closed, contactor engaged, voltage +24V); =0: indicates the absence of a digital signal (e.g., switch open, contactor reset, voltage 0V). The program interface will display operation prompts. Inspectors should follow these prompts. Red text indicates manual operation, such as closing or opening the switch. Green text indicates visual confirmation, requiring no further action. Blue text indicates using a multimeter to measure the voltage to confirm if it is +24V or 0V. If, during the test, the signal state at any point does not match the expectation (e.g., the program expects =1, but the actual measurement is =0), the program will pop up an alarm window displaying detailed information about the fault, including: the location of the fault (e.g., point B7-01X21-1 in pin 15), the expected status... The current state (e.g., =1) and actual state (e.g., =0) allow inspectors to choose from the following options: Ignore error (the program records the error in the test file and continues with subsequent test steps), Retry (the program stops at the current step, inspectors manually check and repair the fault, then click the Retry button, and the program will retest the point), or Stop test (inspectors can choose to stop the test program and end the current test task). When all test steps are completed and there are no unprocessed errors, the program will display a test completion prompt, indicating that the test task has been completed. The system will automatically generate a test report, recording the following information:
[0061] Detection time: The start and end times of the detection;
[0062] Inspection personnel name: Name of the operator performing the test;
[0063] Main program: The name of the detection program used (e.g., DMC635_8T.Lpe).
[0064] Error point information: If an error occurs during the test, record detailed information about the error point, including its location, expected state, and actual state. Inspectors can view the test file through the test record icon on the desktop. The test file is named with the cabinet serial number. Double-clicking to open it will allow you to view detailed test records. After the test is completed, inspectors should first disconnect the SIAT512 power switch to ensure that the system is powered off. Inspectors should then disconnect the test cable connecting the PLC automatic test cabinet and the cabinet under test and restore the original connection status of the plug on the cabinet under test.
[0065] The test program mainly consists of the following files:
[0066] LPE header file: The bootstrap file for the automated test program, used to control the automated test process and define the main file required for automated testing.
[0067] .hsa subfile: The step instruction file for the automated test program, used to specify the actions of the automated test program.
[0068] .pin definition file: The input / output definition file of the automated test program, used to specify the type of test.
[0069] .1mk macro file: Macro file for automated testing programs, used to write abbreviated instructions for common actions.
[0070] .prt log file: A process log file for automated testing programs, used to record the actual usage process of the testing program.
[0071] Main test commands:
[0072]
[0073] Signal status detection command: CHECK_S IGNAL.
[0074] Check whether the signal status at the specified test point is consistent with expectations. If not, trigger an alarm and record the fault point.
[0075] Test point location: The specific pin or test point number in the cabinet under test (e.g., B7-01X21-1). Expected signal state (=1 indicates a signal is present, =0 indicates no signal). Custom error identifier (e.g., ERR_Voltage_Low). Read the actual signal state of the test point (defined via the .pin file).
[0076] Compare the actual state with the expected state: If they match, continue with the next steps. If they do not match, an alarm window will pop up, displaying the error code, test point location, and state difference (e.g., expected = 1, actual = 0). The LOG_ERR0R macro will be invoked to record the error information to the .prt file, and the operator will be prompted to choose "ignore," "retry," or "terminate."
[0077] Check the switch's closed / open status (e.g., verify contactor engagement). Verify that the voltage meets the standard (e.g., test 24V power output).
[0078] Delay detection and retry instruction: RETRY_DELAY.
[0079] When a transient anomaly is detected, the detection is automatically delayed and then retried to avoid false positives and improve detection stability.
[0080] Test point location: The test point in the electrical cabinet under test that needs to be retried. Number of retries: The maximum number of retries (e.g., 3 times). Delay time: The waiting time before each retry (unit: milliseconds, e.g., t 500 means a delay of 500ms).
[0081] Upon first detection of an abnormal test point status, a delay counter is started. The signal status is reread after a specified time. If the status returns to the expected value, subsequent steps continue; if the abnormality persists, the detection is repeated until the maximum number of retries is reached. If the abnormality still persists, the CHECK_SIGNAL alarm procedure is triggered and the error is logged.
[0082] Detect signal fluctuations caused by transient interference (such as relay engagement delay). Troubleshoot intermittent faults caused by poor contact.
[0083] First, the user needs to open the automatic testing program. This program provides a graphical interface that allows users to perform a series of operations to start a specific test task. Clicking a specific button on the main interface (or using the keyboard shortcut F5) will take you to the program selection interface. From here, you can select a specific test program file, such as DMC635_8T.Lpe, which is a test program designed for the DMG635_8T model cabinet. After selecting DMC635_8T.Lpe, enter the serial number of the cabinet under test and the name of the inspector. This ensures that the results of each test can be associated with a specific device and the responsible inspector for easy tracking and management. If communication is normal, the program will display the cabinet. The serial number and inspector input boxes are provided. If communication is abnormal, the user will be prompted and allowed to run the program in simulation mode to ensure that the test data can be accurately transmitted to the PLC automatic test cabinet and then sent to the ET200S module in the tested cabinet. After confirming that all settings are correct, click the "Start" button in the lower right corner to start the test process. The automatic detection program will guide the entire test process according to the preset .lpe header file, including calling the .hsa subfile to execute specific steps and using the .pin definition file to identify input and output signals. The program will execute each test task step by step according to the instructions in the .hsa subfile. For each step, the program may require the operator to perform certain manual actions. The system performs actions (such as closing switches) or confirms certain states (such as whether a contactor is engaged) to verify the proper functioning of each component within the electrical cabinet. Any abnormalities are recorded for later analysis. If an error is detected, the system will display an alarm window detailing the problem and providing options for the user to decide how to handle it (ignore the error and continue running, retry, or stop the test program). This allows for flexible responses to problems, minimizing the impact on the overall testing progress while ensuring all errors are recorded for post-test analysis. Once all scheduled tests are completed, the program automatically generates a detailed report including the test time, inspector's name, main program details, and error point information (if any). This provides users with a comprehensive understanding of the test results, facilitating quality control and the development of subsequent improvement measures. The process involves turning off the SAIT512 power switch, disconnecting the test cable, restoring the plug connections on the cabinet, and preparing for the next cabinet test. This ensures that each cabinet can complete the test independently and accurately, avoiding the influence of residual settings on the test results of other equipment. Through this process, the DMG635_8T test program not only achieves the goal of automated testing but also provides detailed operating instructions and an error feedback mechanism, greatly improving the efficiency and accuracy of cabinet testing. This systematic solution is well-suited for large-scale production environments, helping to improve product quality and production efficiency.
[0084] DMG635_8T electrical cabinet inspection:
[0085] A manufacturing company needs to conduct quality inspections on its DMG635_8T electrical cabinets to ensure they meet factory standards. The inspection process is initiated using test application software written in VC++. Communication with the PLC automatic test cabinet is established via an MPI network. Multi-core test cables and corresponding test plugs are connected to the cabinet under test, ensuring a secure and reliable connection. A pre-written automatic testing program (.lpe file) is executed. This program contains detailed step instructions (.hsa subfile), input / output definitions (.pin definition file), and macro instructions (.lmk macro file). During the inspection, the system monitors signal status in real time. If an anomaly is detected (such as an incorrect pin status), an alarm window immediately pops up, prompting the inspection personnel to check or retry. Upon completion of the inspection, a detailed report is generated, recording all operations, results, and potential errors.
[0086] DMG635_8T Electrical Cabinet Inspection and Evaluation Form:
[0087]
[0088] Prototype verification of new intelligent electronic control equipment:
[0089] The R&D team developed a new electrical control device integrating intelligent control functions, which required comprehensive functional verification. This involved adjusting the test application software based on the new device's characteristics, adding specific testing instructions to adapt to the new functional requirements, updating the PLC automatic test cabinet settings to ensure correct processing of data streams from the new device, designing dedicated test cables and plugs, writing a dedicated automatic testing program for the device, focusing on verifying the proper functioning of key functions such as data transmission rate and power management, collecting test data, analyzing performance indicators, and making corresponding adjustments to the hardware or software based on feedback until the expected results were achieved.
[0090] Prototype Verification and Evaluation Form for New Intelligent Electrical Control Equipment:
[0091]
[0092] Optimization of rapid testing of batch electrical cabinets on the production line:
[0093] To improve production efficiency, a factory wants to introduce an automated testing solution to accelerate the delivery speed of electrical cabinets. This involves configuring multiple PLC-based automated testing cabinets to form a local area network, simultaneously handling testing tasks for multiple cabinets to achieve parallel processing. Standardized test cables and universal test plugs are used to simplify the connection process between the cabinets and the testing system, reducing preparation time. A simplified automated testing program is developed, focusing on common fault types such as short circuits and open circuits to speed up the entire testing process. Batch processing is used to process multiple cabinets at once, significantly improving testing efficiency. The testing report for each cabinet is automatically saved and uploaded to a central database for subsequent review and tracking.
[0094] Production Line Batch Electrical Cabinet Rapid Testing Optimization Evaluation Form:
[0095]
[0096] The manufacturing company needs to add a temperature sensor detection function to the HT-5000 high-voltage switchgear. The requirement is to quickly integrate the temperature signal detection module without affecting the existing detection process. Traditional methods require rewriting the entire detection program, which is time-consuming and prone to errors. However, by adopting the modular programming scheme of this invention, only local adjustments are needed to achieve functional expansion.
[0097] Write a new step instruction file (.hsa subfile).
[0098] Define the temperature sensor detection steps:
[0099] / / HT-5000_TEMP.hsa
[0100] STEP 101: CHECK_SIGNAL(TEMP_SENSOR_1, =1, ERR_TEMP_HIGH) / / Detect the signal status of temperature sensor 1
[0101] STEP 102: DELAY t 1000 / / Wait 1 second to ensure signal stability
[0102] STEP 103: CHECK_SIGNAL(TEMP_SENSOR_2, =1, ERR_TEMP_LOW) / / Detect the signal status of temperature sensor 2
[0103] The signal detection logic can be directly invoked through the macro instruction CHECK_SIGNAL, eliminating the need to rewrite the underlying code.
[0104] Configure input / output definition modules (.pin files)
[0105] New temperature signal channel definition:
[0106] / / HT-5000.pin
[0107] TEMP_SENSOR_1: TYPE=ANALOG, ADDR=AI1, RANGE=0-100℃
[0108] TEMP_SENSOR_2: TYPE=ANALOG, ADDR=AI2, RANGE=0-100℃
[0109] Simply add the sensor address and type to the .pin file, and the main program will automatically adapt to the signal reading logic.
[0110] Insert a new step in the main program module (.1pe file):
[0111] / / MAIN.lpe
[0112] INCLUDE″HT-5000_TEMP.hsa″ / / Insert temperature detection steps.
[0113] Through modular design, adding new functions does not require modifying the core logic of the main program. Only sub-files need to be referenced and the detection program executed. The system automatically reads the temperature sensor signal. If the temperature exceeds the threshold (e.g., 80℃), the ERR_TEMP_HIGH alarm is triggered and recorded. If the temperature is below the threshold (e.g., 20℃), the ERR_TEMP_LOW alarm is triggered and recorded. The detection process is seamlessly integrated, and the development cycle is shortened from 5 days in the traditional method to 1 day, without introducing additional programming errors.
[0114] Manufacturing Enterprise Experimental Data Table:
[0115]
[0116] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for constructing an automatic detection program for electrical cabinets based on modular programming, characterized in that, Includes the following steps, Step 1: Design the system architecture, including test application software, PLC automatic test cabinet, test cables and the electrical cabinet under test; Step 2: Build a modular program, including a main program module, step instruction module, input / output definition module, macro instruction module, and recording module; Step 3: Execute the test program. Start the test program through the test application software, run the step instruction file line by line, judge the signal status and record the fault point; Step 4: Generate a test report, recording all operations and results during the test.
2. The method for constructing an automatic detection program for electrical cabinets based on modular programming according to claim 1, characterized in that, In step 2, the main program module is responsible for controlling the entire detection process, the step instruction module defines the specific detection steps, the input / output definition module defines the type and signal status of the test points, the macro instruction module writes abbreviated instructions for commonly used detection actions, and the recording module records all operations and results during the detection process.
3. The method for constructing an automatic detection program for electrical cabinets based on modular programming according to claim 1, characterized in that, In step 1, the test application software communicates with the PLC automatic test cabinet via the MPI network, and the PLC automatic test cabinet connects to the ET200S module in the electrical cabinet under test via the DP network.
4. The method for constructing an automatic detection program for electrical cabinets based on modular programming according to claim 1, characterized in that, In step 1, the test cable consists of a multi-core test cable and a test plug, and is used to connect the test points of the PLC automatic test cabinet and the electrical cabinet under test.
5. The method for constructing an automatic detection program for electrical cabinets based on modular programming according to claim 1, characterized in that, In step 1, the test application software is used to write and manage the test program. It communicates with the PLC automatic test cabinet via the MPI network. The PLC automatic test cabinet consists of an S7-300 series 314 CPU and DI / O modules, which are responsible for the input and output of digital signals. It connects to the electrical cabinet under test via the DP network. The test cable consists of a multi-core test cable and a test plug, which is used to connect the test points of the PLC automatic test cabinet and the electrical cabinet under test. The electrical cabinet under test contains an ET200S module, which is used to receive and send digital signals.
6. The method for constructing an automatic detection program for electrical cabinets based on modular programming according to claim 1, characterized in that, In step 3, if a fault is detected, the program will pop up an alarm window prompting manual inspection or retry, and record the fault point to the detection file.
7. The method for constructing an automatic detection program for electrical cabinets based on modular programming according to claim 1, characterized in that, In step 4, the test report includes the test time, the name of the inspector, the name of the main program, and error information, and can be traced through the test record file.
8. An automatic detection system for electrical cabinets based on modular programming, characterized in that, include: Test application software is used to write and manage test programs and communicate with the PLC automatic test cabinet via MPI network; The PLC automatic test cabinet consists of an S7-300 series 314 CPU and DI / O modules, which are responsible for the input and output of digital signals and are connected to the electrical cabinet under test via a DP network. The test cable consists of a multi-core test cable and various types of test plugs, used to adapt to the test point connection of different electrical cabinets; The electrical cabinet under test contains an ET200S module for receiving and transmitting digital signals.
9. The automatic detection program construction system for electrical cabinets based on modular programming according to claim 8, characterized in that, The 314 CPU in the PLC automatic test cabinet is connected to the 315 CPU in the tested electrical cabinet via a DP network to realize the input and output of digital signals.
10. The automatic detection program construction system for electrical cabinets based on modular programming according to claim 8, characterized in that, The test application software is configured to generate a fault alarm window in real time during the testing process and record fault point information to the test file; After the test is completed, a report is automatically generated that includes the test time, the name of the inspector, and information on the errors.
Citation Information
Patent Citations
Modular programming method based on Visual studio 6.0
CN109634566A
Platform detection system
CN115729216A
Automatic detection control method for electrical cabinet
CN116243069A
Automatic test method and system and automatic test cabinet
CN116593894A
PLC controller capable of completing programming simulation
CN118466382A