Vehicle-mounted controller electrical fault test method, device and equipment and storage medium

By running the host computer program written in the CAPL programming language in CANoe software, injecting electrical faults into the on-board controller and automatically controlling the hardware equipment, the problems of low test accuracy, low efficiency and high cost in the existing technology are solved, and the problem of low testing accuracy, low efficiency and high cost is realized. Flexible electrical fault testing and cost savings.

CN119045452APending Publication Date: 2024-11-29DONGFENG ELECTRONICS TECH +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411145548.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

In the prior art, the on-board controller has low accuracy in electrical fault testing, low testing efficiency, high cost of testing cabinets, and cannot flexibly add hardware equipment, which lacks flexibility.

Method used

By receiving the host computer program written in the CAPL programming language, running it in the CANoe software, the programmable hardware device is controlled to inject preset electrical faults into the on-board controller to be tested, and the matching hardware device is automatically added according to the test results to achieve automated control.

Benefits of technology

Improves test accuracy and efficiency, supports flexible expansion of hardware devices, significantly saves testing costs and realizes code reuse.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119045452A_ABST
    Figure CN119045452A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle-mounted controller electrical fault test method, device and equipment and a storage medium, and the method comprises the steps: receiving an upper computer program written by a CAPL programming language, enabling the upper computer program to run in CANoe software, and controlling programmable hardware equipment connected to a COM port; an upper computer program is executed through programmable hardware equipment, and a preset electrical fault is injected into the vehicle-mounted controller to be tested; obtaining a fault test result fed back by the to-be-tested vehicle-mounted controller, selecting a matched target programmable hardware control device according to the fault test result, adding the target programmable hardware control device to a test system, and performing automatic control by using an upper computer program through the test system; according to the method, the fault processing result can be automatically judged, the test accuracy is improved, the upper computer program can be repeatedly used in different items, code reuse is achieved to the maximum extent, the test cost is greatly saved, and the speed and efficiency of the electrical fault test of the vehicle-mounted controller are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automated testing technology, and in particular to a vehicle-mounted controller electrical fault testing method, device, equipment and storage medium. Background Art

[0002] With the continuous improvement of the degree of automobile electrification, modern cars have more and more complex electronic control systems. The stability and reliability of various on-board controllers are crucial to ensure the normal operation of the vehicle. Therefore, for electrical failures that may occur in the controller, some processing methods will be designed in the research and development stage to avoid serious impact on the system when the failure occurs, thereby improving the safety and reliability of the vehicle. Therefore, verifying whether the fault handling method is effective is an important part of the on-board controller system test.

[0003] The existing technology generally adopts a manual testing solution, which manually creates an electrical fault and then relies on comparing message information, manual timing, etc. to test the fault handling function of the controller system. The above solution requires the tester to manually trigger the fault, carefully compare the message data, and meet the specified duration requirements. The test accuracy can only be guaranteed by performing the test multiple times, and the overall test efficiency is not high.

[0004] There are also a small number of existing technologies that adopt highly integrated test cabinets purchased from test tool suppliers, and use their supporting test software to perform automated testing; although this solution solves the test efficiency problem of manual testing, the cost of test cabinets and supporting software is high. If the needs of performing automated testing on multiple projects at the same time are to be met, it is necessary to invest huge costs to purchase multiple sets of equipment; and the existing technology generally requires a host computer running on a computer to send instructions to a real-time host running in the test cabinet, and the real-time host then controls other hardware devices in the cabinet; if hardware devices need to be added to the test cabinet, then both the host computer and the real-time host need to develop corresponding control programs; as a result, the test cabinet is generally unable to add other hardware devices at will according to actual testing needs, and lacks flexibility. Summary of the invention

[0005] The main purpose of the present invention is to provide a method, device, equipment and storage medium for testing electrical faults of a vehicle-mounted controller, aiming to solve the technical problems in the prior art of low accuracy of manual testing of controllers, low overall testing efficiency, high cost of testing controllers with test cabinets, inability to arbitrarily add other hardware equipment according to actual testing needs, and lack of flexibility.

[0006] In a first aspect, the present invention provides a method for testing an electrical fault of an on-board controller, the method comprising the following steps:

[0007] Receive a host computer program written in the CAPL programming language, run the host computer program in the CANoe software, and control the programmable hardware device connected to the COM port;

[0008] Executing the host computer program through the programmable hardware device to inject a preset electrical fault into the vehicle controller to be tested;

[0009] Obtain the fault test results fed back by the vehicle controller to be tested, select a matching target programmable hardware control device according to the fault test results, add the target programmable hardware control device to the test system, and perform automatic control through the test system using the host computer program.

[0010] Optionally, receiving a host computer program written in CAPL programming language, running the host computer program in CANoe software, and controlling a programmable hardware device connected to a COM port includes:

[0011] Develop the host computer program based on the CAPL programming language supporting CANoe software;

[0012] Receiving a host computer program written in the CAPL programming language, and running the host computer program in the CANoe software;

[0013] Access your computer's COM ports to control programmable hardware devices connected to said COM.

[0014] Optionally, the development of the host computer program based on the CAPL programming language supporting the CANoe software includes:

[0015] Develop a communication interface function library based on the CAPL programming language supporting the CANoe software, and control the programmable control hardware device through the communication interface function library;

[0016] Developing a message processing function library by using the CAPL programming language, analyzing message data by using the message processing function library, and converting the data format of the message data;

[0017] A user interaction function library is developed by using the CAPL programming language, and a user interaction process is processed by using the user interaction function library.

[0018] Optionally, the executing the host computer program through the programmable hardware device to inject a preset electrical fault into the vehicle controller to be tested includes:

[0019] The host computer program is executed by the programmable hardware device to inject a preset electrical fault of overvoltage, undervoltage, short circuit or open circuit type into the vehicle controller to be tested.

[0020] Optionally, after the programmable hardware device executes the host computer program to inject a preset electrical fault into the vehicle controller to be tested, the vehicle controller electrical fault test method further includes:

[0021] The host computer program controls the test system to automatically perform relevant tests on electrical faults and automatically output fault test results.

[0022] Optionally, the controlling the test system to automatically perform relevant tests on electrical faults and automatically output fault test results through the host computer program includes:

[0023] Obtaining CAN message data sent by the vehicle controller to the CAN network interface device, and determining whether the corresponding input port fault code is included according to the CAN message data;

[0024] The time when the fault code first appears and the relay energization recording time are recorded. The time interval from the occurrence of the fault to the reporting is determined by the following formula based on the relay energization recording time and the first fault code recording time:

[0025] ΔT=T2-T1

[0026] Among them, ΔT is the time interval, T2 is the time when the first fault code is recorded, and T1 is the time when the relay is closed.

[0027] A fault test result is generated according to the CAN message data and the time interval, and the fault test result is automatically output.

[0028] Optionally, the test system comprises: a vehicle controller to be tested, two programmable power supplies, a programmable relay and a CAN network interface device; wherein,

[0029] A programmable power supply is connected to the vehicle-mounted controller under test using a power line to supply power and adjust the voltage during the test;

[0030] The positive electrode and the ground wire of another programmable power supply are respectively connected to the common terminals of the two channels of the programmable relay through power wires for further connection later;

[0031] The fault input port of the vehicle-mounted controller to be tested is connected to any channel of the programmable relay and is connected to the normally closed end of the connected channel for electrical fault injection;

[0032] The CAN network interface device is connected to the CAN port of the vehicle-mounted controller to be tested for CAN communication;

[0033] The programmable power supply, the programmable relay and the CAN network interface device are all connected to a computer for upper computer program control.

[0034] In a second aspect, in order to achieve the above-mentioned object, the present invention further proposes an on-board controller electrical fault testing device, the on-board controller electrical fault testing device comprising:

[0035] A program running module is used to receive a host computer program written in the CAPL programming language, run the host computer program in the CANoe software, and control the programmable hardware device connected to the COM port;

[0036] A fault injection module, used to execute the host computer program through the programmable hardware device to inject a preset electrical fault into the vehicle controller to be tested;

[0037] A test control module is used to obtain the fault test results fed back by the vehicle controller to be tested, select a matching target programmable hardware control device according to the fault test results, add the target programmable hardware control device to the test system, and perform automatic control through the test system using the host computer program.

[0038] In the third aspect, to achieve the above-mentioned purpose, the present invention also proposes a vehicle-mounted controller electrical fault testing device, which includes: a memory, a processor, and a vehicle-mounted controller electrical fault testing program stored in the memory and executable on the processor, and the vehicle-mounted controller electrical fault testing program is configured to implement the steps of the vehicle-mounted controller electrical fault testing method as described above.

[0039] In a fourth aspect, in order to achieve the above-mentioned purpose, the present invention also proposes a storage medium, on which a vehicle-mounted controller electrical fault test program is stored, and when the vehicle-mounted controller electrical fault test program is executed by a processor, the steps of the vehicle-mounted controller electrical fault test method as described above are implemented.

[0040] The vehicle controller electrical fault testing method proposed by the present invention receives a host computer program written in the CAPL programming language, runs the host computer program in the CANoe software, and controls the programmable hardware device connected to the COM port; executes the host computer program through the programmable hardware device to inject a preset electrical fault into the vehicle controller to be tested; obtains the fault test result fed back by the vehicle controller to be tested, selects a matching target programmable hardware control device according to the fault test result, adds the target programmable hardware control device to the test system, and performs automatic control through the test system using the host computer program; can be used in combination with a variety of programmable hardware control devices based on serial port communication through a CAN interface device, can realize automatic manufacturing of electrical faults of any input port of the controller, and automatically judges the fault handling result, improves the test accuracy, supports various programmable hardware control devices to be expanded and added to the test system according to the test requirements, so as to solve the problems of low flexibility and high cost of the existing test cabinet solution, and the host computer program can be reused in different projects to maximize code reuse, greatly save the test cost, and improve the speed and efficiency of the vehicle controller electrical fault test. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention;

[0042] Figure 2 It is a flowchart of a first embodiment of a method for testing electrical faults of an on-board controller of the present invention;

[0043] Figure 3 A schematic diagram of a flow chart of a second embodiment of a vehicle controller electrical fault testing method according to the present invention;

[0044] Figure 4 A schematic diagram of a flow chart of a third embodiment of a vehicle controller electrical fault testing method according to the present invention;

[0045] Figure 5 A schematic flow chart of a fourth embodiment of a vehicle controller electrical fault testing method according to the present invention;

[0046] Figure 6 A schematic diagram of a flow chart of a fifth embodiment of a vehicle controller electrical fault testing method according to the present invention;

[0047] Figure 7 It is a flowchart of program execution in the vehicle controller electrical fault testing method of the present invention;

[0048] Figure 8 It is a schematic diagram of hardware connection in the vehicle controller electrical fault testing method of the present invention;

[0049] Fig. 9It is a detailed connection diagram of ports in the vehicle controller electrical fault testing method of the present invention;

[0050] Fig.10 It is a schematic diagram of the upper computer components in the vehicle controller electrical fault testing method of the present invention;

