A multifunctional test method and circuit for CAN bus

By using multifunctional testing methods and circuits in CAN bus testing, and using processors, electronic switches and controllers to achieve automatic matching and connection, the problems of inaccurate test results and low efficiency in the prior art are solved, and efficient and accurate CAN bus functional testing is achieved.

CN119788563APending Publication Date: 2025-04-08SAIC GM WULING AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411987066.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

When performing functional testing of the CAN bus, it is difficult to obtain the test results accurately, and it is impossible to conduct comprehensive testing. Manually setting the connection circuit wiring harness is inefficient and inaccurate.

Method used

A multifunctional testing method and circuit of CAN bus is adopted to obtain multifunctional testing results by receiving target testing instructions, matching functional testing tools, and automatically connecting to the test channel. The method includes a processor, electronic switch and controller, which utilizes these components to achieve automatic matching and connection of the functional test tool with the CAN bus.

Benefits of technology

It improves the efficiency and accuracy of CAN bus testing, can comprehensively test the functions of the CAN bus, and reduces the complexity and error rate of manual operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788563A_ABST
    Figure CN119788563A_ABST
Patent Text Reader

Abstract

The present invention discloses a multifunctional testing method and circuit for a CAN bus, which are applied to a CAN bus testing device including a plurality of different functional testing tools; wherein the multifunctional testing method comprises: receiving a target testing instruction for a CAN bus to be tested, so as to determine a current function to be tested of the CAN bus to be tested; matching a functional testing tool corresponding to the current function to be tested, and connecting the functional testing tool with a test channel of the CAN bus to be tested; based on the test channel and the functional testing tool, obtaining a multifunctional testing result of the CAN bus, so as to improve the efficiency of the CAN bus test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of CAN testing, and in particular to a multifunctional testing method and circuit for a CAN bus. Background Art

[0002] CAN bus is a field serial communication protocol for data transmission and control, which can realize interactive communication between multiple devices. Due to its high reliability, strong anti-interference ability and real-time performance, it has been widely used in industrial sites, aviation and ship electronics and other fields.

[0003] With the widespread application of CAN bus, functional testing of CAN bus has become an important research direction in various fields. In the prior art, when performing functional testing on CAN bus, test messages are often sent to CAN bus, and then various functions of the CAN bus are tested according to the message data fed back by the CAN bus. However, due to the powerful functions of CAN bus and the numerous registers set inside it, the message data fed back is relatively complex, making it difficult to accurately obtain the corresponding test results. Moreover, the method of testing using messages cannot comprehensively perform functional testing on CAN bus, and cannot observe the real working status.

[0004] In order to solve the difficulties in testing using messages, the prior art began to test the CAN bus with the help of external circuit devices with different functional testing capabilities. In the process of controlling the external circuit device to perform functional testing on the CAN bus, the connection between the CAN bus and the external circuit device is often manually set, which not only requires manual replacement of the connection circuit harness, resulting in low test efficiency, but also is limited by the user's professional knowledge and cannot guarantee the accuracy of the connection between the CAN bus and the external circuit device. Summary of the invention

[0005] In order to solve the above technical problems, the present invention discloses a multifunctional testing method and circuit for a CAN bus, which are used to improve the testing efficiency.

[0006] In order to achieve the above object, the present invention discloses a multifunctional testing method of a CAN bus, which is applied to a CAN bus testing device including a plurality of different functional testing tools; wherein the multifunctional testing method comprises:

[0007] Receiving a target test instruction for the CAN bus to be tested to determine a current function to be tested of the CAN bus to be tested;

[0008] Matching the functional test tool corresponding to the current function to be tested, and connecting the functional test tool with the test channel of the CAN bus to be tested;

[0009] Based on the test channel and the functional test tooling, a multifunctional test result of the CAN bus is obtained.

[0010] The present invention discloses a multifunctional test method for a CAN bus, which first parses the received target test instruction for the CAN bus to be tested to identify the current function to be tested of the CAN bus, and then matches the functional test tool corresponding to the CAN bus according to the identified current function to be tested, so as to ensure that the CAN bus is accurately tested using the test tool. After matching the accurate test tool, the test tool is connected to the test channel of the CAN bus, so that the test tool automatically tests the corresponding function of the CAN bus according to the test channel, thereby improving the test efficiency.

[0011] As a preferred example, the step of connecting the functional test fixture to the test channel of the CAN bus to be tested includes:

[0012] Acquire a plurality of first channels when the functional testing tool performs a functional test on the CAN bus to be tested;

[0013] Obtaining a first test function corresponding to each of the first channels;

[0014] When the first test function is consistent with the current function to be tested, a first channel for implementing the first test function is connected.

