Performance evaluation and test device for serial communication interface of electric energy meter and concentrator

By designing performance evaluation and testing devices for the serial communication interface of the power meter and concentrator, the microcontroller unit and module automatically identify the polarity and load capacity of the RS-485 interface, the inefficiency of manual testing in the prior art is solved. The problem of this achieves more efficient and accurate test results.

CN119094411AInactive Publication Date: 2024-12-06WUHAN SAN FRAN ELECTRONICS CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411109018.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-12-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing RS-485 performance evaluation method requires manual testing, resulting in inefficient testing and cumbersome process.

Method used

Design a performance evaluation and testing device for the serial communication interface of the power meter and concentrator, including a microcontroller unit, a serial communication interface module, a buffer, a polarity switching module and a load module, and automatically identify the serial communication interface The polarity and load capacity of the process enable automated testing.

Benefits of technology

It improves the degree of automation and intelligence of tests, has higher efficiency, more comprehensive indicators, and more accurate results, avoiding errors caused by misjudgment of manual tests and insufficient load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094411A_ABST
    Figure CN119094411A_ABST
Patent Text Reader

Abstract

The invention provides a performance evaluation and test device for serial communication interfaces of an electric energy meter and a concentrator. The device comprises a micro-control unit, a serial communication interface module, a buffer, a polarity exchange module, a load module and a tested serial communication interface which are connected in sequence, the micro-control unit is used for transmitting a control instruction to the serial communication interface module, and the micro-control unit is also connected with the polarity exchange module and the load module respectively and is used for controlling the polarity exchange module and the load module respectively; the buffer is used for isolating the signal input by the serial communication interface module and outputting the isolated signal; the polarity exchange module is used for exchanging the polarity of the serial communication interface module so as to identify whether the tested serial communication interface has the polarity or not; and the load module is used for adding a load to the tested serial communication interface so as to evaluate the loading capacity of the tested serial communication interface. The evaluation and test device provided by the invention is more comprehensive in test index, higher in efficiency and more accurate in test result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of performance testing, and in particular to a performance evaluation and testing device for an electric energy meter or a serial communication interface of a concentrator. Background Art

[0002] In recent years, smart energy meters, concentrators and other power equipment have been widely used in industries, shopping malls, banks, residential areas and other fields. They are one of the important means of modern energy management, greatly improving management efficiency and intelligence. RS-485 plays an important role in power equipment communication due to its high data stability and fast transmission speed. Therefore, the requirements for RS-485 communication baud rate, reliability, etc. are becoming more and more stringent, and an accurate and intelligent RS-485 performance evaluation method and test device are urgently needed.

[0003] Currently, the performance evaluation of RS-485 is relatively simple and requires manual testing, resulting in low testing efficiency and cumbersome process. Summary of the invention

[0004] The present invention provides a performance evaluation and testing device for an electric energy meter and a serial communication interface of a concentrator, so as to solve the defects of low testing efficiency and complicated process caused by manual testing in the prior art.

[0005] The present invention provides a performance evaluation and testing device for an electric energy meter and a serial communication interface of a concentrator, comprising a microcontroller unit, a serial communication interface module, a buffer, a polarity exchange module, a load module and a serial communication interface to be tested which are connected in sequence; The micro control unit is used to transmit control instructions to the serial communication interface module, and the micro control unit is also connected to the polarity exchange module and the load module respectively, and is used to control the polarity exchange module and the load module respectively; The buffer is used to isolate the signal input by the serial communication interface module and output the isolated signal; The polarity exchange module is used to exchange the polarity of the serial communication interface module to identify whether the tested serial communication interface has polarity; The load module is used to add a load to the tested serial communication interface to evaluate the load capacity of the tested serial communication interface.

[0006] According to the performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator provided by the present invention, the micro control unit is used for: Controlling the polarity exchange module to exchange the polarity of the serial communication interface module, so that the polarity of the serial communication interface module and the polarity of the tested serial communication interface change from positive connection to reverse connection, or from reverse connection to positive connection; In the forward connection and reverse connection conditions respectively, test whether the serial communication interface module communicates successfully with the tested serial communication interface under various communication baud rate conditions.