[0051] Fig.11 This is a functional module diagram of the first embodiment of the vehicle controller electrical fault testing device of the present invention.

[0052] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0053] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0054] The solution of the embodiment of the present invention is mainly as follows: by receiving a host computer program written in the CAPL programming language, the host computer program is run in the CANoe software to control the programmable hardware device connected to the COM port; the host computer program is executed by the programmable hardware device to inject a preset electrical fault into the vehicle controller to be tested; the fault test result fed back by the vehicle controller to be tested is obtained, and a matching target programmable hardware control device is selected according to the fault test result, and the target programmable hardware control device is added to the test system, and the host computer program is used for automatic control through the test system; the CAN interface device can communicate with a variety of programmable hardware control devices based on serial port communication. When used in combination, it is possible to automatically manufacture electrical faults at any input port of the controller and automatically determine the fault handling results, thereby improving test accuracy and supporting various programmable hardware control devices to be expanded and added to the test system according to test requirements to solve the problems of low flexibility and high cost of existing test cabinet solutions. The host computer program can be reused in different projects to maximize code reuse, greatly saving test costs and improving the speed and efficiency of electrical fault testing of vehicle-mounted controllers. It solves the technical problems of low test accuracy of manual test controllers, low overall test efficiency, high cost of test cabinet test controllers, inability to add other hardware devices at will according to actual test needs, and lack of flexibility in the prior art.

[0055] Reference Figure 1 , Figure 1 The figure is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.

[0056] like Figure 1As shown, the device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory, or it may be a stable memory (Non-Volatile Memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.

[0057] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0058] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating device, a network communication module, a user interface module, and an electrical fault test program for a vehicle controller.

[0059] The device of the present invention calls the vehicle controller electrical fault test program stored in the memory 1005 through the processor 1001, and performs the following operations:

[0060] Receive a host computer program written in the CAPL programming language, run the host computer program in the CANoe software, and control the programmable hardware device connected to the COM port;

[0061] Executing the host computer program through the programmable hardware device to inject a preset electrical fault into the vehicle controller to be tested;

[0062] Obtain the fault test results fed back by the vehicle controller to be tested, select a matching target programmable hardware control device according to the fault test results, add the target programmable hardware control device to the test system, and perform automatic control through the test system using the host computer program.

[0063] The device of the present invention calls the vehicle controller electrical fault test program stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0064] Develop the host computer program based on the CAPL programming language supporting CANoe software;

[0065] Receiving a host computer program written in the CAPL programming language, and running the host computer program in the CANoe software;

[0066] Access your computer's COM ports to control programmable hardware devices connected to said COM.

[0067] The device of the present invention calls the vehicle controller electrical fault test program stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0068] Develop a communication interface function library based on the CAPL programming language supporting the CANoe software, and control the programmable control hardware device through the communication interface function library;

[0069] Developing a message processing function library by using the CAPL programming language, analyzing message data by using the message processing function library, and converting the data format of the message data;

[0070] A user interaction function library is developed by using the CAPL programming language, and a user interaction process is processed by using the user interaction function library.

[0071] The device of the present invention calls the vehicle controller electrical fault test program stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0072] The host computer program is executed by the programmable hardware device to inject a preset electrical fault of overvoltage, undervoltage, short circuit or open circuit type into the vehicle controller to be tested.

[0073] The device of the present invention calls the vehicle controller electrical fault test program stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0074] The host computer program controls the test system to automatically perform relevant tests on electrical faults and automatically output fault test results.

[0075] The device of the present invention calls the vehicle controller electrical fault test program stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0076] Obtaining CAN message data sent by the vehicle controller to the CAN network interface device, and determining whether the corresponding input port fault code is included according to the CAN message data;

[0077] The time when the fault code first appears and the relay energization recording time are recorded. The time interval from the occurrence of the fault to the reporting is determined by the following formula based on the relay energization recording time and the first fault code recording time:

[0078] ΔT=T2-T1

[0079] Among them, ΔT is the time interval, T2 is the time when the first fault code is recorded, and T1 is the time when the relay is closed.

[0080] A fault test result is generated according to the CAN message data and the time interval, and the fault test result is automatically output.

[0081] The device of the present invention calls the vehicle controller electrical fault test program stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0082] A programmable power supply is connected to the vehicle-mounted controller under test using a power line to supply power and adjust the voltage during the test;

[0083] The positive electrode and the ground wire of another programmable power supply are respectively connected to the common terminals of the two channels of the programmable relay through power wires for further connection later;

[0084] The fault input port of the vehicle-mounted controller to be tested is connected to any channel of the programmable relay and is connected to the normally closed end of the connected channel for electrical fault injection;

[0085] The CAN network interface device is connected to the CAN port of the vehicle-mounted controller to be tested for CAN communication;

[0086] The programmable power supply, the programmable relay and the CAN network interface device are all connected to a computer for upper computer program control.

[0087] Through the above scheme, this embodiment receives a host computer program written in the CAPL programming language, runs the host computer program in the CANoe software, and controls the programmable hardware device connected to the COM port; executes the host computer program through the programmable hardware device to inject a preset electrical fault into the vehicle controller to be tested; obtains the fault test result fed back by the vehicle controller to be tested, selects a matching target programmable hardware control device according to the fault test result, adds the target programmable hardware control device to the test system, and performs automatic control through the test system using the host computer program; can be used in combination with a variety of programmable hardware control devices based on serial port communication through a CAN interface device, can realize automatic manufacturing of electrical faults at any input port of the controller, and automatically judge the fault handling result, improves the test accuracy, supports various programmable hardware control devices to be expanded and added to the test system according to test requirements, so as to solve the problems of low flexibility and high cost of the existing test cabinet solution, and the host computer program can be reused in different projects to maximize code reuse, greatly save test costs, and improve the speed and efficiency of vehicle controller electrical fault testing.