[0015] In the above scheme, multiple functions can be tested by setting a functional test tool, thereby improving the efficiency of using the functional test tool to perform functional tests. When controlling the functional test tool to perform functional tests on the CAN bus, by matching the test channels used by the functional test tool to perform different functional tests on the CAN bus, it is ensured that the test tool can accurately test the corresponding functions of the CAN bus according to the connected channels.

[0016] On the other hand, the present invention discloses a CAN bus multifunctional test circuit, which is applied to a CAN bus test device including a plurality of different functional test fixtures; wherein the multifunctional test circuit includes a processor, an electronic switch and a controller;

[0017] Wherein, the input end of the electronic switch is connected to the output end of the functional test fixture; the output end of the electronic switch is connected to the input end of the CAN bus to be tested;

[0018] The output end of the processor is connected to the driving end of the electronic switch, and is used to receive a target test instruction for the CAN bus to be tested, so as to determine the current function to be tested of the CAN bus to be tested; match the functional test tooling corresponding to the current function to be tested, and drive the electronic switch to close, so as to connect the test channel between the functional test tooling and the CAN bus to be tested;

[0019] The controller is connected to the CAN bus signal to be tested so as to obtain a multifunctional test result of the CAN bus to be tested based on the test channel and the functional test tool.

[0020] The present invention discloses a CAN bus multifunctional test circuit, which first sets a processor for receiving target test instructions sent from the outside to realize automatic matching of a functional test tool with a CAN bus, thereby improving the efficiency of connecting the test tool with the CAN bus. Furthermore, in the process of connecting the CAN bus with the test tool, an electronic switch is set to connect the CAN bus with the test tool, and the electronic switch is set to be driven by the processor, thereby realizing automatic connection between the CAN bus and the test tool, thereby improving the efficiency of the test tool in testing the CAN bus. Finally, a controller is used to connect the CAN bus signal to be tested to automatically obtain the test result after the test tool tests the CAN bus, thereby improving the efficiency of the test.

[0021] As a preferred example, it also includes a torsion switch; wherein the input end of the torsion switch is connected to the output end of the functional test tooling; and the output end of the torsion switch is connected to the input end of the CAN bus to be tested.

[0022] In the above scheme, a torsion switch is additionally provided between the output end of each functional test fixture and the input end of the CAN bus to be tested, so that the connection between the test fixture and the CAN bus can be achieved by manual control, so as to accommodate more test operations and improve the applicability of the circuit.

[0023] As a preferred example, the electronic switch includes a first relay, a second relay, a third relay and a fourth relay;

[0024] Wherein, the output end of the first relay is connected to the high level signal end of the CAN bus to be tested;

[0025] The output end of the second relay is connected to the low level signal end of the CAN bus to be tested;

[0026] The output end of the third relay is connected to the ground end of the CAN bus to be tested;

[0027] The output end of the fourth relay is connected to the power supply end of the CAN bus to be tested.

[0028] In the above scheme, a relay is set to receive the drive of the processor to realize the automatic connection between the test tool and the CAN bus, thereby improving the efficiency of the test. Furthermore, each relay is set to connect to different ends of the CAN bus respectively, so that different functions of the CAN bus can be tested by driving different relays to close, thereby improving the comprehensiveness of the test.

[0029] As a preferred example, when the functional test tool is used to perform a terminal resistance test on the CAN bus to be tested or a capacitive load test on the CAN bus to be tested, the first output end of the functional test tool is connected to the input end of the first relay;

[0030] The second output end of the functional testing tool is connected to the input end of the second relay;

[0031] The third output terminal of the functional testing tool is connected to the input terminal of the third relay.

[0032] In the above scheme, the function of the test fixture to test the CAN bus is identified, and the same relay in the circuit is called up to realize the connection between different test fixtures and the CAN bus, so as to reduce the complexity of the connection between the CAN bus and the test fixture, thereby improving the efficiency of the connection between the CAN bus and the test fixture, thereby improving the efficiency of the test.

[0033] As a preferred example, when the functional test tool is used to perform a hidden state test on the CAN bus to be tested or a fault management test on the CAN bus to be tested, the first output end of the functional test tool is connected to the input end of the first relay;

[0034] The second output end of the functional testing tool is connected to the input end of the second relay;

[0035] The third output terminal of the functional testing tool is connected to the input terminal of the third relay;

[0036] The fourth output terminal of the functional testing tool is connected to the input terminal of the fourth relay.

[0037] Similarly, the above scheme not only reduces the complexity of the connection between the CAN bus and the test tooling, thereby improving the efficiency of the connection between the CAN bus and the test tooling, and thus improving the efficiency of the test, but also matches different relays for test tools with different functional tests to ensure that the test tooling can achieve accurate testing of the corresponding function through the closure of the relay.