[0007] According to the performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator provided by the present invention, the micro control unit is also used for: If the serial communication interface module successfully communicates with the serial communication interface under test in both the forward connection and the reverse connection, it is identified that the serial communication interface under test has no polarity; If the serial communication interface module communicates successfully with the serial communication interface under test in the positive connection condition, but fails to communicate successfully in the reverse connection condition; or if the serial communication interface module communicates unsuccessfully with the serial communication interface under test in the positive connection condition, but succeeds in the reverse connection condition, then it is identified that the serial communication interface under test has polarity.

[0008] According to the performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator provided by the present invention, the micro control unit includes a baud rate identification subunit, and the baud rate identification subunit is used to: Performing communication tests on the serial communication interface under test respectively under the conditions of each preset baud rate; If the test result is successful communication under the condition of the preset baud rate, it is identified that the tested serial communication interface supports the preset baud rate, otherwise it is identified that the tested serial communication interface does not support the preset baud rate.

[0009] According to the performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator provided by the present invention, the micro control unit further includes a baud rate communication deviation identification subunit, and the baud rate communication deviation identification subunit is used to: When it is identified that the tested serial communication interface supports the preset baud rate, the communication deviation at the preset baud rate is tested.

[0010] According to the performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator provided by the present invention, the baud rate communication deviation identification subunit is specifically used for: Determine a minimum error value and a maximum error value of the current search, and determine an intermediate error value of the current search based on the minimum error value and the maximum error value; Under the condition that the preset baud rate deviates from the intermediate error value currently found, performing a communication test on the tested serial communication interface; If the communication is successful, the intermediate error value of the current search is used as the minimum error value of the next search; otherwise, the intermediate error value of the current search is used as the maximum error value of the next search, and the intermediate error value of the next search is updated; The intermediate error value of the next search is used as the intermediate error value of the current search, and the communication test is returned to be performed until the search termination condition is met and the communication is successful, and the intermediate error value of the last search is used as the communication deviation at the preset baud rate.

[0011] According to the performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator provided by the present invention, the load module comprises: a digital-to-analog conversion module, an operational amplifier, a first resistor, a second resistor and a metal oxide semi-field effect transistor; The input end of the digital-to-analog conversion module is connected to the microcontroller unit, the output end of the digital-to-analog conversion module is connected to the in-phase input end of the operational amplifier, the inverting input end of the operational amplifier is grounded through a second resistor, the output end of the operational amplifier is connected to the gate of the metal oxide semi-conductor field effect transistor through a first resistor, the source of the metal oxide semi-conductor field effect transistor is grounded through the second resistor, the drain of the metal oxide semi-conductor field effect transistor is connected to any polarity of the serial communication interface under test, and the other polarity of the serial communication interface under test is grounded.

[0012] According to the performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator provided by the present invention, the micro control unit further includes a load test subunit, and the load test subunit is used for: The output voltage value of the digital-to-analog conversion module is controlled to adjust the load current value of the tested serial communication interface.

[0013] According to the performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator provided by the present invention, the load testing subunit is further used for: When the load current value of the tested serial communication interface is not zero, performing a communication test on the tested serial communication interface; If the test result is that the communication is successful, it is identified that the load capacity of the tested serial communication interface reaches the load current value; otherwise, it is identified that the load capacity of the tested serial communication interface does not reach the load current value.

[0014] According to the performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator provided by the present invention, the load testing subunit is further used for: Determine the minimum load value and the maximum load value of the current search, and determine the current intermediate load value based on the minimum load value and the maximum load value; Controlling the load current value of the tested serial communication interface to be the current intermediate load value, and performing a communication test on the tested serial communication interface; If the communication is successful, the current intermediate load value is used as the minimum load value for the next search; otherwise, the current intermediate load value is used as the maximum load value for the next search, and the next intermediate load value is updated; The next intermediate load value is used as the current intermediate load value, and the communication test is returned to be performed until the search termination condition is met and the communication is successful, and the load capacity of the tested serial communication interface is determined based on the last intermediate load value.

