Method for detecting electrical performance of M-BUS communication interface
Technical Field
The invention relates to the field of M-BUS communication measurement, in particular to a method for detecting the electrical performance of an M-BUS communication interface.
Background
The Meter Bus M-Bus (Meter-Bus) is a Bus protocol specially designed for remote data transmission of water, gas, heat and other meters, is an important technology for data transmission digitization of the meters, and is widely applied to the fields of water, gas, heat and other meters. Most of traditional testing means are used for simple voltage detection, equipment for comprehensively detecting the electrical characteristics of M-BUS communication equipment is lacked, and the actual communication capacity of the M-BUS communication module is difficult to comprehensively and objectively reflect.
The invention provides a method for automatically and rapidly detecting electrical characteristics of an M-BUS communication interface, which can comprehensively detect electrical characteristics such as pass voltage, idle voltage, pass current, idle current, host loading capacity, communication signal edge time and the like, and comprehensively reflect the communication performance of an M-BUS communication module to be detected.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a method for detecting the electrical performance of an M-BUS communication interface, which is used for comprehensively detecting the electrical characteristics of M-BUS communication equipment and objectively reflecting the actual communication capacity of an M-BUS communication module.
In order to solve the problems, the invention comprises a voltage differential sampling module (1), a current differential sampling module (2), a dual-channel high-speed sampling module (3), an adjustable constant current module (4) and a comprehensive processing module (5); the voltage differential sampling module (1) is used for sampling M + and M-differential voltage signals in an M-BUS communication interface, converting the differential signals into single-ended voltage signals, and sending the single-ended voltage signals into the double-channel high-speed sampling module (3) for high-speed sampling; the current differential sampling module (2) is used for sampling current on the M-BUS communication interface, converting a current signal into a voltage signal and then sending the voltage signal into the double-channel high-speed sampling module (3) for high-speed sampling; the dual-channel high-speed sampling module (3) is used for sampling voltage and current signals and sending the voltage and current signals to the subsequent comprehensive processing module (5) for digital processing; the comprehensive processing module (5) acquires voltage and current data and detects rising and falling edge time of a communication signal at the same time; the adjustable constant current module (4) is used for virtual load of M-BUS communication, the magnitude of a constant current value of the adjustable constant current module is controlled by the comprehensive processing module (5) according to test requirements, and the driving capability of the main module of the M-BUS to be tested and communication performance change of the main module of the M-BUS to be tested under different loads are tested by adjusting the constant current load value.
The comprehensive processing module (5) sends a test message to the main M-BUS communication module to be tested, and an M-BUS voltage signal enters the dual-channel high-speed sampling module (3) after passing through the overvoltage differential sampling module (1); the comprehensive processing module (5) continuously reads the digital quantization data of the dual-communication high-speed sampling module (3) until the transmission process is finished, synchronously receives the communication message to be detected received from the M-BUS communication module, after the reception is finished, the comprehensive processing module (5) calculates the number transmission voltage and the null voltage, calculates the rising and falling edge time during the conversion of the number transmission and null signals, judges the consistency of the message transmission and reception, and obtains the conclusion whether the communication function is normal or not and the data of the number transmission voltage, the null voltage and the signal edge time in the communication process.
The comprehensive processing module (5) sends a test message to the master M-BUS communication module to be tested, and after receiving the communication message of the slave M-BUS communication module to be tested, sends a response message to the slave M-BUS communication module to be tested; the M-BUS BUS current signal enters a double-channel high-speed sampling module (3) after passing through a current differential sampling module (2); the comprehensive processing module (5) continuously reads the digital quantization data of the dual-communication high-speed sampling module (3) until the transmission process of the response message is finished, synchronously receives the response message received by the main M-BUS communication module to be tested, calculates the number transmission current and the number idle current and calculates the rising and falling edge time during the conversion of the number transmission idle signal after the reception is finished, judges the consistency of the received and sent response message, and obtains the conclusion whether the communication function is normal and the number transmission current, the number idle current and the signal edge time data in the communication process.
The comprehensive processing module (5) sets the constant current value of the adjustable constant current module (4) to be minimum; the comprehensive processing module (5) sends a test message to the master M-BUS communication module to be tested, synchronously receives the communication message received by the slave M-BUS communication module to be tested, compares the received test message with the received test message, sends a response message to the slave M-BUS communication module to be tested if the comparison is correct, and ends the test flow if the comparison is not correct; the comprehensive processing module (5) synchronously receives the response messages received by the main M-BUS communication module to be tested, the comprehensive processing module (5) compares the response messages, if the comparison is consistent, the adjustable constant current module (4) is arranged, the constant current value is increased, the test process is repeated, if the comparison is wrong, the test process is ended, the loading capacity data of the main M-BUS communication module to be tested are obtained, and meanwhile, the load adaptability of the main M-BUS communication module to be tested is verified.
On the basis of a constructed M-BUS basic test BUS, functional modules such as a voltage differential sampling module, a current differential sampling module, a double-channel high-speed sampling module, an adjustable constant current module, a comprehensive processing module and the like are added. The detection module is comprehensively applied, and a test flow of the passing number, the blank number voltage and the signal edge time is designed; a test flow of mark and space current and signal edge time; and testing the loading capacity and the load adaptability of the host. The BUS environment is tested by constructing the M-BUS, a communication process of master and slave M-BUS equipment is initiated, the voltage and current detection of the passing number and the blank number is carried out, the magnitude of the constant current load is adjusted, and the strength of the BUS load is simulated. The voltage, the current, the BUS loading capacity and the signal quality under different loads of the M-BUS communication equipment are comprehensively detected, and comprehensive quantitative detection of the electrical parameters of the M-BUS communication interface is realized.
In conclusion, the comprehensive detection method for the electrical performance of the M-BUS communication interface is designed, the electrical performance of the interface of the M-BUS communication equipment can be comprehensively detected, the performance of the communication module can be objectively and comprehensively evaluated quantitatively, and the healthy and ordered development of the M-BUS communication mode is facilitated.
Drawings
The following detailed description of embodiments of the invention is provided in conjunction with the appended drawings:
FIG. 1 is a block diagram of the overall circuit configuration of the present invention;
in the figure: the device comprises a voltage differential sampling module, a current differential sampling module, a double-channel high-speed sampling module, a current adjustable constant current module and a comprehensive processing module, wherein the voltage differential sampling module is 1, the current differential sampling module is 2, the double-channel high-speed sampling module is 3, the adjustable constant current module is 4, and the comprehensive processing module is 5.
Detailed Description
Referring to the attached drawings, the method for detecting the electrical performance of the M-BUS communication interface comprises a voltage differential sampling module 1, a current differential sampling module 2, a double-channel high-speed sampling module 3, an adjustable constant current module 4 and a comprehensive processing module 5. The voltage differential sampling module 1 is used for sampling M + and M-differential voltage signals in an M-BUS communication interface, converting the differential signals into single-ended voltage signals, and sending the single-ended voltage signals into the double-channel high-speed sampling module 3 for high-speed sampling. The current differential sampling module 2 is used for sampling current on the M-BUS communication interface, converting a current signal into a voltage signal and then sending the voltage signal into the double-channel high-speed sampling module 3 for high-speed sampling; the double-channel high-speed sampling module 3 is used for sampling voltage and current signals and sending the voltage and current signals to the subsequent comprehensive processing module 5 for digital processing. The comprehensive processing module 5 acquires the quantized data of the voltage and the current, detects the rising and falling edge time of the communication signal at the same time, and judges the promotion space of the communication rate of the M-BUS communication module according to the signal edge time; the comprehensive processing module 5 can send a constant current value of the adjustable constant current module, simulate different load conditions of M-BUS communication by adjusting constant current data, dynamically control the magnitude of the constant current value by the comprehensive processing module 5 according to test requirements, and test the maximum current driving capability of the tested main M-BUS module and the communication performance change of the tested main M-BUS module under different loads by adjusting the constant current load value; and transmitting and receiving test messages of the M-BUS communication module to be tested, comparing the transmitted and received messages, and triggering the next test process according to the comparison result of the messages. The adjustable constant current module 4 is used for virtual load of M-BUS communication, the magnitude of a constant current value of the adjustable constant current module is controlled by the comprehensive processing module 5 according to test requirements, and the driving capability of the main module of the M-BUS to be tested and communication performance change of the main module of the M-BUS to be tested under different loads are tested by adjusting the constant current load value.
The testing method designs three testing processes, and flexibly configures and applies the voltage differential sampling module 1, the current differential sampling module 2, the dual-channel high-speed sampling module 3, the adjustable constant current module 4 and the comprehensive processing module 5. The testing process of the mark, the blank voltage and the signal edge time is realized; a test flow of mark and space current and signal edge time; and (3) a host loading capability and load adaptability test flow.
The test process of mark, space voltage and signal edge time is as follows: the comprehensive processing module 5 sends a test message to a main M-BUS communication module to be tested, and an M-BUS voltage signal enters the dual-channel high-speed sampling module 3 after passing through the overvoltage differential sampling module 1; the comprehensive processing module 5 continuously reads the digital quantization data of the dual-communication high-speed sampling module 3 until the transmission process is finished, synchronously receives the communication message to be detected from the M-BUS communication module, after the reception is finished, the comprehensive processing module 5 calculates the pass voltage and the blank voltage, calculates the rising and falling edge time during the conversion of the pass signal and the blank signal, judges the consistency of the message receiving and sending, and obtains the conclusion whether the communication function is normal and the data of the pass voltage, the blank voltage and the signal edge time in the communication process.
The test process of mark, space current and signal edge time is as follows: the comprehensive processing module 5 sends a test message to the master M-BUS communication module to be tested, and sends a response message to the slave M-BUS communication module to be tested after receiving the communication message of the slave M-BUS communication module to be tested; the M-BUS BUS current signal enters a double-channel high-speed sampling module 3 after passing through a current differential sampling module 2; the comprehensive processing module 5 continuously reads the digital quantization data of the dual-communication high-speed sampling module 3 until the transmission process of the response message is finished, synchronously receives the response message received by the main M-BUS communication module to be tested, and after the reception is finished, the comprehensive processing module 5 calculates the number passing current and the null current and calculates the rising and falling edge time during the conversion of the number passing and the null signal, judges the consistency of the received and sent response message, and obtains the conclusion whether the communication function is normal and the data of the number passing current, the null current and the signal edge time in the communication process.
The testing process of the loading capacity and the load adaptability of the host machine comprises the following steps: the comprehensive processing module 5 sets the constant current value of the adjustable constant current module 4 to be minimum; the comprehensive processing module 5 sends a test message to the master M-BUS communication module to be tested, synchronously receives the communication message received by the slave M-BUS communication module to be tested, compares the received test message with the received test message, sends a response message to the slave M-BUS communication module to be tested if the comparison is correct, and otherwise ends the test flow; the comprehensive processing module 5 synchronously receives the response messages received by the main M-BUS communication module to be tested, the comprehensive processing module 5 compares the response messages, if the comparison is consistent, the adjustable constant current module 4 is arranged, the constant current value is increased, the test process is repeated, if the comparison is wrong, the test process is ended, the load capacity data of the main M-BUS communication module to be tested is obtained, and meanwhile, the load adaptability of the main M-BUS communication module to be tested is verified.
On the basis of a constructed M-BUS basic test BUS, functional modules such as a voltage differential sampling module, a current differential sampling module, a double-channel high-speed sampling module, an adjustable constant current module, a comprehensive processing module and the like are added. The detection module is comprehensively applied, and a test flow of the passing number, the blank number voltage and the signal edge time is designed; a test flow of mark and space current and signal edge time; and testing the loading capacity and the load adaptability of the host. The BUS environment is tested by constructing the M-BUS, a communication process of master and slave M-BUS equipment is initiated, the voltage and current detection of the passing number and the blank number is carried out, the magnitude of the constant current load is adjusted, and the strength of the BUS load is simulated. The voltage, the current, the BUS loading capacity and the signal quality under different loads of the M-BUS communication equipment are comprehensively detected, and comprehensive quantitative detection of the electrical parameters of the M-BUS communication interface is realized.
In conclusion, the comprehensive detection method for the electrical performance of the M-BUS communication interface is designed, the electrical performance of the interface of the M-BUS communication equipment can be comprehensively detected, the performance of the communication module can be objectively and comprehensively evaluated quantitatively, and the healthy and ordered development of the M-BUS communication mode is facilitated.