[0038] As a preferred example, it also includes a power supply; wherein the negative pole of the power supply is connected to the output end of the third relay; and the positive pole of the power supply is connected to the output end of the fourth relay.

[0039] In the above scheme, a power supply is arranged in the circuit to provide power for the CAN bus test, thereby ensuring the normal progress of the test.

[0040] As a preferred example, a fifth relay is further included; wherein the input end of the fifth relay is connected to the positive pole of the power supply; and the output end of the fifth relay is connected to the ignition signal end of the CAN bus to be tested.

[0041] In the above scheme, the fifth relay is arranged to connect the power supply and the ignition signal terminal of the CAN bus to be tested, so as to perform a power management test on the CAN bus and improve the comprehensiveness of the test.

[0042] As a preferred example, the low-level signal terminal and the high-level signal input terminal of the CAN bus to be tested are respectively connected to the signal input terminal of the controller, so that the controller obtains the multifunctional test result of the CAN bus to be tested.

[0043] In the above scheme, the controller is connected to the low-level signal terminal and the high-level signal input terminal of the CAN bus to be tested by signal connection, so that when the test tool tests the CAN bus according to the connected test channel, the test result of the CAN bus is obtained in time and automatically, so as to improve the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 : A flowchart of a multifunctional testing method for a CAN bus disclosed in an embodiment of the present invention;

[0045] Figure 2 : A schematic diagram of the structure of a multifunctional test circuit of a CAN bus disclosed in an embodiment of the present invention;

[0046] Figure 3 : A structural schematic diagram of a multifunctional test circuit of a CAN bus disclosed in another embodiment of the present invention;

[0047] Figure 4 : A circuit connection diagram of an external test device and a multifunctional test circuit disclosed in another embodiment of the present invention;

[0048] Figure 5 : is an IO control circuit diagram of a maximum capacitance load circuit disclosed in another embodiment of the present invention;

[0049] Figure 6: A structural schematic diagram of a multifunctional test circuit for a CAN bus disclosed in yet another embodiment of the present invention;

[0050] Figure 7 : A schematic structural diagram of another multifunctional test circuit for a CAN bus disclosed in yet another embodiment of the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.

[0052] Embodiment 1

[0053] This embodiment discloses a multifunctional test method for a CAN bus, which is applied to a CAN bus test device including several different functional test tools to improve the test efficiency of the CAN bus. Figure 1 , mainly including:

[0054] Step 101: Receive a target test instruction for a CAN bus to be tested, so as to determine a current function to be tested of the CAN bus to be tested.

[0055] Step 102: matching the functional test tool corresponding to the current function to be tested, and connecting the functional test tool with the test channel of the CAN bus to be tested;

[0056] Step 103: Based on the test channel and the functional test tooling, obtain a multifunctional test result of the CAN bus.

[0057] In the disclosed embodiment, when a multi-function test is performed on a CAN bus to be tested, firstly, several different functional test fixtures that currently establish communication connections with the CAN bus to be tested are obtained; wherein, the functional test fixture is an external circuit device that performs functional testing on the CAN bus to be tested, and it sends test data to the CAN bus to be tested through the communication connection, so that the CAN bus performs corresponding processing according to the test data, and feeds back the data generated after the corresponding processing to the outside world, so that the outside world can obtain the functional test result of the CAN bus according to the generated data.

[0058] Preferably, in some implementations of this embodiment, after matching a number of corresponding functional test fixtures according to a number of functions that can be realized by the CAN bus, in order to realize one-to-one precise control of the function to be tested by the functional test fixture, each functional test fixture can be connected to the test channel of the CAN bus, and then the precise test of the CAN bus by the test fixture can be realized based on the test channel. Specifically, in the process of connecting the functional test fixture to the test channel of the CAN bus to be tested, step 102 can realize the connection of the corresponding test channel through the following steps:

[0059] Step 1021: obtaining a plurality of first channels when the functional testing tool performs a functional test on the CAN bus to be tested;

[0060] Step 1022: Obtain a first test function corresponding to each of the first channels;

[0061] Step 1023: When the first test function is consistent with the current function to be tested, connecting a first channel for implementing the first test function.

[0062] In some implementations of this embodiment, the steps 1021 to 1023 can perform multiple function tests by setting a functional test tool, thereby improving the efficiency of using the functional test tool to perform functional tests. When controlling the functional test tool to perform functional tests on the CAN bus, by matching the test channels used by the functional test tool to perform different functional tests on the CAN bus, it is ensured that the test tool can accurately test the corresponding functions of the CAN bus according to the connected channels.