[0015] According to the performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator provided by the present invention, the device further comprises an output module, and the output module is used for: Based on the polarity identification result of the polarity exchange module and the load capacity evaluation result of the load module, generating a performance evaluation table of the tested serial communication interface; The performance evaluation table is output and visualized.

[0016] The performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator provided by the present invention can automatically identify whether the tested serial communication interface has polarity, and automatically identify its load capacity. Compared with manual testing, the device has a high degree of automation and intelligence, more comprehensive test indicators, higher efficiency, and more accurate test results. In addition, by adding a buffer, the driving capability of the serial communication interface module can be improved, avoiding misjudgment caused by insufficient driving capability of the device itself after adding the load, thereby further improving the accuracy of the test. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 The present invention is a schematic diagram of the structure of a performance evaluation and testing device for an electric energy meter and a serial communication interface of a concentrator.

[0019] Figure 2 This is a circuit diagram of a polarity exchange module provided by the present invention.

[0020] Figure 3 The present invention is a flowchart of a baud rate communication deviation range testing method.

[0021] Figure 4It is a structural schematic diagram of the load module provided by the present invention.

[0022] Figure 5 It is a flow chart of the load capacity testing method provided by the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] In the description of the embodiments of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0025] In view of the problem that the current performance evaluation of RS-485 is relatively simple and requires manual testing, resulting in low testing efficiency and cumbersome procedures, an embodiment of the present invention provides a performance evaluation and testing device for an electric energy meter and a serial communication interface of a concentrator. The device can be used for the performance evaluation and testing of the serial communication interface of an electric energy meter, and can also be used for the performance evaluation and testing device of the serial communication interface of a concentrator. Compared with manual testing, the device has a higher degree of automation and intelligence, and has more comprehensive test indicators, higher efficiency, and more accurate test results.

[0026] Figure 1 Schematic diagram of the structure of the performance evaluation and testing device for the serial communication interface of the electric energy meter and the concentrator provided by the present invention, such as Figure 1 As shown, the device includes a micro control unit 110, a serial communication interface module 120, a buffer 130, a polarity exchange module 140, a load module 150 and a serial communication interface 160 to be tested, which are connected in sequence; A microcontrol unit, used for transmitting control instructions to the serial communication interface module, and the microcontrol unit is also connected to the polarity exchange module and the load module respectively, and is used for controlling the polarity exchange module and the load module respectively; A buffer, used for isolating a signal input by the serial communication interface module and outputting the isolated signal; A polarity exchange module, used for exchanging the polarity of the serial communication interface module to identify whether the tested serial communication interface has polarity; The load module is used to add a load to the serial communication interface under test to evaluate the load capacity of the serial communication interface under test.

[0027] Specifically, the microcontroller unit (MCU) is the control core of the performance evaluation and test device. The microcontroller unit transmits the control instructions to the serial communication interface module through the serial port. The serial communication interface module here can be a serial communication interface module. The working principle of the MCU is mainly to control its internal hardware resources through a pre-written program to achieve specific functions. The microcontroller unit is also connected to the polarity exchange module for controlling the polarity exchange module. The microcontroller unit is also connected to the load module for controlling the load module.

[0028] In addition, the microcontroller unit can also communicate with the PC via a USB or RS-232 interface to receive control instructions from the PC.

[0029] The device also includes a buffer, the output signal of the serial communication interface module is input to the buffer, the buffer isolates the signal input to the serial communication interface module, and outputs the isolated signal. A buffer is an electronic component with input and output ports, which can receive an input signal and convert it into an output signal. The buffer can improve the driving capability of the serial communication interface module, and avoid affecting the validity of the test data due to insufficient driving capability of the serial communication interface module.

[0030] The device also includes a polarity exchange module, which is used to exchange the polarity of the serial communication interface module. By exchanging the polarity of the serial communication interface module, it is possible to automatically identify whether the tested serial communication interface has polarity. Whether the tested serial communication interface has polarity refers to whether the device has specific polarity requirements for the A and B lines of the signal on the RS-485 communication interface.