[0088] Based on the above hardware structure, an embodiment of the vehicle controller electrical fault testing method of the present invention is proposed.

[0089] Reference Figure 2 , Figure 2 It is a flowchart of the first embodiment of the vehicle controller electrical fault testing method of the present invention.

[0090] In a first embodiment, the vehicle controller electrical fault testing method comprises the following steps:

[0091] Step S10, receiving a host computer program written in CAPL programming language, running the host computer program in CANoe software, and controlling a programmable hardware device connected to a COM port.

[0092] It should be noted that the host computer program can be written using the Communication Access Programming Language (CAPL) programming language, and the host computer program is run in the CANoe software to control the programmable hardware device connected to the serial communication port (Cluster Communication Port, COM) port of the computer.

[0093] Step S20: executing the host computer program through the programmable hardware device to inject a preset electrical fault into the vehicle controller to be tested.

[0094] It should be understood that by executing the host computer program through the programmable hardware device, a pre-set electrical fault can be injected into the vehicle controller to be tested.

[0095] Step S30, obtaining the fault test result fed back by the vehicle controller to be tested, selecting a matching target programmable hardware control device according to the fault test result, adding the target programmable hardware control device to the test system, and performing automatic control through the test system using the host computer program.

[0096] It can be understood that after obtaining the fault test results fed back by the vehicle-mounted controller to be tested, a matching programmable hardware control device can be selected as the target programmable hardware control device based on the fault test results, and the target programmable hardware control device can be added to the test system, and the host computer program can be used for automatic control through the test system.

[0097] Through the above scheme, this embodiment receives a host computer program written in the CAPL programming language, runs the host computer program in the CANoe software, and controls the programmable hardware device connected to the COM port; executes the host computer program through the programmable hardware device to inject a preset electrical fault into the vehicle controller to be tested; obtains the fault test result fed back by the vehicle controller to be tested, selects a matching target programmable hardware control device according to the fault test result, adds the target programmable hardware control device to the test system, and performs automatic control through the test system using the host computer program; can be used in combination with a variety of programmable hardware control devices based on serial port communication through a CAN interface device, can realize automatic manufacturing of electrical faults at any input port of the controller, and automatically judge the fault handling result, improves the test accuracy, supports various programmable hardware control devices to be expanded and added to the test system according to test requirements, so as to solve the problems of low flexibility and high cost of the existing test cabinet solution, and the host computer program can be reused in different projects to maximize code reuse, greatly save test costs, and improve the speed and efficiency of vehicle controller electrical fault testing.

[0098] Further, Figure 3 FIG. 1 is a flow chart of a second embodiment of a vehicle controller electrical fault testing method according to the present invention. Figure 3 As shown, a second embodiment of the vehicle controller electrical fault testing method of the present invention is proposed based on the first embodiment. In this embodiment, the step S10 specifically includes the following steps:

[0099] Step S11, developing a host computer program based on the CAPL programming language supporting the CANoe software.

[0100] It should be noted that the full name of "CANoe" is CAN open environment, which is a bus development environment developed by the German Vector company for the development of automotive buses. The host computer program can be developed based on the CAPL programming language supporting the CANoe software.

[0101] Step S12, receiving a host computer program written in the CAPL programming language, and running the host computer program in the CANoe software.

[0102] It can be understood that a host computer program written in the CAPL programming language is received, and then the host computer program is run in the CANoe software.

[0103] Step S13: access the COM port of the computer to control the programmable hardware device connected to the COM.

[0104] It should be understood that the host computer program written in the CAPL programming language and running in the CANoe software can access the computer's COM port to control the programmable hardware device connected to the port.

[0105] Through the above scheme, this embodiment develops a host computer program by using the CAPL programming language based on the CANoe software; receives the host computer program written in the CAPL programming language, and runs the host computer program in the CANoe software; accesses the COM port of the computer to control the programmable hardware device connected to the COM, and can quickly control the connected programmable hardware device. By combining the CAN interface device with a variety of programmable hardware control devices based on serial port communication, it is possible to automatically manufacture electrical faults of any input port of the controller, thereby improving the speed and efficiency of electrical fault testing of the vehicle-mounted controller.

[0106] Further, Figure 4 FIG. 1 is a flow chart of a third embodiment of a vehicle controller electrical fault testing method according to the present invention. Figure 4 As shown, a third embodiment of the vehicle controller electrical fault testing method of the present invention is proposed based on the second embodiment. In this embodiment, the step S11 specifically includes the following steps:

[0107] Step S111: Develop a communication interface function library based on the CAPL programming language supporting the CANoe software, and control the programmable control hardware device through the communication interface function library.

[0108] It should be noted that the CAPL programming language supporting the CANoe software can be used to develop corresponding function libraries and communication interface function libraries to control programmable control hardware devices.

[0109] Step S112: Develop a message processing function library using the CAPL programming language, analyze message data using the message processing function library, and convert the data format of the message data.

[0110] It is understandable that a message processing function library can be developed through the CAPL programming language, and the message processing function library is used to analyze message data and convert data formats.

[0111] Step S113: Develop a user interaction function library using the CAPL programming language, and process the user interaction process using the user interaction function library.

[0112] It should be understood that a user interaction function library can be developed through the CAPL programming language to handle user interactions.