[0063] On the other hand, the present embodiment also discloses a CAN bus multifunctional test circuit, which is applied to a CAN bus test device including a plurality of different functional test fixtures to improve the test efficiency of the CAN bus; wherein, the specific structure of the multifunctional test circuit is shown in FIG. Figure 2 , including a processor 201, an electronic switch 202 and a controller 203.

[0064] like Figure 2 As shown, the input end of the electronic switch 202 is connected to the output end of the functional test fixture; the output end of the electronic switch 202 is connected to the input end of the CAN bus to be tested;

[0065] The output end of the processor 201 is connected to the driving end of the electronic switch 202, and is used to receive a target test instruction for the CAN bus to be tested, so as to determine the current function to be tested of the CAN bus to be tested; match the functional test tooling corresponding to the current function to be tested, and drive the electronic switch 202 to close, so as to connect the test channel between the functional test tooling and the CAN bus to be tested;

[0066] The controller 203 is connected to the CAN bus signal to be tested, so as to obtain a multi-function test result of the CAN bus to be tested based on the test channel and the functional test tool.

[0067] In the disclosed embodiment, the CAN bus multifunctional test circuit is provided with a processor 201 for receiving target test instructions sent from the outside, so as to realize automatic matching between the functional test fixture and the CAN bus, thereby improving the efficiency of connecting the test fixture to the CAN bus. Furthermore, in the process of connecting the CAN bus and the test fixture, an electronic switch 202 is provided to connect the CAN bus and the test fixture, and the electronic switch 202 is provided to be driven by the processor 201, thereby realizing automatic connection between the CAN bus and the test fixture, thereby improving the efficiency of the test fixture in testing the CAN bus. Finally, the controller 203 is used to connect with the CAN bus signal to be tested, so as to automatically obtain the test results after the test fixture tests the CAN bus, thereby improving the efficiency of the test.

[0068] In certain implementations of this embodiment, in the process of automatically connecting the functional test tooling with the CAN bus to be tested based on the processor 201 driving the electronic switch 202, in order to avoid the inability to connect the functional test tooling with the CAN bus to be tested due to damage to the electronic switch 202 and to provide more optional connection operations for the functional test tooling with the CAN bus to be tested according to current test requirements, a toggle switch may be optionally provided in the CAN bus multifunctional test circuit;

[0069] Among them, the input end of the torsion switch is connected to the output end of the functional test tooling; the output end of the torsion switch is connected to the input end of the CAN bus to be tested, so that the test tooling and the CAN bus can be manually connected by controlling the closing of the torsion switch, thereby using more test operations to improve the applicability of the circuit.

[0070] In certain implementations of this embodiment, in order to enable the functional testing tool to automatically test the CAN bus to be tested based on the electronic switch 202, the electronic switch 202 is set as a relay, and the processor 201 is used to drive the relay to close to achieve automatic connection between the functional testing tool and the CAN bus to be tested.

[0071] Furthermore, since different functional test tools use the relays to perform different functional tests on the CAN bus to be tested, in order to implement different functional tests on the CAN bus to be tested, in some implementations of this embodiment, different relays may be set to connect different ends of the CAN bus to be tested, so as to perform different functional tests on the CAN bus to be tested through different ends of the CAN bus. Specifically, the electronic switch 202 may be set to include a first relay, a second relay, a third relay, and a fourth relay.

[0072] Among them, the output end of the first relay is connected to the high-level signal end of the CAN bus to be tested; the output end of the second relay is connected to the low-level signal end of the CAN bus to be tested; the output end of the third relay is connected to the ground end of the CAN bus to be tested; the output end of the fourth relay is connected to the power supply end of the CAN bus to be tested, and then by setting each relay to be connected to different ends of the CAN bus respectively, by driving different relays to close, different functions of the CAN bus can be tested, thereby improving the comprehensiveness of the test.

[0073] Furthermore, after different relays are set to connect different ends of the CAN bus to be tested, in order to enable different functional test tools to perform different functional tests on the CAN bus to be tested through the relays, different relays can be allocated to the functional test tool according to the test functions that the functional test tool can achieve. Specifically, when the functional test tool is used to perform a terminal resistance test on the CAN bus to be tested or a capacitive load test on the CAN bus to be tested, the first output end of the functional test tool is connected to the input end of the first relay; the second output end of the functional test tool is connected to the input end of the second relay; and the third output end of the functional test tool is connected to the input end of the third relay.

[0074] When the functional testing tool is used to perform a hidden state test on the CAN bus to be tested or a fault management test on the CAN bus to be tested, the first output end of the functional testing tool is connected to the input end of the first relay; the second output end of the functional testing tool is connected to the input end of the second relay; the third output end of the functional testing tool is connected to the input end of the third relay; and the fourth output end of the functional testing tool is connected to the input end of the fourth relay.