[0031] In addition, the device also includes a load module, which is used to add a load to the serial communication interface under test so as to automatically identify the load capacity of the serial communication interface under test.

[0032] The performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator provided by the embodiment of the present invention can automatically identify whether the tested serial communication interface has polarity, and automatically identify its load capacity. Compared with manual testing, the device has a high degree of automation and intelligence, more comprehensive test indicators, higher efficiency, and more accurate test results. In addition, by adding a buffer, the driving capability of the serial communication interface module can be improved, avoiding misjudgment caused by insufficient driving capability of the device itself after adding the load, thereby further improving the accuracy of the test.

[0033] Based on the above embodiment, the micro control unit is used for: Controlling the polarity exchange module to exchange the polarity of the serial communication interface module, so that the polarity of the serial communication interface module and the polarity of the serial communication interface under test change from positive connection to reverse connection, or from reverse connection to positive connection; In the forward and reverse connection conditions, test whether the serial communication interface module and the serial communication interface under test communicate successfully under various communication baud rate conditions.

[0034] Specifically, Figure 2 is a circuit diagram of a polarity exchange module provided by the present invention, such as Figure 2 As shown, the microcontroller controls the polarity exchange module to exchange the polarity of the serial communication interface module. If the polarity of the serial communication interface module is positively connected to the polarity of the serial communication interface under test, it is reversely connected through the polarity exchange module; if the polarity of the serial communication interface module is reversely connected to the polarity of the serial communication interface under test, it is positively connected through the polarity exchange module.

[0035] And test whether the serial communication interface module and the tested serial communication interface communicate successfully under various communication baud rate conditions in the forward and reverse connection conditions.

[0036] In some embodiments, for example, the A and B polarities of the serial communication interface module can be first connected to the A and B polarities of the serial communication interface under test (A to A, B to B), and whether the communication is successful can be tested under various communication baud rate conditions.

[0037] Then, by controlling the polarity exchange module, the A and B polarities of the serial communication interface module are reversed with the A and B polarities of the serial communication interface under test (A to B, B to A), and whether the communication is successful is tested under various communication baud rate conditions.

[0038] Based on any of the above embodiments, the micro control unit is further used for: If the serial communication interface module successfully communicates with the serial communication interface under test in both the forward connection and the reverse connection, it is identified that the serial communication interface under test has no polarity; If the serial communication interface module communicates successfully with the tested serial communication interface in the positive connection, but fails to communicate in the reverse connection; or

[0039] In the case of positive connection, the serial communication interface module fails to communicate with the serial communication interface under test, and in the case of reverse connection, the communication succeeds, and it is identified that the serial communication interface under test has polarity.

[0040] Specifically, if the tested serial communication interface does not have polarity, it means that the tested serial communication interface can automatically detect and adapt to different signal polarities, thereby achieving compatible communication with devices of different polarities, and there is no need to pay special attention to the polarity of A and B lines during connection. Therefore, in both positive and reverse connection conditions, the serial communication interface module and the tested serial communication interface can communicate successfully, and it is identified that the tested serial communication interface does not have polarity.

[0041] If the serial communication interface under test has a polarity requirement, it must be connected strictly in accordance with this regulation. If the polarity connection is wrong, it may cause communication failure or the device to not work properly. Therefore, if the serial communication interface module successfully communicates with the serial communication interface under test in the positive connection, but fails to communicate in the reverse connection; or if the serial communication interface module fails to communicate with the serial communication interface under test in the positive connection, but succeeds in the reverse connection, then it is recognized that the serial communication interface under test has polarity.

[0042] Based on any of the above embodiments, the micro control unit includes a baud rate identification subunit, and the baud rate identification subunit is used to: Perform communication tests on the serial communication interface under test respectively under the conditions of various preset baud rates; If the test result is successful communication under the condition of the preset baud rate, it is identified that the tested serial communication interface supports the preset baud rate, otherwise it is identified that the tested serial communication interface does not support the preset baud rate.

