Plug-in test system and method of relay protection device
Through the method of serial communication settings and test cases, the problem in the existing technology that the plug-in test system cannot obtain the internal information of the plug-in is solved, efficient plug-in debugging and error search are realized, and the testing efficiency and reliability of the intelligent IO plug-in are enhanced.
Patent Information
- Application Number
- CN202310232885.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-10
- Publication Date
- 2024-09-10
AI Technical Summary
The existing plug-in test system for relay protection devices can only simply view messages, which makes it difficult to find problems with the plug-in, cannot obtain the internal information of the plug-in, and has low testing efficiency.
Set up the test tool to connect to the plug-in under test through serial communication, obtain the plug-in information, select the corresponding test case for testing, and record the test data to achieve the acquisition of plug-in model, version, verification code and other information, read internal variables and run status, perform input setting and fixed value setting.
It realizes the acquisition of plug-in internal information through serial port debugging, improves the efficiency of error search, records the test process, facilitates later viewing, and enhances the reliability and efficiency of plug-in debugging.
Smart Images

Figure CN118625007A
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of relay protection devices, and in particular relates to a plug-in testing system and method for a relay protection device. Background Art
[0002] With the rapid development of my country's smart grid, the demand for IO plug-ins in relay protection devices has become more diversified. Intelligent IO plug-ins have the advantages of plug-and-play, extensive interconnection, ubiquitous deployment, and flexible business. The input, output, DC, communication and other channels can be flexibly configured and are widely used in domestic series relay protection devices. The software functions of the intelligent IO plug-in include: analog input, digital input, output function, clock synchronization function, output disconnection self-detection function, threshold value setting function, data storage function, CAN network communication module and serial communication function.
[0003] The demand for intelligent IO plug-ins is large, and single plug-in debugging has become an issue that needs to be focused on. In order to improve the efficiency of single plug-in debugging, the prior art designs an automatic test system for relay protection device boards. For example, the Chinese invention patent with publication number CN109143019A discloses an automatic test system for relay protection device boards. The system is configured with an industrial computer, a tester, and an auxiliary test chassis, and the industrial computer is loaded with an automatic test strategy and a test case library. During the test, the board to be tested is fixed on the auxiliary test chassis, and a test instruction is sent to the tester through the industrial computer. The tester determines the test mode to be adopted according to the test items of the test instruction. The tester tests the board to be tested through the auxiliary test chassis according to the corresponding test mode, thereby realizing the automatic test process of the relay protection device board, thereby improving the test efficiency of the relay protection device board. However, the system needs to rely on additional auxiliary plug-ins such as CPU / FPGA, and there may be problems with the plug-ins during the test process. The existing automatic test process has limited debugging methods through the CAN network and can only simply view the messages without powerful debugging and monitoring functions. Therefore, when a problem occurs in the plug-in, it is difficult to find it. Under normal circumstances, it is impossible to obtain the plug-in's internal information such as sampling values, status values, and operating conditions. Summary of the invention
[0004] The object of the present invention is to provide a plug-in testing system and method for a relay protection device, so as to solve the problem that the existing plug-in testing can only simply view the message, resulting in difficulty in finding the plug-in after a problem occurs.
[0005] In order to solve the above technical problems, the present invention provides a plug-in testing method for a relay protection device, comprising the following steps:
[0006] 1) According to the set communication rules, serial port communication parameters are set for the test tool so that after the test tool and the tested plug-in are connected in communication, the test tool and the tested plug-in communicate with each other; the test tool stores test cases corresponding to the plug-in type;
[0007] 2) The test tool obtains the plug-in information of the plug-in to be tested, and selects the test case required for testing the plug-in to be tested according to the plug-in type in the plug-in information;
[0008] 3) The test tool transmits the test case to the tester, and the tester outputs the corresponding control quantity to the plug-in under test according to the test case, so as to perform plug-in testing on the plug-in under test;
[0009] 4) After the plug-in test is completed, the test tool obtains and records the test data of the tested plug-in.
[0010] The beneficial effects are as follows: the method of the present invention is a plug-in testing method based on serial port debugging, which does not rely on additional auxiliary plug-ins such as CPU / FPGA, etc., and can read internal variables through serial port communication messages, monitor timing, CPU operating status, CPU occupancy, and obtain plug-in internal event reports and logs (open-in position change status, time, mode, etc.), and the serial port debugging process is to set the serial port communication parameters of the test tool according to the set communication rules, and based on this setting, the required data can be transmitted, that is, the test tool can obtain the plug-in model, version, check code and other plug-in information of the plug-in under test, and based on the process that the test tool obtains and records the test data of the plug-in under test after the plug-in test is completed, the entire test process is recorded to form a corresponding test log, which is convenient for later viewing, and when a problem occurs in the plug-in, the test tool reads the internal variables and operating status, performs open-in setting, fixed value setting and other serial port debugging methods based on the test tool, which can improve the efficiency of finding error points.
[0011] Furthermore, in step 1), the set communication rules are message format communication rules including a command data area; the command data area consists of a control command type and command data corresponding to the control command type; in step 3), the test case is transmitted to the tester via the message format.
[0012] The method of the present invention is a process of transmitting data through a message format, and based on the test cases corresponding to the plug-in type stored in the test tool, after the plug-in type of the plug-in under test is determined, the specific test case is transmitted through the message format data of the command data area including the control command type and the command data corresponding to the control command type.
[0013] Furthermore, in step 1), after the test tool is connected to the tested plug-in for communication, the tested plug-in is time-synchronized, and in step 4), the test data is test data with time information.
[0014] The method of the present invention synchronizes the time of the plug-in under test after the test tool and the plug-in under test are communicatively connected, so as to check the corresponding test log record according to the time data, that is, the test log record is a record including time information, which is convenient for managing the test record and facilitating the later viewing of the test log. Moreover, based on the test data being test data with time information, it is convenient to check the accuracy of the tool opening, setting, fixed value setting and other use case tests.
[0015] Furthermore, when the plug-in under test is a digital input plug-in, the corresponding test case is a digital input threshold value setting test case; the digital input threshold value setting test case includes action value threshold value setting and reset value threshold value setting under a set voltage.
[0016] Furthermore, the message format also includes a synchronization header and a message length arranged before the command data area, and a checksum and a terminator arranged after the command data area.
[0017] In order to solve the above technical problems, the present invention also provides a plug-in testing system for a relay protection device, comprising a tester, which is used to control and connect with the plug-in under test, so as to output corresponding control quantities to the plug-in under test according to the test case, so as to perform plug-in testing on the plug-in under test, and also comprises a test tool, which stores test cases corresponding to the plug-in types, and sets serial port communication parameters for the test tool according to the set communication rules, so that after the test tool and the plug-in under test are communicated and connected, the test tool and the plug-in under test communicate with each other; the test tool is used to obtain the plug-in information of the plug-in under test, so as to select the test cases required for the test of the plug-in under test according to the plug-in type in the plug-in information, and transmit the test cases to the tester; the test tool is also used to obtain and record the test data of the plug-in under test after the plug-in test is completed.
[0018] The beneficial effects are as follows: the system of the present invention is a system with a plug-in testing method process for serial port debugging, which does not rely on additional auxiliary plug-ins such as CPU / FPGA, and can read internal variables through serial port communication messages, monitor timing, CPU operating status, CPU occupancy, and obtain plug-in internal event reports and logs (open-in position change status, time, mode, etc.), and the serial port debugging process is to set the serial port communication parameters of the test tool according to the set communication rules, and based on this setting, the required data can be transmitted, that is, the test tool can obtain the plug-in model, version, check code and other plug-in information of the plug-in under test, and based on the process that the test tool obtains and records the test data of the plug-in under test after the plug-in test is completed, the entire test process is recorded to form a corresponding test log, which is convenient for later viewing, and when a problem occurs in the plug-in, the test tool reads the internal variables and operating status, and performs serial port debugging methods such as open-in setting and fixed value setting, which can improve the efficiency of finding error points.
[0019] Furthermore, the set communication rules are message format communication rules including a command data area; the command data area consists of a control command type and command data corresponding to the control command type; and the test tool is used to transmit the test case to the tester via the message format.
[0020] The present invention is a process of transmitting data through a message format, and based on the test cases corresponding to the plug-in type stored in the test tool, after the plug-in type of the plug-in under test is determined, the specific test case is transmitted through the message format data of the command data area including the control command type and the command data corresponding to the control command type.
[0021] Furthermore, the test tool is also used to synchronize the time of the plug-in under test after the test tool is connected to the plug-in under test in communication; and the test data is test data with time information.
[0022] The present invention synchronizes the time of the plug-in under test after the test tool and the plug-in under test are connected in communication, so as to check the corresponding test log record according to the time data, that is, the test log record is a record including time information, which is convenient for managing the test record and facilitating the later viewing of the test log. Moreover, based on the test data being test data with time information, it is convenient to check the accuracy of the tool opening, setting, fixed value setting and other use case tests.
[0023] Furthermore, when the plug-in under test is a digital input plug-in, the corresponding test case is a digital input threshold value setting test case; the digital input threshold value setting test case includes action value threshold value setting and reset value threshold value setting under a set voltage.
[0024] Furthermore, the message format also includes a synchronization header and a message length arranged before the command data area, and a checksum and a terminator arranged after the command data area. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a schematic diagram of a single plug-in test system of a relay protection device of the present invention;
[0026] Figure 2 It is a schematic diagram of the single plug-in test communication format of the relay protection device of the present invention;
[0027] Figure 3 The present invention is a single plug-in test flow chart of the relay protection device. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below with reference to the accompanying drawings and embodiments.
[0029] Plug-in test system embodiment of relay protection device:
[0030] In order to record the test process of the tested plug-in during the plug-in test, the system of this embodiment is designed to include a serial port debugging process that can meet the comprehensive functional test of a single plug-in, in view of the diverse and flexible functional characteristics of the intelligent IO plug-in (i.e., the tested plug-in). The system of this embodiment also includes a test tool and a tester, so as to transmit internal event reports and logs (input shift status, time, mode, etc.) through the test tool, the tester and the serial port debugging method, read internal variables, monitor timing, CPU operating status, and CPU occupancy, and can perform fixed value setting, threshold value setting, input setting, and control output, and at the same time support CAN network sending and receiving message forwarding.
[0031] like Figure 1 As shown, the system of this embodiment includes a test tool and a tester. When the smart IO plug-in is tested, the test tool communicates with the smart IO plug-in through UART serial port communication. The communication process in this embodiment is based on the RS232 communication serial port design. The message format is as follows Figure 2 As shown, it is composed of a synchronization header, a message length, a command data area, a checksum, and a terminator. In this embodiment, the corresponding settings of the synchronization header, the message length, the command data area, the checksum, and the terminator are as follows:
[0032] The length of the synchronization header is 1 byte, fixed as AAH;
[0033] The message length is 1 byte, indicating the total length of a frame message, which shall not exceed 255 bytes.
[0034] The command data area consists of the control command type and the command data area. The control command type is 1 byte long. Currently, the control commands include: data download, get current status, get data, set data, CAN network message, command confirmation, device online information and other 15 command types. It can be flexibly expanded according to new business needs. The command data area is set to different specific command formats according to different control command types;
[0035] The checksum length is 1 byte, and the calculation area is: from the synchronization header to the command data area;
[0036] The length of the terminator is 1 byte and is fixed at 55H.
[0037] Based on the system configuration of this embodiment, the following can be achieved: Figure 3 The process of the plug-in test method of the relay protection device is shown:
[0038] 1) Set the test tool serial port communication parameters: baud rate, check bit, inquiry method, etc.;
[0039] Based on the system of this embodiment, before testing the plug-in under test, it is necessary to open the test tool to set the serial port communication parameters: baud rate, check bit, inquiry mode, etc., so that the communication process can be carried out when the plug-in under test is connected to the test tool.
[0040] 2) The test tool connects to the plug-in, obtains plug-in information, and completes the timing;
[0041] Connect the tested plug-in through the serial data transmission line, use RS232 for data exchange, and obtain plug-in information such as plug-in type, event report, log, input position change, CPU running status, CPU occupancy rate, etc. First, align the intelligent IO plug-in to facilitate the subsequent viewing of the test log record.
[0042] 3) Determine the plug-in test case type and test the plug-in under test;
[0043] In this embodiment, after determining the plug-in type through the message query of the test tool, the corresponding plug-in test case is selected. The test case is divided into input plug-in test, output plug-in test, input and output plug-in test, DC small signal plug-in test and other types according to the type of intelligent IO plug-in. The corresponding test case can be added according to subsequent needs, that is, the test case of this embodiment corresponds to the plug-in type. For example, if the plug-in type is an input plug-in, the input plug-in test is performed, and the input plug-in test corresponds to the input threshold value setting test case, including the action value threshold value setting in 220V mode, the reset value threshold value setting in 220V mode, the action value threshold value setting in 110V mode, and the action value threshold value setting in 110V mode. The test case execution process is: ① The tester outputs the action voltage value / reset voltage value to the input terminal; ② Switch the tool view to the analog quantity to confirm whether each channel has data; ③ Set the current analog quantity sampling value to the 220V input action threshold value / reset threshold value through the tool menu setting.
[0044] 4) Collect test results, generate test process logs, and record test time.
[0045] After the test case is executed, the test tool automatically collects the test results, generates test process logs and event records, and completes the plug-in test.
[0046] Based on the test tools in the system of this embodiment, it is possible to perform case tests such as threshold value setting of input action value and reset value under different voltage levels, output test, etc., to assist designers and debuggers to conveniently and reliably complete the functional test of the intelligent IO plug-in. In addition, the debugging means of this embodiment is based on serial port debugging, which can read internal variables, monitor timing, CPU operation status, CPU occupancy, obtain plug-in internal event reports and logs (input shift status, time, mode, etc.), perform fixed value setting, threshold value setting, input setting and control output to record the entire test process, form a corresponding test log, which is convenient for later viewing and easy to find problem points when the plug-in has problems. The plug-in testing method implemented based on the system of this embodiment can test the functions of the intelligent IO plug-in in all aspects, the message format is simple and clear, the test case can be flexibly expanded according to application requirements, and the design and debugging personnel use it efficiently and conveniently, which greatly improves the debugging efficiency and reliability of the intelligent IO plug-in.
[0047] Plug-in test method embodiment of relay protection device:
[0048] In order to facilitate finding the problem point after a problem occurs on the board and obtain internal information such as the sampling value, status value, and operating status of the plug-in during the test, this embodiment designs a plug-in testing method for a relay protection device based on the functional characteristics of diversity and flexibility of the intelligent IO plug-in. The method can be implemented by a plug-in testing system for the relay protection device. The process of implementing the plug-in testing method for the relay protection device by the plug-in testing system for the relay protection device has been described in detail in the embodiment of the plug-in testing system for the relay protection device and will not be repeated here.
[0049] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. The patent protection scope of the present invention shall be based on the claims. All equivalent structural changes made using the contents of the description and drawings of the present invention should also be included in the protection scope of the present invention.
Claims
1. A plug-in testing method for a relay protection device, characterized in that: The steps include: 1) According to the set communication rules, serial port communication parameters are set for the test tool so that after the test tool and the tested plug-in are connected in communication, the test tool and the tested plug-in communicate with each other; the test tool stores test cases corresponding to the plug-in type; 2) The test tool obtains the plug-in information of the plug-in to be tested, and selects the test case required for testing the plug-in to be tested according to the plug-in type in the plug-in information; 3) The test tool transmits the test case to the tester, and the tester outputs the corresponding control quantity to the plug-in under test according to the test case, so as to perform plug-in testing on the plug-in under test; 4) After the plug-in test is completed, the test tool obtains and records the test data of the tested plug-in.
2. The plug-in testing method for a relay protection device according to claim 1, characterized in that: In step 1), the set communication rule is a message format communication rule including a command data area; the command data area consists of a control command type and command data corresponding to the control command type; in step 3), the test case is transmitted to the tester via the message format.
3. The plug-in testing method for a relay protection device according to claim 2, characterized in that: In step 1), after the test tool is connected to the tested plug-in for communication, the tested plug-in is time-synchronized. In step 4), the test data is test data with time information.
4. The plug-in testing method for a relay protection device according to claim 3, characterized in that: When the plug-in under test is a digital input plug-in, the corresponding test case is a digital input threshold value setting test case; the digital input threshold value setting test case includes action value threshold value setting and reset value threshold value setting under a set voltage.
5. The plug-in testing method for a relay protection device according to claim 2, characterized in that: The message format also includes a synchronization header and a message length arranged before the command data area, and a checksum and a terminator arranged after the command data area.
6. A plug-in test system for a relay protection device, comprising a tester, the tester being used to control and connect with a plug-in under test, so as to output corresponding control quantities to the plug-in under test according to a test case, so as to perform a plug-in test on the plug-in under test, characterized in that: The system also includes a test tool, wherein the test tool stores test cases corresponding to the plug-in type, and after the serial port communication parameters of the test tool are set according to the set communication rules so that the test tool and the plug-in under test are connected in communication, the test tool and the plug-in under test communicate with each other; the test tool is used to obtain the plug-in information of the plug-in under test, select the test cases required for the plug-in under test according to the plug-in type in the plug-in information, and transmit the test cases to the tester; The testing tool is also used to obtain and record the test data of the tested plug-in after the plug-in test is completed.
7. The plug-in test system for relay protection device according to claim 6, characterized in that: The set communication rule is a message format communication rule including a command data area; the command data area is composed of a control command type and command data corresponding to the control command type; the test tool is used to transmit the test case to the tester through the message format.
8. The plug-in test system for relay protection device according to claim 7, characterized in that: The test tool is also used to synchronize the time of the plug-in under test after the test tool is connected to the plug-in under test for communication; the test data is test data with time information.
9. The plug-in test system for relay protection device according to claim 8, characterized in that: When the plug-in under test is a digital input plug-in, the corresponding test case is a digital input threshold value setting test case; the digital input threshold value setting test case includes action value threshold value setting and reset value threshold value setting under a set voltage.
10. The plug-in test system for relay protection device according to claim 7, characterized in that: The message format also includes a synchronization header and a message length arranged before the command data area, and a checksum and a terminator arranged after the command data area.
Citation Information
Patent Citations
Relay protection device board card board automatic test system
CN109143019A
Cited By
Automatic test system and method for broadband oscillation monitoring control device
CN120972849A