[0075] In the above scheme, some implementations of this embodiment recognize the function of the test fixture to test the CAN bus, call the same relay in the circuit to achieve the connection between different test fixtures and the CAN bus, so as to reduce the complexity of the connection between the CAN bus and the test fixture, thereby improving the efficiency of the connection between the CAN bus and the test fixture, thereby improving the efficiency of the test. At the same time, different relays are matched for test fixtures with different functional tests to ensure that the test fixture can achieve accurate testing of the corresponding function through the closure of the relay.

[0076] In some implementations of this embodiment, a power supply may be provided in the circuit to provide power for the CAN bus test to ensure the normal conduct of the test. Specifically, a power supply is provided, the negative electrode of the power supply is connected to the output end of the third relay; and the positive electrode of the power supply is connected to the output end of the fourth relay.

[0077] In some implementations of this embodiment, after the power supply is set, a fifth relay may be further set in the multifunctional test circuit; wherein the input end of the fifth relay is connected to the positive pole of the power supply; and the output end of the fifth relay is connected to the ignition signal end of the CAN bus to be tested. In the above scheme, by setting the fifth relay to connect the power supply and the ignition signal end of the CAN bus to be tested, the power management test of the CAN bus is performed, thereby improving the comprehensiveness of the test.

[0078] In certain implementations of the present embodiment, in order to obtain the test results of the CAN bus to be tested, the low-level signal end and the high-level signal input end of the CAN bus to be tested are respectively connected to the signal input end of the controller 203, so that the controller obtains the multi-functional test results of the CAN bus to be tested, and when the test tool tests the CAN bus according to the connected test channel, the test results of the CAN bus are obtained in a timely and automatic manner, thereby improving the test efficiency.

[0079] Embodiment 2

[0080] When the prior art uses external test equipment to test the CAN bus, it mainly uses a single integrated control board or a single manual control circuit board to control the external test equipment. The single use of an integrated control board lacks flexibility and often requires the use of integrated cabinet equipment and professional test software, which is not universally applicable; and when testing batch cases, the use of a single manual control circuit requires repeated connection of circuit harnesses, addition and subtraction of loads, etc., resulting in low test efficiency and poor timing control accuracy.

[0081] In order to solve the above technical problems, this embodiment provides a multifunctional test circuit, which provides two control modes: fully automatic control and manual control. When controlling the external test equipment to perform multifunctional tests on the CAN bus to be tested, not only can manual control be used to achieve multiple combined operations and flexible control, but also automatic control can be used for precise and efficient control. In addition, manual and automatic control can be combined to achieve more test operations and verify complex problems. Among them, the external test equipment has several different functional test circuits; each of the functional test circuits can test different functions of the CAN bus to be tested.

[0082] Specifically, in some implementations of this embodiment, the specific structure of the CAN bus multi-function test circuit can be found in Figure 3 , including a single chip processing system 301, a relay switch 302, a torsion switch 303, a test result analyzer 304 and a DC power supply 305.

[0083] like Figure 3 As shown, the input end of the relay switch 302 is connected to the output end of the functional test circuit; the output end of the relay switch 302 is connected to the input end of the CAN bus to be tested.

[0084] The input end of the toggle switch 303 is connected to the output end of the functional test circuit; the output end of the toggle switch 303 is connected to the input end of the CAN bus to be tested.

[0085] The output end of the single-chip processing system 301 is connected to the driving end of the relay switch 302, and is used to receive a target test instruction for the CAN bus to be tested, so as to determine the current function to be tested of the CAN bus to be tested; match the functional test single path corresponding to the current function to be tested, and drive the relay switch 302 to close, so as to connect the functional test circuit and the test channel of the CAN bus to be tested;

[0086] The test result analyzer 304 is connected to the CAN bus signal to be tested, so as to obtain a multi-function test result of the CAN bus to be tested based on the test channel and the functional test circuit.

[0087] The negative electrode and the positive electrode of the DC power supply 305 are respectively connected to the CAN bus to be tested through the single chip processing system 301 and the test result analyzer 304 to provide power.

[0088] Reference Figure 3In the multifunctional test circuit of the CAN bus shown, the single-chip processing system 301 can be connected to a computer or host computer for testing via USB, etc., to receive the GPIO instructions sent by the computer or host computer via the serial port, and then determine the corresponding test function in the GPIO instruction according to the pre-written test case program, and match the functional test circuit corresponding to the test function, and then drive its own IO port to work, so as to drive the relay switch 302 connecting the functional test circuit and the CAN bus to be tested to close or close, so as to realize the corresponding functional test. Furthermore, when performing the multifunctional test of the CAN bus, the toggle switch 303 can be used for manual operation control, and the single-chip processing system 301 can also drive the relay switch 302 for automatic control.