[0043] Specifically, the performance evaluation and testing device provided by the embodiment of the present invention can also automatically identify the communication baud rate supported by the tested serial communication interface by automatically identifying the communication baud rate supported by the tested serial communication interface through the baud rate identification subunit in the microcontroller unit.

[0044] The preset baud rates here can be the RS-485 communication baud rates of current power equipment, mainly 1200bps, 2400bps, 4800bps, 9600bps, 38400bps, 57600bps, and 115200bps.

[0045] For example, under the condition of 1200bps communication baud rate, if the tested serial communication interface communicates successfully, it is identified that the tested serial communication interface supports 1200bps communication baud rate; if the communication is unsuccessful, it is considered that the tested serial communication interface does not support 1200bps communication baud rate. Similarly, communication tests are performed for each preset baud rate to automatically identify the communication baud rate supported by the tested serial communication interface.

[0046] Based on any of the above embodiments, the micro control unit further includes a baud rate communication deviation identification subunit, and the baud rate communication deviation identification subunit is used to: When it is identified that the tested serial communication interface supports the preset baud rate, the communication deviation at the preset baud rate is tested.

[0047] Specifically, if it is identified that the tested serial communication interface supports a preset baud rate, the communication deviation under the preset baud rate can be further identified. For example, if the tested serial communication interface supports a 1200bps communication baud rate, the communication deviation under the preset baud rate can be further tested by a binary approximation search algorithm. The baud rate communication deviation refers to the allowed range of baud rate variation, such as: 2400bps±5%.

[0048] Based on any of the above embodiments, the baud rate communication deviation identification subunit is specifically used for: Determine the minimum error value and the maximum error value of the current search, and determine the intermediate error value of the current search based on the minimum error value and the maximum error value; Under the condition that the baud rate deviation is preset to the middle error value found at the current time, a communication test is performed on the serial communication interface under test; If the communication is successful, the intermediate error value of the current search is used as the minimum error value of the next search; otherwise, the intermediate error value of the current search is used as the maximum error value of the next search, and the intermediate error value of the next search is updated; The intermediate error value of the next search is used as the intermediate error value of the current search, and the communication test is returned to be performed until the search termination condition is met and the communication is successful, and the intermediate error value of the last search is used as the communication deviation at the preset baud rate.

[0049] Specifically, Figure 3 FIG. 1 is a flow chart of the baud rate communication deviation range testing method provided by the present invention. Figure 3 As shown, first determine the minimum error value and maximum error value of the current search. Taking the positive error range as an example, the RS-485 baud rate range is generally around 5%. The minimum error value of the first search can be set to 0%, and the maximum error value can be set to 10% (the maximum error value can be flexibly set according to actual conditions). And based on the minimum error value and the maximum error value, determine the middle error value of the current search, middle error value = (minimum error value + maximum error value) / 2 = 5%.

[0050] Taking the positive error range as an example, the preset baud rate is 1200bps, and the middle error value is 5%, that is, the communication test of the serial communication interface under test is performed at a baud rate of 1260bps: if the communication is successful, 5% is used as the minimum error value of the second search, and the maximum error value of the second search is still 10%, and the middle error value of the second search is immediately updated, that is, the middle error value of the second search is (5%+10%) / 2=7.5%; if the communication is unsuccessful, 5% is used as the maximum error value of the second search, and the minimum error value of the second search is still 0%, and the middle error value of the second search is immediately updated, that is, the middle error value of the second search is (5%+0%) / 2=2.5%.

[0051] After obtaining the middle error value of the second search, the middle error value of the second search (7.5% or 2.5%) is used as the middle error value of the current search, and the communication test is returned to be executed.

[0052] That is, under the condition of the middle error value (7.5% or 2.5%) of the second search for the preset baud rate deviation, that is, the baud rate is 1290bps or 1230bps, the communication test of the serial communication interface under test is performed, and so on, until the search termination condition is reached and the communication is successful. The termination condition can be that the search here reaches a preset number of times, such as 10 times. The middle error value of the last search is used as the communication deviation at the preset baud rate. The use of this method can improve the test efficiency and accuracy of the baud rate dynamic range.