[0113] Through the above scheme, this embodiment develops a communication interface function library through the CAPL programming language based on the CANoe software, and controls the programmable control hardware device through the communication interface function library; develops a message processing function library through the CAPL programming language, analyzes message data through the message processing function library, and converts the data format of the message data; develops a user interaction function library through the CAPL programming language, and processes the user interaction process through the user interaction function library. The upper computer program can be developed through the CAPL programming language, and the electrical fault of any input port of the automatic manufacturing controller can be realized, thereby improving the speed and efficiency of the electrical fault test of the vehicle-mounted controller.

[0114] Further, Figure 5 FIG. 4 is a flow chart of a fourth embodiment of a vehicle controller electrical fault testing method according to the present invention. Figure 5 As shown, a fourth embodiment of the vehicle controller electrical fault testing method of the present invention is proposed based on the first embodiment. In this embodiment, the step S20 specifically includes the following steps:

[0115] Step S21, executing the host computer program through the programmable hardware device to inject a preset electrical fault of overvoltage, undervoltage, short circuit or open circuit type into the vehicle controller to be tested.

[0116] It should be noted that the programmable hardware control device receives instructions from the host computer program and automatically performs operations such as voltage change, relay closure, etc. to inject electrical faults into the vehicle controller under test.

[0117] It can be understood that the preset electrical fault injected into the vehicle controller to be tested may be an electrical fault of the overvoltage, undervoltage, short circuit, or open circuit type.

[0118] In the specific implementation, the appropriate programmable hardware control device can be selected and added to the test system according to the type of electrical fault that needs to be injected into the vehicle controller to be tested. After being connected to the computer COM port, it can be directly automatically controlled through the host computer program.

[0119] This embodiment adopts the above scheme, executes the host computer program through the programmable hardware device, and injects preset electrical faults of overvoltage, undervoltage, short circuit or open circuit type into the vehicle controller to be tested. It can be used in combination with a variety of programmable hardware control devices based on serial port communication through the CAN interface device, and can automatically create electrical faults at any input port of the controller, and automatically judge the fault handling results, thereby improving the test accuracy.

[0120] Further, Figure 6 FIG. 5 is a flow chart of a fifth embodiment of a method for testing electrical faults of an on-board controller of the present invention. Figure 6As shown, a fifth embodiment of the vehicle controller electrical fault testing method of the present invention is proposed based on the first embodiment. In this embodiment, after step S20, the vehicle controller electrical fault testing method of the present invention further includes the following steps:

[0121] Step S201: Control the test system through the host computer program to automatically execute relevant tests of electrical faults and automatically output fault test results.

[0122] It should be noted that the host computer program can control the entire test system to automatically execute tests related to electrical faults and automatically output test results.

[0123] In the specific implementation, the host computer program is developed based on the CAPL programming language supporting the CANoe software and runs in the CANoe software to automatically perform electrical-related fault tests on the vehicle controller to be tested.

[0124] Furthermore, the step S201 specifically includes the following steps:

[0125] Obtaining CAN message data sent by the vehicle controller to the CAN network interface device, and determining whether the corresponding input port fault code is included according to the CAN message data;

[0126] The time when the fault code first appears and the relay energization recording time are recorded. The time interval from the occurrence of the fault to the reporting is determined by the following formula based on the relay energization recording time and the first fault code recording time:

[0127] ΔT=T2-T1

[0128] Among them, ΔT is the time interval, T2 is the time when the first fault code is recorded, and T1 is the time when the relay is closed.

[0129] A fault test result is generated according to the CAN message data and the time interval, and the fault test result is automatically output.

[0130] In the specific implementation, see Figure 7 , Figure 7 This is a flowchart of the program execution in the vehicle controller electrical fault testing method of the present invention, such as Figure 7 As shown, the host computer program contains the corresponding test scripts, which can be executed in the following order:

[0131] a) Set two programmable power supplies to power the on-board controller and the fault injection source.

[0132] b) Set the voltage value of the vehicle controller power supply to the rated working voltage V1, and the voltage value of the fault injection source to the fault trigger voltage V2.

[0133] c) Set the relay to energize and record the time at this moment as T1, so that the fault injection source and the input port of the vehicle controller form a closed loop.

[0134] d) Monitor the CAN message data sent by the vehicle controller to the CAN network interface device, determine whether it contains the corresponding input port fault code, and record the time when the fault code first appears as T2; ΔT = T2-T1 is the time interval from the occurrence of the fault to the reporting.

[0135] Output the test results of this test case based on the message and time results.

[0136] It can be understood that the host computer program obtains fault feedback through CAN communication with the vehicle controller to be tested, thereby judging and outputting the test results. The channel input relay is energized to connect the common end of the channel input with the normally open end, thereby forming a closed loop between the fault injection source and the input port of the vehicle controller, that is, the input port is short-circuited to an electrical fault.

[0137] In the specific implementation, the current manual execution of a fault-related test case includes a series of test steps such as retrieving the input port, starting the timing while creating the fault, stopping the timing while removing the fault, and verifying the message data. In order to ensure accuracy, it needs to be repeated at least 3 times, which takes about 6 to 8 minutes. There are generally about one hundred fault-related test cases, and this alone takes more than ten hours. Except for the wiring harness connection stage, program control is adopted throughout the formal test stage to greatly improve accuracy and eliminate errors caused by manual operation. After the wiring harness is connected to the programmable hardware control device, it can be reused across projects, saving the time of retrieving the input port wiring harness for each test. After program automation testing is adopted, it only takes about 1 minute to execute a test case. Even if the error value is considered and the test is repeated 3 times, the total time is only 3 minutes, and the test efficiency is improved by 50%. The programmable hardware control devices used are all commonly used electronic equipment in the industry. Compared with purchasing integrated test cabinets from test tool suppliers, they eliminate additional costs such as assembly costs and software development costs. Generally speaking, the cost is only one-quarter to one-fifth, which greatly saves testing costs. After the upper computer program is developed, it can also be reused in different projects to maximize code reuse and save testing costs.