[0089] Specifically, in some implementations of this embodiment, first, according to the multifunctional test requirements of the CAN bus to be tested, an external test device capable of implementing different functional tests is matched for the CAN bus to be tested. In a certain implementation, assuming that the CAN bus to be tested needs to perform a recessive state test, a fault management test, a maximum / minimum terminal resistance test, and a maximum / minimum capacitance load test, then the external test device matched to perform a multifunctional test on the CAN bus to be tested needs to have a first terminal resistance circuit and a second terminal resistance circuit capable of performing a maximum / minimum terminal resistance test, a maximum capacitance load circuit and a minimum capacitance load circuit capable of performing a maximum / minimum capacitance load test, a recessive state test control circuit capable of performing a recessive state test, and a fault management test control circuit capable of performing a fault management test.

[0090] Further, taking the external test equipment selected in the above embodiment as an example, according to Figure 3 The CAN bus multifunctional test circuit shown in the figure connects the external test device and the CAN bus to be tested, and the circuit connection between the CAN bus, the CAN bus multifunctional test circuit and the external test device can be as follows: Figure 4 shown.

[0091] Specifically, refer to Figure 4 , the relay switch 302 includes a first relay 3021, a second relay 3022, a third relay 3023 and a fourth relay 3024. The output end of the first relay 3021 is connected to the CAN-H end of the CAN bus to be tested, i.e., the high level signal end; the output end of the second relay 3022 is connected to the CAN-L end of the CAN bus to be tested, i.e., the low level signal end; the output end of the third relay 3023 is connected to the GND end of the CAN bus to be tested, i.e., the ground end; the output end of the fourth relay 3024 is connected to the KL30 end of the CAN bus to be tested, i.e., the power supply end.

[0092] Further, refer to Figure 4 The external test equipment includes a first terminal resistance circuit 401 and a second terminal resistance circuit 402 for adding and subtracting maximum / minimum terminal resistance tests on the CAN bus to be tested, a maximum capacitance load circuit 403 and a minimum capacitance load circuit 404 capable of adding and subtracting maximum / minimum capacitance load tests, a recessive state test control circuit 405 capable of performing a recessive state test, and a fault management test control circuit 406 capable of performing a fault management test.

[0093] Reference Figure 4 , the first output end of the first terminal resistance circuit 401 and the second terminal resistance circuit 402 is connected to the input end of the first relay 3021, so as to connect the CAN-H end of the CAN bus to be tested through the first relay 3021; ​​the second output end of the first terminal resistance circuit 401 and the second terminal resistance circuit 402 is connected to the input end of the second relay 3022, so as to connect the CAN-L end of the CAN bus to be tested through the second relay 3022; the third output end of the first terminal resistance circuit 401 and the second terminal resistance circuit 402 is connected to the input end of the third relay 3023, so as to connect the GND end of the CAN bus to be tested through the third relay 3023.

[0094] Reference Figure 4 , the first output end of the maximum capacitive load circuit 403 and the minimum capacitive load circuit 404 is connected to the input end of the first relay 3021, so as to connect the CAN-H end of the CAN bus to be tested through the first relay 3021; ​​the second output end of the maximum capacitive load circuit 403 and the minimum capacitive load circuit 404 is connected to the input end of the second relay 3022, so as to connect the CAN-L end of the CAN bus to be tested through the second relay 3022; the third output end of the maximum capacitive load circuit 403 and the minimum capacitive load circuit 404 is connected to the input end of the third relay 3023, so as to connect the GND end of the CAN bus to be tested through the third relay 3023.

[0095] Reference Figure 4, the first output end of the recessive state test control circuit 405 and the fault management test control circuit 406 is connected to the input end of the first relay 3021, so as to connect the CAN-H end of the CAN bus to be tested through the first relay 3021; ​​the second output end of the recessive state test control circuit 405 and the fault management test control circuit 406 is connected to the input end of the second relay 3022, so as to connect the CAN-L end of the CAN bus to be tested through the second relay 3022; the third output end of the recessive state test control circuit 405 and the fault management test control circuit 406 is connected to the input end of the third relay 3023, so as to connect the GND end of the CAN bus to be tested through the third relay 3023; the fourth output end of the recessive state test control circuit 405 and the fault management test control circuit 406 is connected to the input end of the fourth relay 3024, so as to connect the KL30 end of the CAN bus to be tested through the fourth relay 3024.

[0096] like Figure 4 The connection between the functional test circuit and the CAN bus to be tested is selectively connected to the relay switch 302 according to the test case during the CAN bus test. The access mode can be connected not only through the relay, but also through manual operation. Specifically, the toggle switch 303 is switched to achieve the connection or disconnection or combination operation of the circuit required for the test.