[0053] Figure 3 As shown, Low stores the minimum error value of the current search, High stores the maximum error value of the search, Mid stores the middle value between Low and High, n is the number of searches, Suc_com=1 means successful communication, and Suc_com=0 means unsuccessful communication.

[0054] Based on any of the above embodiments, Figure 4 is a schematic diagram of the structure of the load module provided by the present invention, such as Figure 4 As shown, the load module includes: a digital-to-analog conversion module, an operational amplifier, a first resistor, a second resistor and a metal oxide semi-field effect transistor; The input end of the digital-to-analog conversion module is connected to the microcontroller unit, the output end of the digital-to-analog conversion module is connected to the in-phase input end of the operational amplifier, the inverting input end of the operational amplifier is grounded through a second resistor, the output end of the operational amplifier is connected to the gate of the metal oxide semi-conductor field effect transistor through a first resistor, the source of the metal oxide semi-conductor field effect transistor is grounded through a second resistor, the drain of the metal oxide semi-conductor field effect transistor is connected to any polarity of the serial communication interface under test, and the other polarity of the serial communication interface under test is grounded.

[0055] Specifically, in order to test the load capacity of the tested serial communication interface, a certain load can be added to the polarity of the output of the tested serial communication interface, and then a communication test can be performed. Under the premise of successful communication, the maximum load that the tested serial communication interface can carry can be tested.

[0056] It should be noted that Figure 4 The figure shows only the load test circuit diagram of the A polarity of the serial communication interface under test. The load test of the B polarity is the same as that of the A polarity.

[0057] The test principle of load capacity is as follows: the microcontroller unit MCU gives a voltage value to the positive electrode of the operational amplifier U1 through the digital-to-analog conversion module DAC. This voltage value is compared with the voltage across R2, and the voltage at the positive and negative electrodes of the operational amplifier is made basically equal by controlling the metal oxide semi-conductor field effect transistor Q1.

[0058] If the voltage output by the digital-to-analog conversion module DAC is U DAC , the load current of the tested serial communication interface RS485 is I, then

[0059] 2

[0060] So we get:

[0061] Different load currents can be obtained by outputting different voltages through the digital-to-analog conversion module DAC.

[0062] Based on any of the above embodiments, the micro control unit further includes a load testing subunit, and the load testing subunit is used to: The output voltage value of the digital-to-analog conversion module is controlled to adjust the load current value of the serial communication interface under test.

[0063] Specifically, the load module is controlled by a microcontroller unit, and the test method of the load current of the tested serial communication interface is: the microcontroller unit MCU communicates with the digital analog conversion module DAC, and the digital analog conversion module DAC outputs different voltages to make the tested serial communication interface RS485 carry different load currents.

[0064] Based on the above embodiment, the load testing subunit is further used for: When the load current value of the tested serial communication interface is not zero, performing a communication test on the tested serial communication interface; If the test result is that the communication is successful, it is identified that the load capacity of the tested serial communication interface reaches the load current value, otherwise it is identified that the load capacity of the tested serial communication interface does not reach the load current value.

[0065] When the load current value of the tested serial communication interface is not zero, that is, the tested serial communication interface performs RS485 communication test under load. If the communication is successful, it means that the tested serial communication interface can drive this load current. If the communication is unsuccessful, it means that the tested serial communication interface cannot drive this load current.

[0066] Based on any of the above embodiments, the load testing subunit is further used for: Determine the minimum load value and the maximum load value of the current search, and determine the current intermediate load value based on the minimum load value and the maximum load value; Controlling the load current value of the tested serial communication interface to be the current intermediate load value, and performing a communication test on the tested serial communication interface; If the communication is successful, the current intermediate load value is used as the minimum load value for the next search; otherwise, the current intermediate load value is used as the maximum load value for the next search, and the next intermediate load value is updated; The next intermediate load value is used as the current intermediate load value, and the communication test is returned to be executed until the search termination condition is reached and the communication is successful, and the load capacity of the tested serial communication interface is determined based on the last intermediate load value.