[0138] Furthermore, the test system includes: a vehicle controller to be tested, two programmable power supplies, a programmable relay and a CAN network interface device; wherein,

[0139] A programmable power supply is connected to the vehicle-mounted controller under test using a power line to supply power and adjust the voltage during the test;

[0140] The positive electrode and the ground wire of another programmable power supply are respectively connected to the common terminals of the two channels of the programmable relay through power wires for further connection later;

[0141] The fault input port of the vehicle-mounted controller to be tested is connected to any channel of the programmable relay and is connected to the normally closed end of the connected channel for electrical fault injection;

[0142] The CAN network interface device is connected to the CAN port of the vehicle-mounted controller to be tested for CAN communication;

[0143] The programmable power supply, the programmable relay and the CAN network interface device are all connected to a computer for upper computer program control.

[0144] It should be noted that the electrical fault automatic test system based on CANoe includes: a vehicle-mounted controller to be tested, two programmable power supplies, a programmable relay, and Vector's CAN network interface device; one of the programmable power supplies is connected to the vehicle-mounted controller to be tested using a power cord to supply power and adjust the voltage during the test; the positive pole and ground wire of the other programmable power supply are respectively connected to the common ends of the two channels of the programmable relay through power cords for further connection; the fault input port of the vehicle-mounted controller to be tested is connected to any channel of the programmable relay, and is connected to the normally closed end of the above-mentioned relay channel that has been connected to the power supply for electrical fault injection; the CAN network interface device is connected to the CAN port of the vehicle-mounted controller to be tested for CAN communication; the programmable power supply, programmable relay, and CAN network interface device all need to be connected to a computer for upper computer program control.

[0145] In the specific implementation, see Figure 8 , Figure 8 FIG. 1 is a schematic diagram of hardware connection in the vehicle controller electrical fault testing method of the present invention, as shown in FIG. Figure 8 As shown, a programmable power supply (or an output channel of a multi-channel programmable power supply) is connected to the power supply port of the vehicle controller to provide power to it and allow the voltage to be adjusted by program control during subsequent tests; the CAN port of the CAN network interface device is connected to the CAN port of the vehicle controller to monitor the CAN message information of the vehicle controller and send CAN messages to control the functions of the vehicle controller during the test; the programmable power supply, programmable relay, and CAN network interface device are all connected to the computer, and the upper computer software program is run during subsequent tests to control the above hardware devices.

[0146] See also Fig. 9 , Fig. 9 FIG. 1 is a detailed connection diagram of ports in the vehicle controller electrical fault test method of the present invention, such as Fig. 9As shown, the positive electrode of another programmable power supply (or another output channel of a multi-channel programmable power supply) is connected to the common end of one channel (named as channel positive) of a programmable multi-channel relay, and the ground wire is connected to the common end of another channel (named as channel ground) of the relay, which is used for fault injection in subsequent testing and allows the voltage to be adjusted by program control; the input port of the on-board controller that needs to be fault injected is connected to the common end of any channel of the multi-channel relay (named as channel in, which can be further named as channel in 1, channel in 2... according to the number of input ports);

[0147] The input port of the vehicle controller needs to be further connected according to the type of fault injected, as follows:

[0148] a) Short circuit to ground fault: connect the normally closed end of the channel ground to the normally open end of the channel input;

[0149] b) Short circuit to electrical fault: connect the normally closed end of the positive channel to the normally open end of the input channel;

[0150] c) Overvoltage and undervoltage fault: connect the normally closed end of the positive channel to the normally closed end of the input channel;

[0151] See also Fig.10 , Fig.10 FIG. 1 is a schematic diagram of the upper computer components in the vehicle controller electrical fault testing method of the present invention, as shown in FIG. Fig.10 As shown, the host computer program is developed based on CANoe software, and uses the communication interface function library to communicate with programmable hardware control devices such as programmable power supplies and programmable relays through the computer COM port, so that the host computer sends instructions to adjust the power supply voltage, control the relay to be attracted and disconnected, and other operations; the host computer program can use the message processing function library to automatically analyze and process CAN message data during the test, and use the interface interaction function library to display the test results on the host computer interface.

[0152] Through the above scheme, this embodiment controls the test system through the host computer program to automatically perform relevant tests of electrical faults and automatically output fault test results, thereby improving the speed and efficiency of electrical fault testing of the vehicle controller.

[0153] Correspondingly, the present invention further provides an electrical fault testing device for a vehicle-mounted controller.

[0154] Reference Fig.11 , Fig.11 This is a functional module diagram of the first embodiment of the vehicle controller electrical fault testing device of the present invention.

[0155] In a first embodiment of the vehicle-mounted controller electrical fault testing device of the present invention, the vehicle-mounted controller electrical fault testing device comprises:

[0156] The program running module 10 is used to receive a host computer program written in the CAPL programming language, run the host computer program in the CANoe software, and control the programmable hardware device connected to the COM port.

[0157] The fault injection module 20 is used to execute the host computer program through the programmable hardware device to inject a preset electrical fault into the vehicle controller to be tested.

[0158] The test control module 30 is used to obtain the fault test results fed back by the vehicle controller to be tested, select a matching target programmable hardware control device according to the fault test results, add the target programmable hardware control device to the test system, and perform automatic control through the test system using the host computer program.