[0097] In one implementation of this embodiment, refer to Figure 4 The functional test circuit and the relay switch 302 provided are driven by the IO port of the single-chip processing system 301 to realize the functional test of the CAN bus by each functional test circuit. Taking the maximum capacitance load circuit 403 as an example, the control circuit when the IO port controls the maximum capacitance load circuit 403 to perform the functional test on the CAN bus is provided as follows Figure 5 shown.

[0098] Reference Figure 5 , the maximum capacitive load includes a first capacitor C11, a second capacitor C12, and a third capacitor C13. The first end of the first capacitor C11 is respectively connected to the first end of the second capacitor C12 and the input end of the first relay 3021; ​​the second end of the first capacitor C11 is respectively connected to the first end of the third capacitor C13 and the input end of the second relay 3022; the second end of the second capacitor C12 is connected to the second end of the third capacitor C13 and is grounded. The IO port of the single-chip processing system 301 is connected to the driving ends of the first relay 3021 and the second relay 3022 through a resistor R21, a transistor Q17, and a diode D2 in sequence.

[0099] Furthermore, when the functional test circuit tests the CAN bus, the relationship between the serial port command received by the single-chip processing system 301, the state of the IO port of the single-chip processing system 301 and the function that can be tested on the CAN bus to be tested is shown in the following table:

[0100]

[0101]

[0102]

[0103] Refer to the above table and Figure 4 It can be seen from the circuit connection diagram shown that the functions of the functional test circuit for testing the CAN bus to be tested include the test of adding and subtracting terminal resistance, the test of adding and subtracting maximum / minimum capacitive load in the CAN physical layer test, the implicit voltage test, the implicit internal resistance test, the CAN_H short-circuit test to the power supply, the CAN_L short-circuit test to the power supply, the CAN_H short-circuit test to the ground, the CAN_L short-circuit test to the ground, the CAN_H and CAN_L short-circuit test to the power supply at the same time, the CAN_H and CAN_L short-circuit test to the ground at the same time, and the CAN_H short-circuit test to CAN_L.

[0104] Further, refer to Figure 4 The circuit connection structure diagram of each functional test circuit in the circuit is used to perform a functional test on the CAN bus to be tested through the relay switch 302. Figure 3 As can be seen from the DC power supply 305 included in the CAN bus multifunctional test circuit shown in the figure, a fifth relay 3025, a sixth relay 3026 and a seventh relay 3027 can also be set in the relay switch 302. Among them, the connection structure diagram of the fifth relay 3025, the sixth relay 3026 and the seventh relay 3027 with the DC power supply 305 and the CAN bus to be tested can be shown as follows Figure 6 and Figure 7 shown.

[0105] Reference Figure 6 and Figure 7 ,like Figure 6 As shown, the input end of the sixth relay 3026 is connected to the negative electrode of the DC power supply 305, and the output end of the sixth relay 3026 is connected to the GND end of the CAN bus to be tested; the input end of the seventh relay 3027 is connected to the positive electrode of the DC power supply 305, and the output end of the seventh relay 3027 is connected to the K30 end of the CAN bus to be tested. The input end of the fifth relay 3025 is connected to the output end of the seventh relay 3027, and the output end of the fifth relay 3025 is connected to the KL15 end of the CAN bus to be tested, i.e., the ignition signal end.

[0106] like Figure 7 As shown, the terminal resistance, maximum capacitive load, and minimum capacitive load are respectively connected to the CAN-H terminal, CAN-L terminal, and GND terminal of the CAN bus through different relay switches; the invisible state test control circuit and the fault management test control circuit are respectively connected to the CAN-H terminal, CAN-L terminal, GND terminal, and KL30 terminal of the CAN bus through different relay switches. Furthermore, the GND terminal of the DC power supply is connected to the GND terminal of the CAN bus, and the positive pole of the DC power supply, i.e., the BAT terminal, is connected to the KL30 terminal of the CAN bus. The single-chip minimum system is respectively connected to the driving end of each relay switch to send instructions through the IO port to control the relay to open or close.

[0107] Reference Figure 6 and Figure 7 The circuit structure shown can realize the management test of the power supply of the CAN bus, including: power disconnection test, ground disconnection test, KL15 power wake-up test and KL30 power-on initialization.

[0108] In certain implementations of this embodiment, reference Figure 4 , Figure 6 or Figure 7 As shown in the circuit diagram, the test result analyzer 304 includes an oscilloscope and a CAN analyzer, which can obtain the test result of the CAN bus by connecting the signals with the CAN-H terminal and the CAN-L terminal of the CAN bus to be tested, collecting the information data fed back by the CAN-H terminal and the CAN-L terminal.

