CN-116156001-B - Conversion method of vehicle fault code, storage medium, whole vehicle controller and vehicle
Abstract
The invention discloses a vehicle fault code conversion method, a storage medium, a vehicle controller and a vehicle, wherein the vehicle fault code conversion method comprises the steps of responding to a UDS diagnosis service request, and carrying out fault diagnosis on the vehicle to obtain the UDS diagnosis fault code; and converting the UDS diagnosis fault code into a DM1 message fault code, and sending the DM1 message fault code to an instrument of the vehicle for display. According to the invention, the UDS diagnosis fault code is converted into the DM1 message format through the whole vehicle controller, so that the function of displaying the fault code by the instrument is realized.
Inventors
- LI YANG
- YING XIANG
- DU SHIXUAN
- CHENG YIBIN
- NI RUI
- HAN BIN
Assignees
- 北汽福田汽车股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20230214
Claims (10)
- 1. A method of converting a vehicle fault code, the method comprising: Responding to the UDS diagnosis service request, and performing fault diagnosis on the vehicle to acquire a UDS diagnosis fault code; And converting the UDS diagnosis fault code into a DM1 message fault code, and sending the DM1 message fault code to an instrument of the vehicle for display.
- 2. The method for converting a vehicle fault code according to claim 1, wherein the DM1 message fault code includes a suspicious parameter number SPN, a fault mode flag FMI, a conversion mode CM of the suspicious parameter number, and a number of occurrences OC, and the converting the UDS diagnostic fault code into the DM1 message fault code includes: Converting part of bits in high bytes and medium bytes in the UDS diagnostic trouble code into the SPN, converting the other part of bits in the UDS diagnostic trouble code into the FMI, converting the occurrence frequency of extended data records in the UDS diagnostic trouble code into the OC, and setting the CM to 0.
- 3. The method of converting a vehicle trouble code according to claim 1, characterized in that the method further comprises: judging whether the byte number of the DM1 message fault code is larger than a preset threshold value or not; if the byte number of the DM1 message fault code is larger than the preset threshold value, the DM1 message fault code is sent to an instrument of the vehicle in a first transmission mode; And if the byte number of the DM1 message fault code is smaller than or equal to the preset threshold value, transmitting the DM1 message fault code to an instrument of the vehicle in a second transmission mode.
- 4. The method for converting a vehicle fault code according to claim 3, wherein the preset threshold is 8 bytes, the first transmission mode is a multi-frame transmission mode, and the second transmission mode is a single-frame transmission mode.
- 5. The method of claim 1, wherein the UDS diagnostic trouble code includes trouble information of a complete vehicle controller and/or a function controller of the vehicle, wherein the function controller includes at least one of a battery management system, a motor controller, a dc-dc converter, and a dc-ac converter.
- 6. The method for converting a vehicle fault code according to claim 5, wherein the sending the DM1 message fault code to the meter of the vehicle comprises: And sending the DM1 message fault code to a central gateway through a CAN bus, and sending the DM1 message fault code to the instrument through the central gateway.
- 7. The method for converting a vehicle fault code according to claim 1, wherein the DM1 message fault code is displayed by text or a fault interface through the meter.
- 8. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of converting a vehicle fault code according to any one of claims 1-7.
- 9. A vehicle control unit comprising a memory and a processor, wherein the memory has a computer program stored thereon, and wherein the computer program, when executed by the processor, implements the method for converting a vehicle fault code according to any one of claims 1 to 7.
- 10. A vehicle comprising a vehicle control unit according to claim 9.
Description
Conversion method of vehicle fault code, storage medium, whole vehicle controller and vehicle Technical Field The invention relates to the technical field of vehicles, in particular to a vehicle fault code conversion method, a storage medium, a whole vehicle controller and a vehicle. Background The new energy automobile three-electric system supports UDS (Unified Diagnostic Services, unified diagnostic service) diagnostic protocol, and can read fault codes through a fault diagnostic instrument, but can not actively display faults on an instrument. Disclosure of Invention The invention aims to provide a vehicle fault code conversion method, a storage medium, a whole vehicle controller and a vehicle, wherein the whole vehicle controller is used for converting a UDS diagnosis fault code into a DM1 message format, so that the function of displaying the fault code by an instrument is realized. In order to achieve the above purpose, an embodiment of a first aspect of the present invention provides a method for converting a vehicle fault code, where the method includes performing fault diagnosis on a vehicle to obtain a UDS diagnostic fault code in response to a UDS diagnostic service request, converting the UDS diagnostic fault code into a DM1 message fault code, and sending the DM1 message fault code to an instrument of the vehicle for display. In addition, the method for converting the vehicle fault code according to the embodiment of the present invention may further have the following additional technical features: according to one embodiment of the invention, the DM1 message fault code comprises a suspicious parameter number SPN, a fault mode mark FMI, a conversion mode CM of the suspicious parameter number and occurrence times OC, wherein the step of converting the UDS diagnosis fault code into the DM1 message fault code comprises the steps of converting part of bits in high bytes and middle bytes in the UDS diagnosis fault code into the SPN, converting the other part of bits in the UDS diagnosis fault code into the FMI, converting the occurrence times of extended data records in the UDS diagnosis fault code into the OC and setting the CM to 0. According to one embodiment of the invention, the method further comprises the steps of judging whether the byte number of the DM1 message fault code is larger than a preset threshold value, if the byte number of the DM1 message fault code is larger than the preset threshold value, sending the DM1 message fault code to the instrument of the vehicle in a first transmission mode, and if the byte number of the DM1 message fault code is smaller than or equal to the preset threshold value, sending the DM1 message fault code to the instrument of the vehicle in a second transmission mode. According to an embodiment of the present invention, the preset threshold is 8 bytes, the first transmission mode is a multi-frame transmission mode, and the second transmission mode is a single-frame transmission mode. According to one embodiment of the invention, the UDS diagnostic trouble code comprises trouble information of a complete vehicle controller and/or a functional controller of the vehicle, wherein the functional controller comprises at least one of a battery management system, a motor controller, a dc-dc converter, a dc-ac converter. According to one embodiment of the invention, the sending the DM1 message fault code to the meter of the vehicle comprises sending the DM1 message fault code to a central gateway through a CAN bus and sending the DM1 message fault code to the meter through the central gateway. According to one embodiment of the invention, the fault code of the DM1 message is displayed through the instrument in a text mode or a fault interface mode. According to the method for converting the vehicle fault code, the whole vehicle controller responds to the UDS diagnosis service request, performs fault diagnosis on the vehicle to obtain the UDS diagnosis fault code, performs format conversion on the UDS diagnosis fault code, converts the UDS diagnosis fault code into the DM1 message fault code, and sends the DM1 message fault code to an instrument of the vehicle for displaying, so that the function of displaying the fault code by the instrument is realized. To achieve the above object, an embodiment of a second aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for converting a vehicle fault code as described above. To achieve the above objective, an embodiment of a third aspect of the present invention provides a vehicle controller, including a memory and a processor, where the memory stores a computer program, and when the computer program is executed by the processor, the method for converting a vehicle fault code is implemented as described above. In order to achieve the above objective, a fourth embodiment of the present invention provides