[0067] Specifically, the load capacity testing method may adopt a binary approximation search algorithm. Figure 5 FIG. 1 is a flow chart of the load capacity testing method provided by the present invention. Figure 5 As shown, Low stores the minimum load value currently being searched, High stores the maximum load value being searched, Mid stores the middle value between Low and High, n is the number of searches, Suc_com=1 indicates successful communication, and Suc_com=0 indicates unsuccessful communication.

[0068] First, determine the minimum load value and maximum load value of the first search. For example, the minimum load value can be defined as 0 and the maximum load value can be defined as 200mA (the maximum load value can be flexibly set according to actual conditions). And based on the minimum load value and the maximum load value, determine the current intermediate load value, that is, 100 mA.

[0069] Control the load current value of the tested serial communication interface to be 100 mA, which is the current intermediate load value, and perform a communication test on the tested serial communication interface; If the communication is successful, the current intermediate load value 100 mA is used as the minimum load value for the second search, and the maximum load value for the second search is 200mA; otherwise, the current intermediate load value 100 mA is used as the maximum load value for the second search, and the minimum load value for the second search is 0. The second intermediate load value is updated, and the updated second intermediate load values ​​are 150mA (communication successful) and 50mA (communication unsuccessful).

[0070] The second intermediate load value is used as the current intermediate load value, and the communication test is returned until the search termination condition is reached and the communication is successful. The search termination condition may be that the search here reaches a preset number of times. The load capacity of the tested serial communication interface is determined based on the last intermediate load value. The method can improve the efficiency and accuracy of the load capacity test.

[0071] Based on any of the above embodiments, the device further includes an output module, and the output module is used to: Based on the polarity identification result of the polarity exchange module and the load capacity evaluation result of the load module, a performance evaluation table of the tested serial communication interface is generated; Output and visualize performance evaluation tables.

[0072] Specifically, the polarity identification result here may include having polarity and not having polarity. The load capacity evaluation result may be a maximum load value. In addition, the performance evaluation table may also include whether each preset baud rate is supported, and the communication deviation range corresponding to each preset baud rate, that is, the dynamic range. Preferably, the performance evaluation table may be shown as shown in Table 1.

[0073] Table 1

[0074] The performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator provided in the embodiment of the present invention can output a complete performance evaluation table, which is more intuitive.

[0075] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

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

[0077] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator, characterized in that: It includes a micro control unit, a serial communication interface module, a buffer, a polarity exchange module, a load module and a serial communication interface to be tested which are connected in sequence; The micro control unit is used to transmit control instructions to the serial communication interface module, and the micro control unit is also connected to the polarity exchange module and the load module respectively, and is used to control the polarity exchange module and the load module respectively; The buffer is used to isolate the signal input by the serial communication interface module and output the isolated signal; The polarity exchange module is used to exchange the polarity of the serial communication interface module to identify whether the tested serial communication interface has polarity; The load module is used to add a load to the tested serial communication interface to evaluate the load capacity of the tested serial communication interface.

2. The performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator according to claim 1, characterized in that: The micro control unit is used for: Controlling the polarity exchange module to exchange the polarity of the serial communication interface module, so that the polarity of the serial communication interface module and the polarity of the tested serial communication interface change from positive connection to reverse connection, or from reverse connection to positive connection; In the forward connection and reverse connection conditions respectively, test whether the serial communication interface module communicates successfully with the tested serial communication interface under various communication baud rate conditions.

3. The performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator according to claim 2 is characterized in that: The micro control unit is also used for: If the serial communication interface module successfully communicates with the serial communication interface under test in both the forward connection and the reverse connection, it is identified that the serial communication interface under test has no polarity; If the serial communication interface module communicates successfully with the serial communication interface under test in the positive connection condition, but fails to communicate successfully in the reverse connection condition; or if the serial communication interface module communicates unsuccessfully with the serial communication interface under test in the positive connection condition, but succeeds in the reverse connection condition, then it is identified that the serial communication interface under test has polarity.