[0109] A CAN bus multifunctional test circuit provided in this embodiment integrates all the wiring circuits required for the CAN bus physical layer test, and the test circuit connection can be completed by wiring several fixed ports, so that the test bench can be built conveniently and quickly; further, the test circuit includes two modes of manual control and automatic control, which can be manually operated when rapid verification and review of problems are required, and can be automatically tested during batch case testing, and can also be combined with manual and automatic to achieve certain special test operations; at the same time, the test circuit is suitable for commonly used test software on the market, such as CANoe, TSmaster, etc., and can send GPIO control instructions through serial port control to achieve control of the single-chip microcomputer minimum system and then control the system, so that the system has universal applicability, does not occupy the hardware channel of the CAN test equipment, and does not affect the CAN load rate of the device under test;

[0110] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A multifunctional testing method for CAN bus, characterized in that: Applicable to a CAN bus test device including several different functional test fixtures; wherein the multifunctional test method includes: Receiving a target test instruction for the CAN bus to be tested to determine a current function to be tested of the CAN bus to be tested; Matching the functional test tool corresponding to the current function to be tested, and connecting the functional test tool with the test channel of the CAN bus to be tested; Based on the test channel and the functional test tooling, a multifunctional test result of the CAN bus is obtained.

2. A multifunctional testing method for CAN bus according to claim 1, characterized in that: The test channel connecting the functional test fixture and the CAN bus to be tested includes: Acquire a plurality of first channels when the functional testing tool performs a functional test on the CAN bus to be tested; Obtaining a first test function corresponding to each of the first channels; When the first test function is consistent with the current function to be tested, a first channel for implementing the first test function is connected.

3. A CAN bus multifunctional test circuit, characterized in that: Applicable to CAN bus test equipment including several different functional test fixtures; wherein the multifunctional test circuit includes a processor, an electronic switch and a controller; Wherein, the input end of the electronic switch is connected to the output end of the functional test fixture; the output end of the electronic switch is connected to the input end of the CAN bus to be tested; The output end of the processor is connected to the driving end of the electronic switch, and is used to receive a target test instruction for the CAN bus to be tested, so as to determine the current function to be tested of the CAN bus to be tested; match the functional test tooling corresponding to the current function to be tested, and drive the electronic switch to close, so as to connect the test channel between the functional test tooling and the CAN bus to be tested; The controller is connected to the CAN bus signal to be tested so as to obtain a multifunctional test result of the CAN bus to be tested based on the test channel and the functional test tool.

4. A CAN bus multifunctional test circuit according to claim 3, characterized in that: It also includes a torsion switch; wherein the input end of the torsion switch is connected to the output end of the functional test tooling; and the output end of the torsion switch is connected to the input end of the CAN bus to be tested.

5. A CAN bus multifunctional test circuit according to claim 3, characterized in that: The electronic switch comprises a first relay, a second relay, a third relay and a fourth relay; Wherein, the output end of the first relay is connected to the high level signal end of the CAN bus to be tested; The output end of the second relay is connected to the low level signal end of the CAN bus to be tested; The output end of the third relay is connected to the ground end of the CAN bus to be tested; The output end of the fourth relay is connected to the power supply end of the CAN bus to be tested.

6. A CAN bus multifunctional test circuit according to claim 5, characterized in that: When the functional test tool is used to perform a terminal resistance test on the CAN bus to be tested or a capacitive load test on the CAN bus to be tested, the first output end of the functional test tool is connected to the input end of the first relay; The second output end of the functional testing tool is connected to the input end of the second relay; The third output terminal of the functional testing tool is connected to the input terminal of the third relay.

7. A CAN bus multifunctional test circuit according to claim 5, characterized in that: When the functional test tool is used to perform a hidden state test on the CAN bus to be tested or a fault management test on the CAN bus to be tested, the first output end of the functional test tool is connected to the input end of the first relay; The second output end of the functional testing tool is connected to the input end of the second relay; The third output terminal of the functional testing tool is connected to the input terminal of the third relay; The fourth output terminal of the functional testing tool is connected to the input terminal of the fourth relay.

8. A CAN bus multifunctional test circuit according to claim 5, characterized in that: It also includes a power supply; wherein the negative pole of the power supply is connected to the output end of the third relay; and the positive pole of the power supply is connected to the output end of the fourth relay.

9. A CAN bus multifunctional test circuit according to claim 8, characterized in that: It also includes a fifth relay; wherein the input end of the fifth relay is connected to the positive electrode of the power supply; and the output end of the fifth relay is connected to the ignition signal end of the CAN bus to be tested.

10. A CAN bus multifunctional test circuit according to any one of claims 4 to 9, characterized in that: The low level signal terminal and the high level signal input terminal of the CAN bus to be tested are respectively connected to the signal input terminal of the controller, so that the controller can obtain the multifunctional test result of the CAN bus to be tested.