[0159] The program running module 10 is also used to develop a host computer program based on the CAPL programming language supporting the CANoe software; receive a host computer program written in the CAPL programming language, and run the host computer program in the CANoe software; access the COM port of the computer to control the programmable hardware device connected to the COM.

[0160] The program running module 10 is also used to develop a communication interface function library based on the CAPL programming language supporting the CANoe software, and control the programmable control hardware device through the communication interface function library; develop a message processing function library through the CAPL programming language, analyze message data through the message processing function library, and convert the data format of the message data; develop a user interaction function library through the CAPL programming language, and process the user interaction process through the user interaction function library.

[0161] The fault injection module 20 is further used to execute the host computer program through the programmable hardware device to inject a preset electrical fault of overvoltage, undervoltage, short circuit or open circuit type into the vehicle controller to be tested.

[0162] The test control module 30 is also used to control the test system to automatically execute relevant tests of electrical faults through the host computer program, and automatically output fault test results.

[0163] The test control module 30 is further used to obtain CAN message data sent by the vehicle controller to the CAN network interface device, and determine whether the corresponding input port fault code is included according to the CAN message data;

[0164] The time when the fault code first appears and the relay energization recording time are recorded. The time interval from the occurrence of the fault to the reporting is determined by the following formula based on the relay energization recording time and the first fault code recording time:

[0165] ΔT=T2-T1

[0166] Among them, ΔT is the time interval, T2 is the time when the first fault code is recorded, and T1 is the time when the relay is closed.

[0167] Generate a fault test result according to the CAN message data and the time interval, and automatically output the fault test result;

[0168] The test system includes: a vehicle controller to be tested, two programmable power supplies, a programmable relay and a CAN network interface device; wherein,

[0169] A programmable power supply is connected to the vehicle-mounted controller under test using a power line to supply power and adjust the voltage during the test;

[0170] The positive electrode and the ground wire of another programmable power supply are respectively connected to the common terminals of the two channels of the programmable relay through power wires for further connection later;

[0171] The fault input port of the vehicle-mounted controller to be tested is connected to any channel of the programmable relay and is connected to the normally closed end of the connected channel for electrical fault injection;

[0172] The CAN network interface device is connected to the CAN port of the vehicle-mounted controller to be tested for CAN communication;

[0173] The programmable power supply, the programmable relay and the CAN network interface device are all connected to a computer for upper computer program control.

[0174] Among them, the steps implemented by each functional module of the vehicle controller electrical fault testing device can refer to the various embodiments of the vehicle controller electrical fault testing method of the present invention, and will not be repeated here.

[0175] In addition, an embodiment of the present invention further provides a storage medium, on which a vehicle controller electrical fault test program is stored. When the vehicle controller electrical fault test program is executed by a processor, the following operations are implemented:

[0176] Receive a host computer program written in the CAPL programming language, run the host computer program in the CANoe software, and control the programmable hardware device connected to the COM port;

[0177] Executing the host computer program through the programmable hardware device to inject a preset electrical fault into the vehicle controller to be tested;

[0178] Obtain the fault test results fed back by the vehicle controller to be tested, select a matching target programmable hardware control device according to the fault test results, add the target programmable hardware control device to the test system, and perform automatic control through the test system using the host computer program.

[0179] Furthermore, when the vehicle-mounted controller electrical fault test program is executed by the processor, the following operations are also implemented:

[0180] Develop the host computer program based on the CAPL programming language supporting CANoe software;

[0181] Receiving a host computer program written in the CAPL programming language, and running the host computer program in the CANoe software;

[0182] Access your computer's COM ports to control programmable hardware devices connected to said COM.

[0183] Furthermore, when the vehicle-mounted controller electrical fault test program is executed by the processor, the following operations are also implemented:

[0184] Develop a communication interface function library based on the CAPL programming language supporting the CANoe software, and control the programmable control hardware device through the communication interface function library;

[0185] Developing a message processing function library by using the CAPL programming language, analyzing message data by using the message processing function library, and converting the data format of the message data;

[0186] A user interaction function library is developed by using the CAPL programming language, and a user interaction process is processed by using the user interaction function library.

[0187] Furthermore, when the vehicle-mounted controller electrical fault test program is executed by the processor, the following operations are also implemented:

[0188] The host computer program is executed by the programmable hardware device to inject a preset electrical fault of overvoltage, undervoltage, short circuit or open circuit type into the vehicle controller to be tested.

[0189] Furthermore, when the vehicle-mounted controller electrical fault test program is executed by the processor, the following operations are also implemented:

[0190] The host computer program controls the test system to automatically perform relevant tests on electrical faults and automatically output fault test results.

[0191] Furthermore, when the vehicle-mounted controller electrical fault test program is executed by the processor, the following operations are also implemented:

[0192] Obtaining CAN message data sent by the vehicle controller to the CAN network interface device, and determining whether the corresponding input port fault code is included according to the CAN message data;

[0193] The time when the fault code first appears and the relay energization recording time are recorded. The time interval from the occurrence of the fault to the reporting is determined by the following formula based on the relay energization recording time and the first fault code recording time:

[0194] ΔT=T2-T1

[0195] Among them, ΔT is the time interval, T2 is the time when the first fault code is recorded, and T1 is the time when the relay is closed.

[0196] A fault test result is generated according to the CAN message data and the time interval, and the fault test result is automatically output.

[0197] Furthermore, when the vehicle-mounted controller electrical fault test program is executed by the processor, the following operations are also implemented:

[0198] A programmable power supply is connected to the vehicle-mounted controller under test using a power line to supply power and adjust the voltage during the test;

[0199] The positive electrode and the ground wire of another programmable power supply are respectively connected to the common terminals of the two channels of the programmable relay through power wires for further connection later;