4. The performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator according to claim 1, characterized in that: The micro control unit includes a baud rate identification subunit, and the baud rate identification subunit is used for: Performing communication tests on the serial communication interface under test respectively under the conditions of each preset baud rate; If the test result is successful communication under the condition of the preset baud rate, it is identified that the tested serial communication interface supports the preset baud rate, otherwise it is identified that the tested serial communication interface does not support the preset baud rate.

5. The performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator according to claim 4, characterized in that: The micro control unit further comprises a baud rate communication deviation identification subunit, wherein the baud rate communication deviation identification subunit is used for: When it is identified that the tested serial communication interface supports the preset baud rate, the communication deviation at the preset baud rate is tested.

6. The performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator according to claim 5, characterized in that: The baud rate communication deviation identification subunit is specifically used for: Determine a minimum error value and a maximum error value of the current search, and determine an intermediate error value of the current search based on the minimum error value and the maximum error value; Under the condition that the preset baud rate deviates from the intermediate error value currently found, performing a communication test on the tested serial communication interface; If the communication is successful, the intermediate error value of the current search is used as the minimum error value of the next search; otherwise, the intermediate error value of the current search is used as the maximum error value of the next search, and the intermediate error value of the next search is updated; The intermediate error value of the next search is used as the intermediate error value of the current search, and the communication test is returned to be performed until the search termination condition is met and the communication is successful, and the intermediate error value of the last search is used as the communication deviation at the preset baud rate.

7. The performance evaluation and testing device for the serial communication interface of an electric energy meter or concentrator according to any one of claims 1 to 6, characterized in that: The load module includes: a digital-to-analog conversion module, an operational amplifier, a first resistor, a second resistor and a metal oxide semi-field effect transistor; The input end of the digital-to-analog conversion module is connected to the micro control unit, the output end of the digital-to-analog conversion module is connected to the non-inverting input end of the operational amplifier, the inverting input end of the operational amplifier is grounded through a second resistor, the output end of the operational amplifier is connected to the gate of the metal oxide semi-conductor field effect transistor through a first resistor, the source of the metal oxide semi-conductor field effect transistor is grounded through the second resistor, the drain of the metal oxide semi-conductor field effect transistor is connected to any polarity of the serial communication interface under test, and the other polarity of the serial communication interface under test is grounded.

8. The performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator according to claim 7, characterized in that: The micro control unit further comprises a load test subunit, and the load test subunit is used for: The output voltage value of the digital-to-analog conversion module is controlled to adjust the load current value of the tested serial communication interface.

9. The performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator according to claim 8, characterized in that: The load testing subunit is further used for: When the load current value of the tested serial communication interface is not zero, performing a communication test on the tested serial communication interface; If the test result is that the communication is successful, it is identified that the load capacity of the tested serial communication interface reaches the load current value; otherwise, it is identified that the load capacity of the tested serial communication interface does not reach the load current value.

10. The performance evaluation and testing device for the serial communication interface of an electric energy meter and a concentrator according to claim 9, characterized in that: The load testing subunit is further used for: Determine the minimum load value and the maximum load value of the current search, and determine the current intermediate load value based on the minimum load value and the maximum load value; Controlling the load current value of the tested serial communication interface to be the current intermediate load value, and performing a communication test on the tested serial communication interface; If the communication is successful, the current intermediate load value is used as the minimum load value for the next search; otherwise, the current intermediate load value is used as the maximum load value for the next search, and the next intermediate load value is updated; The next intermediate load value is used as the current intermediate load value, and the communication test is returned to be performed until the search termination condition is met and the communication is successful, and the load capacity of the tested serial communication interface is determined based on the last intermediate load value.

Citation Information

Patent Citations

  • Electric energy meter RS485 communication interface comprehensive performance test module group and method

    CN106772202A

  • Intelligent ammeter communication module interface load capacity test device and method

    CN107450043A

  • Communication interface converter test system and method for multi-meter integrated collection device

    CN108595294A

  • Test method and system compatible with non-polar 485 networking simulation

    CN111835598A

  • Power supply polarity reversal connection test device, test system and method

    CN112965012A