A kind of automatic testing device and method of power distribution terminal
Through the power distribution terminal automated test device, automated test boxes and computers are used to realize automatic detection of power distribution terminals, which solves the problem of low manual inspection efficiency, improves detection efficiency, and reduces human resource consumption.
Patent Information
- Application Number
- CN202410821882.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-06-25
Smart Images

Figure CN118376867B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automated testing, and in particular to an automated testing device and method for a power distribution terminal. Background Art
[0002] At present, distribution terminals are an important part of building smart distribution networks and realizing distribution network automation. They are the general term for various remote monitoring and control units installed in distribution networks. They are mainly used to monitor and control distribution lines and distribution equipment in real time, realize fault detection and fault location of distribution lines, and provide a basis for fault isolation of distribution automation systems and restoration of power supply to non-fault areas.
[0003] At present, the test items of most products in the distribution device production line require manual inspection of the tested devices, which leads to waste of manpower and low efficiency in the inspection process. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present invention provides a power distribution terminal automatic testing device and method.
[0005] The technical solution of the present invention to solve the above technical problems is as follows:
[0006] In a first aspect, the present invention provides an automated test device for a power distribution terminal, comprising an automated test box, a computer and a power source, wherein the automated test box comprises a main control unit and a switch, wherein the switch is connected to the power source, wherein the main control unit is connected to a device under test and the switch respectively, wherein the computer is connected to the main control unit and the device under test via the switch, wherein the computer is provided with a test unit, and wherein the test unit is connected to the device under test via a network port;
[0007] A metering chip is arranged inside the device under test, and three high-precision resistors are arranged on the automatic test box.
[0008] By adopting the above technical solution, the tester writes the test script through the test unit on the computer and sets the test parameters (such as test time, load conditions, etc.). When performing the test operation, the test unit sends the test instruction to the main control unit through the switch. After receiving the instruction, the main control unit starts the test of the device under test. During the test, the main control unit transmits real-time data (such as the power parameters of the device under test) to the computer through the switch. At the same time, the test unit can also send control instructions to the device under test through the switch to adjust the test parameters or terminate the test.
[0009] After the test is completed, the test unit collects and analyzes the test data and generates a test report. The test report includes the test results, data analysis, and possible suggestions or improvement measures. The test unit on the computer can automatically execute the test script, reducing the time and error rate of manual operation. During the test, data can be collected and analyzed in real time, and potential problems can be discovered and handled in a timely manner.
[0010] In a second aspect, the present invention provides an automated testing method for a power distribution terminal, wherein the testing unit generates a remote control command and sends the remote control command to a device under test through a network port, the device under test receives the remote control command and performs a remote control action, the remote control output of the device under test is connected to an automated testing box through a cable, in the automated testing box, the remote control output is connected to a corresponding remote signal, the remote signal is connected to a remote signal input of the device under test through a cable, and the remote signal state of the device under test is set to a closed position;
[0011] The device under test sends the updated remote signaling status information to the test unit through the network port, and the test unit receives the corresponding remote signaling closing position information, and then determines that the remote control and remote signaling tests are passed.
[0012] Further, the computer executes a ping command and specifies an IP address, sends an ICMP echo request to the IP address, and the ICMP echo request is sent to the network port of the device under test through the network port of the computer;
[0013] The network port of the device under test receives and identifies the ICMP echo request, the device under test generates an ICMP echo reply data packet accordingly, and sends the ICMP echo reply data packet back to the computer;
[0014] If the computer receives the ICMP echo reply data packet sent by the device under test, the ping command displays a "ping successful" result, indicating that the network between the computer and the corresponding network port of the device under test is unobstructed.
[0015] Further, the test unit sends character data to the USB to serial port tool through the serial port driver;
[0016] The USB to serial port tool converts character data into serial port signals and sends them to the device under test through the console port;
[0017] The device under test receives and processes the serial port signal, and sends the processing result or corresponding character data back to the USB-to-serial port tool through the console port;
[0018] The USB-to-serial tool converts the received serial port signal into a USB signal and transmits it to the test unit through the serial port driver;
[0019] The test unit reads the received character data through the serial port driver and determines whether it is consistent with the expected result;
[0020] If the received character data matches the expected result, the test is considered passed.
[0021] Further, the test unit determines a protocol for communicating with the encryption IC and sends a command to the encryption IC to request its serial number;
[0022] The test unit receives the serial number returned by the encryption IC and compares it with the expected serial number or format to verify its validity; if the serial number verification passes, the encryption test is recorded as passed.
[0023] Furthermore, the computer runs a test unit, and the test unit sends a control instruction to the power source through a network port or other communication interface according to a preset test strategy, wherein the control instruction includes set voltage and current parameters;
[0024] After receiving the control instruction from the computer, the power source outputs according to the specified voltage and current parameters, and connects the output to the voltage and current terminals of the device under test through cables;
[0025] The voltage and current terminals of the device under test receive voltage and current signals from a power source, and the metering chip inside the device under test samples the voltage and current signals;
[0026] The calculation circuit in the metering chip processes the sampled voltage and current signals, and calculates the power consumption in combination with the power factor and frequency parameters;
[0027] The metering chip sends the sampled voltage and current data and the calculated results to the test unit through the network port;
[0028] After receiving the data from the metering chip, the test unit executes a setting step. The test unit sends a setting command to the device under test through the network port. The device under test executes the setting command to obtain a setting coefficient, and writes the setting coefficient into the metering chip of the device under test. The metering chip calculates the sampled voltage and current parameters and the setting coefficient. The metering chip sends the calculated voltage and current parameters to the test unit through the network port. The test unit compares the received voltage and current parameters with the error range of the preset reference value.
[0029] If these parameters are within the preset error range, the test unit will determine that the test has passed.
[0030] Further, the device under test includes a USB, and the USB of the device under test is connected to a USB flash drive. If the USB flash drive is mounted normally, the device under test verifies whether the device descriptor received from the USB flash drive is valid and complete;
[0031] If the device descriptor is verified, the device under test will generate a remote signal indicating normal mounting;
[0032] The test unit receives remote signals from the device under test through a communication interface;
[0033] The test unit parses the remote signal content to determine whether it contains a normal mounted identifier;
[0034] If the remote signal includes an identification of normal mounting, the test unit determines that the USB mounting test is passed.
[0035] Furthermore, the CPU in the automated test box collects voltage and current values through its ADC channel, and the ADC channel is used to convert analog signals into digital signals;
[0036] The CPU encapsulates the collected voltage and current value data according to the RS485 bus protocol, and sends the data to the device under test through the RS485 interface of the device under test;
[0037] The device under test receives data from the automated test box via an RS485 interface;
[0038] The device under test analyzes the received data and extracts voltage and current values;
[0039] The device under test sends the parsed data to the test unit through the network port; after receiving the data, the test unit checks the integrity and accuracy of the data;
[0040] If the test unit can read the voltage and current values normally, and these values are consistent with the expected values, then the test unit will determine that the RS485 communication is normal;
[0041] The carrier module in the automated test box and the carrier module of the device under test are networked through carrier signals;
[0042] During the networking process, the two carrier modules will send and receive specific signals to each other to establish a communication connection.
[0043] If the carrier module in the automated test box and the carrier module of the device under test can successfully establish a communication connection and can achieve normal data transmission and reception, the carrier test passes.
[0044] Furthermore, the device under test includes PT100, and the high-precision resistor is used to simulate the resistance value of the PT100 of the device under test at different temperatures. The test unit sends a control command to the CPU, and the CPU sends a control command to the relay of the main control unit; each relay controls whether a high-precision resistor is connected or not, and when the relay is closed, the corresponding resistor is connected to the detection path of the PT100;
[0045] Before calibration, the test unit selects a first high-precision resistor to be connected to the PT100 detection path through a control command, and the first high-precision resistor corresponds to the PT100 resistance value at high temperature;
[0046] The PT100 sampling circuit of the device under test reads a first output value of the PT100 detection circuit, wherein the output value represents a simulated resistance value of the PT100 at high temperature;
[0047] The test unit selects a second high-precision resistor to be connected to the PT100 detection path through a control command, and a second output value is read by the PT100 sampling circuit of the device under test, wherein the second high-precision resistor corresponds to the PT100 resistance value at low temperature;
[0048] The algorithm in the device under test calibrates the temperature curve of the PT100 according to the first output value and the second output value;
[0049] After completing the calibration of PT100, the test unit controls the third relay to close, and connects the third high-precision resistor to the detection path;
[0050] The device under test reads the third output value of the PT100 detection circuit and calculates the corresponding temperature value through the calibrated PT100 temperature curve;
[0051] The calculated temperature value is compared with the expected temperature value to determine whether it is within the allowable error range. If the calculated temperature value is within the allowable error range, the test passes.
[0052] Furthermore, the automated test box collects voltage and current values through internal sensors and sends them through an RS232 interface;
[0053] Before sending the data, the test unit encodes the data according to the RS232 protocol, and the device under test receives the data from the automated test box through its RS232 interface;
[0054] The device under test decodes the received data to restore the original voltage and current values;
[0055] The device under test forwards the received voltage and current value data to the test unit through its network port;
[0056] The test unit receives data from the device under test through a network interface, and parses the received data to extract voltage and current values;
[0057] The test unit checks whether the received data is complete and accurate, and compares it with the expected voltage and current values;
[0058] If the test unit can read the voltage and current values normally, and these values are consistent with the expected values or within the allowable error range, it is judged that the RS232 communication is normal.
[0059] In summary, compared with the prior art, the above technical solution has the following beneficial effects:
[0060] The automatic testing device and method for power distribution terminals described in the present invention can automatically perform power distribution terminal detection work, confirm whether the power distribution terminal meets the detection standards, and locate the test items that do not meet the detection standards, which is beneficial to improving test efficiency, shortening detection time, and reducing human resource expenditure. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 It is a module block diagram of the present invention. DETAILED DESCRIPTION
[0062] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.
[0063] The embodiment of the invention discloses an automatic testing device and method for a power distribution terminal.
[0064] Reference Figure 1 , an automated test device for a power distribution terminal, comprising an automated test box, a computer and a power source, the automated test box comprising a main control unit and a switch, the switch being connected to the power source, the main control unit being connected to the device under test and the switch respectively, the computer being connected to the main control unit and the device under test via the switch, the computer being provided with a test unit, the test unit being communicatively connected to the device under test via a network port; a metering chip being provided inside the device under test, and three high-precision resistors being provided on the automated test box. High-precision resistors refer to resistors with small resistance tolerance and stable resistance. This type of resistor element has high precision and stability and is used to provide accurate resistance values.
[0065] The operator operates the computer and can check the corresponding test items in the test unit, including: remote control and telesignal detection, network port status detection, console port detection, encryption chip and 4G / 5G detection, metering chip detection, USB detection, button detection, port detection, PT100 detection, RS232 detection. Among them, the console port is a common interface on network equipment (such as routers, switches, etc.) used to connect to computers or terminal devices. It is mainly used for initial configuration and subsequent management of the equipment. PT100 is a platinum thermal resistor, and its resistance value will change with changes in temperature. The test unit enables the automated test device to perform tests according to the test procedure based on the selected test items, and the test pass and fail items are prompted on the test unit.
[0066] The tester writes the test script through the test unit on the computer and sets the test parameters (such as test time, load conditions, etc.). When performing the test operation, the test unit sends the test command to the main control unit through the switch. After receiving the command, the main control unit starts the test of the device under test. During the test, the main control unit transmits real-time data (such as the power parameters of the device under test) to the computer through the switch. At the same time, the test unit can also send control commands to the device under test through the switch to adjust the test parameters or terminate the test.
[0067] After the test is completed, the test unit collects and analyzes the test data and generates a test report. The test report includes the test results, data analysis, and possible suggestions or improvement measures. The test unit on the computer can automatically execute the test script, reducing the time and error rate of manual operation. During the test, data can be collected and analyzed in real time, and potential problems can be discovered and handled in a timely manner.
[0068] Based on the above device, an embodiment of the present invention further discloses an automatic test method for a power distribution terminal, wherein the test unit generates a remote control command and sends the remote control command to a device under test through a network port, the device under test receives the remote control command and performs a remote control action, the remote control output of the device under test is connected to an automatic test box through a cable, in the automatic test box, the remote control output is connected to a corresponding remote signal, the remote signal is connected to the remote signal input of the device under test through a cable, and the remote signal state of the device under test is set to the closed position;
[0069] The device under test sends the updated remote signaling status information to the test unit through the network port, and the test unit receives the corresponding remote signaling closing position information, and then determines that the remote control and remote signaling tests are passed.
[0070] This test process can effectively verify whether the remote control and telesignaling functions of the device under test are working properly. Through the remote control command sending of the test unit and the response of the device under test, it can be ensured that the remote control command can be executed correctly, and the device under test can accurately perceive and feedback the execution results. During the test, the sending of remote control commands and the feedback of telesignaling status are both carried out through the network port, which can verify the network communication capability and real-time performance of the device under test. Ensure that in actual applications, remote control operations can take effect quickly and the telesignaling status can be updated in real time. During the test, the remote control output is connected to the corresponding telesignaling in the automated test box through a cable, forming a closed-loop test system. This closed-loop test method can simulate the remote control and telesignaling interaction process in actual application scenarios, and improve the accuracy and reliability of the test.
[0071] The computer executes a ping command and specifies an IP address, sends an ICMP echo request to the IP address, and the ICMP echo request is sent to the network port of the device under test through the network port of the computer;
[0072] The network port of the device under test receives and identifies the ICMP echo request, the device under test generates an ICMP echo reply data packet accordingly, and sends the ICMP echo reply data packet back to the computer;
[0073] If the computer receives the ICMP echo reply data packet sent by the device under test, the ping command displays a "ping successful" result, indicating that the network between the computer and the corresponding network port of the device under test is unobstructed.
[0074] When the computer sends an ICMP echo request to the specified IP address (i.e. the IP address of the device under test), if the network is unobstructed, the device under test will be able to receive this request and generate a corresponding ICMP echo reply packet. This process can verify whether the network connection between the computer and the device under test is normal. Once the computer receives the ICMP echo reply packet sent by the device under test, the ping command will immediately display the result of "ping through". This real-time feedback mechanism allows testers to quickly understand the status of network connectivity without waiting for additional response time.
[0075] If the computer does not receive the ICMP echo reply packet sent by the device under test, the ping command will display "Request Timeout" or other similar information, which indicates that there is a problem with network connectivity. This error detection mechanism helps testers to find and solve network failures in a timely manner. Using the ping command to test network connectivity is simple and efficient. Testers only need to enter the corresponding commands and parameters in the command line to quickly complete the test process. At the same time, the output results of the ping command are clear and easy for testers to analyze and judge the test results.
[0076] Whether it is a LAN, WAN or Internet environment, the ping command can effectively test network connectivity. This makes the test method widely applicable and flexible. When a network failure occurs, the location and cause of the failure can be preliminarily determined by executing the ping command.
[0077] The test unit sends character data to the USB to serial port tool through the serial port driver;
[0078] The USB to serial port tool converts character data into serial port signals and sends them to the device under test through the console port;
[0079] The device under test receives and processes the serial port signal, and sends the processing result or corresponding character data back to the USB-to-serial port tool through the console port;
[0080] The USB-to-serial tool converts the received serial port signal into a USB signal and transmits it to the test unit through the serial port driver;
[0081] The test unit reads the received character data through the serial port driver and determines whether it is consistent with the expected result;
[0082] If the received character data matches the expected result, the test is considered passed.
[0083] This test process can comprehensively check the serial communication function of the device under test, including data transmission, reception, processing and correctness verification. This helps to ensure that the serial communication module of the device under test can work properly and meet the actual application requirements. The test unit sends character data to the USB to serial port tool through the serial port driver, and receives and processes the response data from the device under test in real time. This real-time test process can ensure that the data transmission and processing speed meet the requirements and the accuracy is verified. If it is found during the test that the test unit cannot receive the correct character data, the problem can be quickly located. Possible reasons include serial port driver configuration errors, USB to serial port tool failures, serial communication module problems of the device under test, or abnormal cable connections. By checking these possible reasons one by one, the problem can be quickly found and solved.
[0084] By using the existing serial port driver and USB to serial port tool, no additional hardware equipment or complex configuration steps are required. Testers only need to write a simple test program to realize the automated test of the serial port communication function of the device under test, which improves the ease of use and efficiency of the test. This test method is suitable for various devices under test based on serial port communication, whether it is an embedded system, industrial control equipment or other types of electronic equipment. As long as the device under test has a serial port communication interface, this method can be used for testing. Through this test process, it can be ensured that the serial port communication function of the device under test has no defects in design and implementation, which improves the reliability and stability of the product. This is especially important for application scenarios that require long-term stable operation or have high requirements for data transmission reliability.
[0085] The test unit determines a protocol for communicating with the encryption IC and sends a command to the encryption IC to request its serial number;
[0086] The test unit receives the serial number returned by the encryption IC and compares it with the expected serial number or format to verify its validity; if the serial number verification passes, the encryption test is recorded as passed.
[0087] After ensuring that the encryption IC of the device under test has been correctly installed and the test unit has been started and connected to the device under test, the test unit sends a request to the device under test through the network port to read the serial number of the encryption IC. If the device under test can respond to the request of the test unit and return the correct encryption IC serial number, the encryption test is judged to have passed. If it cannot be read or the returned serial number is incorrect, it is judged to have failed.
[0088] Make sure that the device under test has a SIM card inserted or the corresponding network connection parameters are configured, and the cloud account has been created and is available. The test unit attempts to connect to the specified cloud account using the 4G / 5G network by controlling the device under test. Once the connection is successfully established, the test unit sends a test message to the cloud account and waits to receive a response message from the cloud account. If the connection is established successfully and the device under test can send and receive messages normally (that is, the sent message is successfully received by the cloud account, and the received response message is as expected), the 4G / 5G communication test is judged to have passed. If the connection fails or the message is sent and received abnormally, it is judged to have failed.
[0089] The computer runs a test unit, and the test unit sends a control instruction to the power source through a network port or other communication interface according to a preset test strategy, wherein the control instruction includes set voltage and current parameters;
[0090] After receiving the control instruction from the computer, the power source outputs according to the specified voltage and current parameters, and connects the output to the voltage and current terminals of the device under test through cables;
[0091] The voltage and current terminals of the device under test receive voltage and current signals from a power source, and the metering chip inside the device under test samples the voltage and current signals;
[0092] The calculation circuit in the metering chip processes the sampled voltage and current signals, and calculates the power consumption in combination with the power factor and frequency parameters;
[0093] The metering chip sends the sampled voltage and current data and the calculated results to the test unit through the network port;
[0094] After receiving the data from the metering chip, the test unit executes a setting step. The test unit sends a setting command to the device under test through the network port. The device under test executes the setting command to obtain a setting coefficient, and writes the setting coefficient into the metering chip of the device under test. The metering chip calculates the sampled voltage and current parameters and the setting coefficient. The metering chip sends the calculated voltage and current parameters to the test unit through the network port. The test unit compares the received voltage and current parameters with the error range of the preset reference value.
[0095] If these parameters are within the preset error range, the test unit will determine that the test has passed.
[0096] The test unit automatically sends control instructions to the power source through the preset test strategy, and receives data from the metering chip of the device under test, realizing the automation of the test process. This greatly improves the test efficiency and reduces the error of human operation. The power source can accurately output the specified voltage and current parameters according to the control instructions sent by the test unit. This ensures the consistency of the test environment and improves the accuracy of the test results.
[0097] After receiving the voltage and current signals from the power source, the metering chip of the device under test can sample and process these signals and calculate the power consumption. The test unit can also verify the setting function of the metering chip to ensure its measurement accuracy under different conditions. The test unit can receive data from the metering chip in real time, including the sampled voltage and current data and the calculated results. This allows testers to understand the performance of the device under test in real time and discover potential problems in a timely manner.
[0098] The test unit can determine whether the performance of the device under test meets the requirements by comparing the received voltage and current parameters with the error range of the preset reference value. This error range control mechanism ensures the accuracy and reliability of the test results. If the test unit finds that the received voltage and current parameters exceed the preset error range, it can quickly locate the problem, which may be a problem with the power source output, a cable connection problem, or a problem with the device under test itself. This helps testers to quickly resolve faults and improve test efficiency. Through this test process, it can be ensured that the metering chip of the device under test can accurately measure the power consumption under various conditions, thereby improving the reliability and stability of the device under test.
[0099] The device under test includes a USB, and the USB of the device under test is connected to a USB flash drive. If the USB flash drive is mounted normally, the device under test verifies whether the device descriptor received from the USB flash drive is valid and complete;
[0100] If the device descriptor is verified, the device under test will generate a remote signal indicating normal mounting;
[0101] The test unit receives remote signals from the device under test through a communication interface;
[0102] The test unit parses the remote signal content to determine whether it contains a normal mounted identifier;
[0103] If the remote signal includes an identification of normal mounting, the test unit determines that the USB mounting test is passed.
[0104] When performing key detection, the operator finds the key to be tested on the LCD panel of the device under test. Press the key to trigger the corresponding telesignaling signal. The device under test sends the telesignaling signal of the key to the test unit through the network port. The test unit receives the telesignaling data from the device under test. Parse the data to determine the specific content and status of the telesignaling signal (for example, whether it is in the closed position). The test unit determines whether it is the expected closed position based on the parsed telesignaling signal content. If the telesignaling signal status is consistent with the expectation (that is, it is in the closed position), the corresponding key test is judged to have passed. If the telesignaling signal status is inconsistent with the expectation, the corresponding key test is judged to have failed.
[0105] The CPU in the automated test box collects voltage and current values through its ADC channel, and the ADC channel is used to convert analog signals into digital signals;
[0106] The CPU encapsulates the collected voltage and current value data according to the RS485 bus protocol, and sends the data to the device under test through the RS485 interface of the device under test;
[0107] The device under test receives data from the automated test box via an RS485 interface;
[0108] The device under test analyzes the received data and extracts voltage and current values;
[0109] The device under test sends the parsed data to the test unit through the network port; after receiving the data, the test unit checks the integrity and accuracy of the data;
[0110] If the test unit can read the voltage and current values normally, and these values are consistent with the expected values, then the test unit will determine that the RS485 communication is normal;
[0111] The carrier module in the automated test box and the carrier module of the device under test are networked through carrier signals;
[0112] During the networking process, the two carrier modules will send and receive specific signals to each other to establish a communication connection.
[0113] If the carrier module in the automated test box and the carrier module of the device under test can successfully establish a communication connection and can achieve normal data transmission and reception, the carrier test passes.
[0114] The CPU in the automated test box accurately collects voltage and current values through the ADC channel and converts them into digital signals. These digital signals are packaged according to the RS485 bus protocol and sent to the device under test accurately and reliably through the RS485 interface. The device under test can successfully receive and parse the RS485 data from the automated test box and extract the voltage and current values. After receiving this data, the test unit will check the integrity and accuracy of the data to ensure that no data is lost or damaged during the communication process. If the test unit can read the voltage and current values normally and these values are consistent with the expected values, the test unit will quickly determine that the RS485 communication is normal. This efficient communication judgment mechanism helps to quickly locate communication faults and improve test efficiency.
[0115] The carrier module in the automated test box and the carrier module of the device under test can successfully establish a communication connection through the carrier signal to achieve normal data transmission and reception. During the networking process, the two carrier modules send and receive specific signals to each other to verify the stability of the communication connection and the reliability of data transmission. If the data can be transmitted and received normally, the carrier test passes. If there is a problem during the carrier communication process, such as the inability to establish a communication connection or abnormal data transmission, the tester can quickly locate the problem and take appropriate solutions. Through the carrier communication test, it can be ensured that the carrier module of the device under test can work stably and reliably in actual applications, enhancing the stability of the entire system.
[0116] The device under test includes PT100, and the high-precision resistor is used to simulate the resistance value of PT100 of the device under test at different temperatures. The test unit sends a control command to the CPU, and the CPU sends a control command to the relay of the main control unit; each relay controls whether a high-precision resistor is connected or not, and when the relay is closed, the corresponding resistor is connected to the detection path of PT100;
[0117] Before calibration, the test unit selects a first high-precision resistor to be connected to the PT100 detection path through a control command, and the first high-precision resistor corresponds to the PT100 resistance value at high temperature;
[0118] The PT100 sampling circuit of the device under test reads a first output value of the PT100 detection circuit, wherein the output value represents a simulated resistance value of the PT100 at high temperature;
[0119] The test unit selects a second high-precision resistor to be connected to the PT100 detection path through a control command, and a second output value is read by the PT100 sampling circuit of the device under test, wherein the second high-precision resistor corresponds to the PT100 resistance value at low temperature;
[0120] According to the first output value and the second output value, the algorithm in the device under test calibrates the temperature curve of PT100, and the specific steps are as follows:
[0121] Define that Y represents the temperature calculated from the ADC sampling voltage value, and X represents the ADC sampling voltage value corresponding to different PT100 resistance values; a and b are coefficients; the ADC sampling voltage and temperature, and the temperature and PT100 resistance value are linearly related.
[0122] After switching to the first high-precision resistor, the ADC sampling circuit collects the voltage value x of the first high-precision resistor and reads the voltage value x 10 times in a certain period of time, which is defined as x1, x2…xi…x10. The 10 voltage values x are sorted from small to large, the largest 3 values are eliminated, the smallest 3 values are eliminated, and the remaining 4 values are averaged to obtain , according to the resistance value of the first high-precision resistor Find the corresponding temperature by looking up the table Similarly, the resistance value of the second high-precision resistor is obtained. Corresponding , ,according to:
[0123]
[0124]
[0125] Calculate a and b; get the temperature curve of PT100 .
[0126] After completing the calibration of PT100, the test unit controls the third relay to close, and connects the third high-precision resistor to the detection path;
[0127] The device under test reads the third output value of the PT100 detection circuit and calculates the corresponding temperature value through the calibrated PT100 temperature curve;
[0128] The calculated temperature value is compared with the expected temperature value to determine whether it is within the allowable error range. If the calculated temperature value is within the allowable error range, the test passes.
[0129] By using high-precision resistors to simulate the resistance value of PT100 at different temperatures, this method can accurately simulate the actual working conditions of PT100 and provide a reliable data basis for subsequent calibration. During the calibration process, by selecting high-precision resistors with different resistance values and reading the corresponding ADC sampling voltage values, the calibration coefficients a and b are calculated using the linear relationship to obtain an accurate PT100 temperature curve. This calibration method can significantly improve the accuracy of PT100 temperature measurement. When reading the ADC sampling voltage value, by eliminating the largest and smallest values and averaging the remaining values, the impact of random errors on the calibration results is effectively reduced, and the reliability of the data is improved.
[0130] After completing the calibration of PT100, the third high-precision resistor is connected to the detection path by controlling the third relay, the corresponding ADC sampling voltage value is read, and the corresponding temperature value is calculated through the calibrated PT100 temperature curve. The calculated temperature value is compared with the expected temperature value to determine whether it is within the allowable error range, thereby verifying the effectiveness of the calibration. The entire test process is implemented through automated control without manual intervention, which greatly improves the test efficiency. At the same time, through precise calibration and verification, it is ensured that the device under test can accurately measure the temperature in actual applications, improving the reliability and stability of the product.
[0131] The automated test box collects voltage and current values through internal sensors and sends them through an RS232 interface;
[0132] Before sending the data, the test unit encodes the data according to the RS232 protocol, and the device under test receives the data from the automated test box through its RS232 interface;
[0133] The device under test decodes the received data to restore the original voltage and current values;
[0134] The device under test forwards the received voltage and current value data to the test unit through its network port;
[0135] The test unit receives data from the device under test through a network interface, and parses the received data to extract voltage and current values;
[0136] The test unit checks whether the received data is complete and accurate, and compares it with the expected voltage and current values;
[0137] If the test unit can read the voltage and current values normally, and these values are consistent with the expected values or within the allowable error range, it is judged that the RS232 communication is normal.
[0138] Before sending data, the test unit strictly encodes the data according to the RS232 protocol to ensure that the data will not be lost or damaged due to format errors during transmission. After receiving the data through the RS232 interface, the device under test can successfully decode and restore the original voltage and current values, ensuring the accuracy of the data. The entire communication process is implemented through the RS232 interface, which is widely used in the field of industrial automation and has good stability and reliability. The communication test between the test unit and the device under test verifies the stability and reliability of the device under test under the RS232 communication protocol, providing a strong guarantee for practical applications.
[0139] If the test unit finds that the data is incomplete or erroneous when receiving the data, it can quickly locate the problem, whether it is a problem in the data transmission process or a decoding error in the device under test. This helps testers solve problems quickly and improve test efficiency. After receiving the voltage and current value data sent by the device under test, the test unit will compare it with the expected voltage and current values. Through accurate data comparison, it can be determined whether the device under test has accurately measured the voltage and current values, thereby verifying the accuracy and reliability of the device under test. When comparing the received data with the expected value, the test unit will consider the allowable error range. This means that even if there is a slight difference between the received data and the expected value, as long as the difference is within the allowable range, the test will still be judged as passed. This error range control mechanism improves the flexibility and practicality of the test.
[0140] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the scope of protection of the invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on these embodiments, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in this field can still combine, add, delete or make other adjustments to the features in the various embodiments of the present invention according to the circumstances without conflict, without making creative work, so as to obtain different other technical solutions that do not deviate from the concept of the present invention in essence, and these technical solutions also belong to the scope of protection of the present invention.
Claims
1. An automatic test device for power distribution terminals, It is characterized in that include: An automated test box, a computer and a power source, wherein the automated test box comprises a main control unit and a switch, wherein the switch is connected to the power source, wherein the main control unit is connected to the device under test and the switch respectively, wherein the computer is connected to the main control unit and the device under test via the switch, wherein the computer is provided with a test unit, and wherein the test unit is connected to the device under test via a network port; The device under test is provided with a metering chip inside, and the automated test box is provided with three high-precision resistors; The device under test includes PT100, and the high-precision resistor is used to simulate the resistance value of PT100 of the device under test at different temperatures. The test unit sends a control command to the CPU, and the CPU sends a control command to the relay of the main control unit; each relay controls whether a high-precision resistor is connected or not, and when the relay is closed, the corresponding resistor is connected to the detection path of PT100; Before calibration, the test unit selects a first high-precision resistor to be connected to the PT100 detection path through a control command, and the first high-precision resistor corresponds to the PT100 resistance value at high temperature; The PT100 sampling circuit of the device under test reads a first output value of the PT100 detection circuit, wherein the output value represents a simulated resistance value of the PT100 at high temperature; The test unit selects a second high-precision resistor to be connected to the PT100 detection path through a control command, and a second output value is read by the PT100 sampling circuit of the device under test, wherein the second high-precision resistor corresponds to the PT100 resistance value at low temperature; The algorithm in the device under test calibrates the temperature curve of the PT100 according to the first output value and the second output value; After completing the calibration of PT100, the test unit controls the third relay to close, and connects the third high-precision resistor to the detection path; The device under test reads the third output value of the PT100 detection circuit and calculates the corresponding temperature value through the calibrated PT100 temperature curve; The calculated temperature value is compared with the expected temperature value to determine whether it is within the allowable error range. If the calculated temperature value is within the allowable error range, the test passes.
2. An automatic testing method for a power distribution terminal based on the testing device according to claim 1, Features: The test unit generates a remote control command and sends the remote control command to the device under test through the network port. The device under test receives the remote control command and performs a remote control action. The remote control output of the device under test is connected to the automated test box through a cable. In the automated test box, the remote control output is connected to the corresponding remote signal. The remote signal is connected to the remote signal input of the device under test through a cable, and the remote signal state of the device under test is set to the closed position. The device under test sends the updated remote signaling status information to the test unit through the network port, and the test unit receives the corresponding remote signaling closing position information, and then determines that the remote control and remote signaling tests are passed.
3. According to claim 2, a method for automatic testing of power distribution terminals, Features: The computer executes a ping command and specifies an IP address, sends an ICMP echo request to the IP address, and the ICMP echo request is sent to the network port of the device under test through the network port of the computer; The network port of the device under test receives and identifies the ICMP echo request, the device under test generates an ICMP echo reply data packet accordingly, and sends the ICMP echo reply data packet back to the computer; If the computer receives the ICMP echo reply data packet sent by the device under test, the ping command displays a "ping successful" result, indicating that the network between the computer and the corresponding network port of the device under test is unobstructed.
4. A method for automatic testing of power distribution terminals according to claim 2, Features: The test unit sends character data to the USB to serial port tool through the serial port driver; The USB to serial port tool converts character data into serial port signals and sends them to the device under test through the console port; The device under test receives and processes the serial port signal, and sends the processing result or corresponding character data back to the USB-to-serial port tool through the console port; The USB-to-serial port tool converts the received serial port signal into a USB signal and transmits it to the test unit through the serial port driver; The test unit reads the received character data through the serial port driver and determines whether it is consistent with the expected result; If the received character data matches the expected result, the test is considered passed.
5. A method for automatic testing of power distribution terminals according to claim 2, Features: The test unit determines a protocol for communicating with the encryption IC and sends a command to the encryption IC to request its serial number; The test unit receives the serial number returned by the encryption IC and compares it with the expected serial number or format to verify its validity; If the serial number verification passes, the encryption test is recorded as passed.
6. A method for automatic testing of power distribution terminals according to claim 2, Features: The computer runs a test unit, and the test unit sends a control instruction to the power source through a network port or other communication interface according to a preset test strategy, wherein the control instruction includes set voltage and current parameters; After receiving the control instruction from the computer, the power source outputs according to the specified voltage and current parameters, and connects the output to the voltage and current terminals of the device under test through cables; The voltage and current terminals of the device under test receive voltage and current signals from a power source, and the metering chip inside the device under test samples the voltage and current signals; The calculation circuit in the metering chip processes the sampled voltage and current signals, and calculates the power consumption in combination with the power factor and frequency parameters; The metering chip sends the sampled voltage and current data and the calculated results to the test unit through the network port; After receiving the data from the metering chip, the test unit executes a setting step. The test unit sends a setting command to the device under test through the network port. The device under test executes the setting command to obtain a setting coefficient, and writes the setting coefficient into the metering chip of the device under test. The metering chip calculates the sampled voltage and current parameters and the setting coefficient. The metering chip sends the calculated voltage and current parameters to the test unit through the network port. The test unit compares the received voltage and current parameters with the error range of the preset reference value. If these parameters are within the preset error range, the test unit will determine that the test has passed.
7. A method for automatic testing of power distribution terminals according to claim 2, Features: The device under test includes a USB, and the USB of the device under test is connected to a USB flash drive. If the USB flash drive is mounted normally, the device under test verifies whether the device descriptor received from the USB flash drive is valid and complete; If the device descriptor is verified, the device under test will generate a remote signal indicating normal mounting; The test unit receives remote signals from the device under test through a communication interface; The test unit parses the remote signal content to determine whether it contains a normal mounted identifier; If the remote signal includes an identification of normal mounting, the test unit determines that the USB mounting test is passed.
8. A method for automatic testing of power distribution terminals according to claim 2, Features: The CPU in the automated test box collects voltage and current values through its ADC channel, and the ADC channel is used to convert analog signals into digital signals; The CPU encapsulates the collected voltage and current value data according to the RS485 bus protocol, and sends the data to the device under test through the RS485 interface of the device under test; The device under test receives data from the automated test box via an RS485 interface; The device under test analyzes the received data and extracts voltage and current values; The device under test sends the parsed data to the test unit through the network port; after receiving the data, the test unit checks the integrity and accuracy of the data; If the test unit can read the voltage and current values normally, and these values are consistent with the expected values, then the test unit will determine that the RS485 communication is normal; The carrier module in the automated test box and the carrier module of the device under test are networked through carrier signals; During the networking process, the two carrier modules will send and receive specific signals to each other to establish a communication connection; If the carrier module in the automated test box and the carrier module of the device under test can successfully establish a communication connection and can achieve normal data transmission and reception, the carrier test passes.
9. A method for automatic testing of power distribution terminals according to claim 2, Features: The automated test box collects voltage and current values through internal sensors and sends them through an RS232 interface; Before sending the data, the test unit encodes the data according to the RS232 protocol, and the device under test receives the data from the automated test box through its RS232 interface; The device under test decodes the received data to restore the original voltage and current values; The device under test forwards the received voltage and current value data to the test unit through its network port; The test unit receives data from the device under test through a network interface, and parses the received data to extract voltage and current values; The test unit checks whether the received data is complete and accurate, and compares it with the expected voltage and current values; If the test unit can read the voltage and current values normally, and these values are consistent with the expected values or within the allowable error range, it is judged that the RS232 communication is normal.