[0200] The fault input port of the vehicle-mounted controller to be tested is connected to any channel of the programmable relay and is connected to the normally closed end of the connected channel for electrical fault injection;

[0201] The CAN network interface device is connected to the CAN port of the vehicle-mounted controller to be tested for CAN communication;

[0202] The programmable power supply, the programmable relay and the CAN network interface device are all connected to a computer for upper computer program control.

[0203] Those skilled in the art will appreciate that all or part of the steps in the above-mentioned implementation method can be accomplished by instructing related hardware through a program, and the program is stored in a storage medium, including a number of instructions for enabling a device (which may be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each implementation method of the present application; and the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.

[0204] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0205] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0206] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for testing electrical faults of a vehicle controller. It is characterized in that The vehicle controller electrical fault testing method comprises: Receive a host computer program written in the CAPL programming language, run the host computer program in the CANoe software, and control the programmable hardware device connected to the COM port; Executing the host computer program through the programmable hardware device to inject a preset electrical fault into the vehicle controller to be tested; Obtain the fault test results fed back by the vehicle controller to be tested, select a matching target programmable hardware control device according to the fault test results, add the target programmable hardware control device to the test system, and perform automatic control through the test system using the host computer program.

2. The vehicle controller electrical fault testing method according to claim 1, It is characterized in that The receiving of the host computer program written in the CAPL programming language, running the host computer program in the CANoe software, and controlling the programmable hardware device connected to the COM port includes: Develop the host computer program based on the CAPL programming language supporting CANoe software; Receiving a host computer program written in the CAPL programming language, and running the host computer program in the CANoe software; Access your computer's COM ports to control programmable hardware devices connected to said COM.

3. The vehicle controller electrical fault testing method as claimed in claim 2, It is characterized in that The development of the host computer program based on the CAPL programming language supporting the CANoe software includes: Develop a communication interface function library based on the CAPL programming language supporting the CANoe software, and control the programmable control hardware device through the communication interface function library; Developing a message processing function library by using the CAPL programming language, analyzing message data by using the message processing function library, and converting the data format of the message data; A user interaction function library is developed by using the CAPL programming language, and a user interaction process is processed by using the user interaction function library.

4. The vehicle controller electrical fault testing method according to claim 1, It is characterized in that The step of executing the host computer program through the programmable hardware device to inject a preset electrical fault into the vehicle controller to be tested includes: The host computer program is executed by the programmable hardware device to inject a preset electrical fault of overvoltage, undervoltage, short circuit or open circuit type into the vehicle controller to be tested.

5. The vehicle controller electrical fault testing method as claimed in claim 1, It is characterized in that After the programmable hardware device executes the host computer program to inject a preset electrical fault into the vehicle controller to be tested, the vehicle controller electrical fault test method further includes: The host computer program controls the test system to automatically perform relevant tests on electrical faults and automatically output fault test results.

6. The vehicle controller electrical fault testing method as claimed in claim 5, It is characterized in that The control of the test system by the host computer program to automatically perform related tests of electrical faults and automatically output fault test results includes: Obtaining CAN message data sent by the vehicle controller to the CAN network interface device, and determining whether the corresponding input port fault code is included according to the CAN message data; The time when the fault code first appears and the relay energization recording time are recorded. The time interval from the occurrence of the fault to the reporting is determined by the following formula based on the relay energization recording time and the first fault code recording time: ΔT=T2-T1 Among them, ΔT is the time interval, T2 is the time when the first fault code is recorded, and T1 is the time when the relay is closed. A fault test result is generated according to the CAN message data and the time interval, and the fault test result is automatically output.

7. The vehicle controller electrical fault testing method according to claim 1, It is characterized in that The test system includes: a vehicle controller to be tested, two programmable power supplies, a programmable relay and a CAN network interface device; wherein, A programmable power supply is connected to the vehicle-mounted controller under test using a power line to supply power and adjust the voltage during the test; The positive electrode and the ground wire of another programmable power supply are respectively connected to the common terminals of the two channels of the programmable relay through power wires for further connection later; The fault input port of the vehicle-mounted controller to be tested is connected to any channel of the programmable relay and is connected to the normally closed end of the connected channel for electrical fault injection; The CAN network interface device is connected to the CAN port of the vehicle-mounted controller to be tested for CAN communication; The programmable power supply, the programmable relay and the CAN network interface device are all connected to a computer for upper computer program control.

8. An on-vehicle controller electrical fault test device, It is characterized in that The vehicle-mounted controller electrical fault testing device comprises: A program running module is used to receive a host computer program written in the CAPL programming language, run the host computer program in the CANoe software, and control the programmable hardware device connected to the COM port; A fault injection module, used to execute the host computer program through the programmable hardware device to inject a preset electrical fault into the vehicle controller to be tested; A test control module is used to obtain the fault test results fed back by the vehicle controller to be tested, select a matching target programmable hardware control device according to the fault test results, add the target programmable hardware control device to the test system, and perform automatic control through the test system using the host computer program.

9. An on-board controller electrical fault test device, It is characterized in that The on-board controller electrical fault testing device includes: a memory, a processor, and a on-board controller electrical fault testing program stored in the memory and executable on the processor, wherein the on-board controller electrical fault testing program is configured to implement the steps of the on-board controller electrical fault testing method as described in any one of claims 1 to 7.

10. A storage medium, It is characterized in that The storage medium stores an on-board controller electrical fault test program, which, when executed by a processor, implements the steps of the on-board controller electrical fault test method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Controller coding information writing / reading method and system

    CN120602252A

  • CAN network fault-tolerant automatic test system and method of electric steering system

    CN121000634A