An off-line fault diagnosis system and method for vehicle instrument

By designing an offline fault diagnosis system in automobile instruments, using multiple encoding formats and definitions of parent-child fault relationships, combined with a key verification mechanism, the complexity and security issues of fault diagnosis are solved, rapid fault detection and repair are achieved, and the efficiency is improved After-sales service and user satisfaction of military vehicles.

CN113847939BActive Publication Date: 2024-09-17DONGFENG OFF ROAD VEHICLE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111160326.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2024-09-17
Estimated Expiration
2041-09-30

AI Technical Summary

Technical Problem

Existing fault diagnosis systems for automobile instrumentation have problems such as complex fault code coding, many mis-remembered phenomena, difficulty in troubleshooting, lack of fault occurrence time information records and vehicle status monitoring, and the diagnostic communication mechanism lacks safety level planning.

Method used

An offline fault diagnosis system is designed, including a fault code recording module, a fault snapshot recording module and a data monitoring module. It adopts two fault code encoding formats (SAEJ1939 protocol and improved encoding format B), supports the definition of parent-child fault relationship, and uses passwords to The key verification mechanism ensures data security and enables rapid fault detection and repair of military vehicle instruments.

Benefits of technology

It shortens the fault analysis and processing time, improves information security, improves the after-sales service satisfaction and cost-effectiveness of military vehicles, and achieves a win-win situation for end users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113847939B
    Figure CN113847939B
Patent Text Reader

Abstract

The present invention discloses an offline fault diagnosis system and method for vehicle instruments, including a fault code recording module, a fault snapshot recording module, and a data monitoring module. The fault code recording module is used to record the fault when the fault occurs; the fault snapshot recording module is used to record the driving information when the fault occurs; the data monitoring module is used to monitor the changes in instrument data in real time, and judge whether the switch input or sensor input signal has a fault through the data change. Utilizing the system and method of the present invention, the fault judgment processing time and the functional vulnerability repair time are greatly shortened, while taking into account information security, and achieving the improvement of after-sales service satisfaction and substantial reduction of after-sales costs of military vehicle manufacturers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of automobile diagnosis, and in particular relates to an off-line fault diagnosis system and method applied to vehicle instruments. Background Art

[0002] Military vehicle instruments have the following characteristics: multiple sensor signals, large functional differences caused by modified functional configurations, high reliability requirements, fast and efficient maintainability, and high data security requirements. The core of instrument diagnostic technology is to monitor status, detect faults, determine faults, warn faults, and repair faults as the main links to achieve the final closed loop, thereby ensuring that the functions of various vehicle systems are in normal state and guaranteeing the user's vehicle needs. The fault system design of automotive instruments in the industry mainly uses alarm lights to remind, sends fault messages as soon as the current fault occurs, and removes the meter and replaces parts as the main solution. It is mainly manifested in the following aspects: the fault code encoding and parsing rules are complex and misrecording occurs from time to time; fault troubleshooting is difficult, and there is a lack of relevant information records and vehicle status at the time of the fault; the diagnostic communication mechanism lacks functional division and safety level planning. Summary of the invention

[0003] This system is designed to achieve rapid fault detection and rapid repair of faulty functional problems of instrument cluster products through a rigorous offline fault diagnosis system and application upgrade process.

[0004] The offline fault diagnosis system for military automobile instruments that realizes one of the purposes of the present invention includes a fault code recording module, a fault snapshot recording module, and a data monitoring module. The fault code recording module is used to record the fault when the fault occurs. The fault code includes two coding formats, that is, the same fault is represented and stored by two fault codes; the fault snapshot recording module is used to record and store the driving information record at the time of the fault, and the driving information record includes key travel data information when the fault occurs. It consists of two parts, one part of the parameters is received and stored in real time by the instrument through the CAN bus in the vehicle, including but not limited to the battery input voltage, vehicle speed value, speed value, ignition switch state value, date and time; the other part of the parameters is the parameters calculated and recorded by its own system, including but not limited to mileage, remaining oil in the main tank, and remaining oil in the auxiliary tank; when a fault occurs, the driving information record of the first and most recent fault is recorded. The data monitoring module is used to monitor the changes in instrument data in real time, and judge whether the switch input or sensor signal has a fault through the data changes.

[0005] Furthermore, the fault code recording module also includes a fault parent-child relationship definition module, and the fault represented by the child fault code is a derivative fault of the fault represented by the parent fault code.

[0006] Furthermore, when the vehicle state is unstable, the fault code recording module will suspend recording faults, and the unstable state includes but is not limited to the state during the engine startup phase and / or within a set time after the engine startup ends.

[0007] Furthermore, the system also includes a key verification module, which is used when the external device needs to write data to the instrument and the instrument needs to verify whether the key sent by the external diagnostic device is correct.

[0008] The communication mode of the instrument includes the default security mode, the editing control mode and the programming session mode. When it is necessary to enter the editing control mode or the programming session mode, the instrument sends the seed data to the external diagnostic device. The diagnostic device calculates the corresponding key based on the seed data. The instrument checks whether the key is correct. Only when the key is correct can the instrument be written.

[0009] The off-line fault diagnosis method for military vehicle instruments to achieve the second object of the present invention is:

[0010] S1. The internal self-checking system of the instrument detects the voltage of the input signal in real time to determine whether there is a fault;

[0011] S2, storing the faults found by the internal self-checking system of the instrument in the form of fault codes in the memory;

[0012] Preferably, for the faults found by the internal self-test system of the instrument, each fault is stored in the memory in the form of two fault codes, one is a commonly used coding format, recorded as the first coding format, and the other is an improved coding format, recorded as the second coding format; compared with the first coding format, the parsing difficulty of the second coding format is reduced, and at the same time, the bits representing the fault type are expanded, thereby increasing the fault types that can be represented.

[0013] Preferably, when recording fault codes, faults are selectively recorded according to predefined parent-child relationships of faults. When a parent fault occurs, if a child fault occurs at the same time, the child fault will not be recorded. The child fault code is a derivative fault of the parent fault.

[0014] Preferably, a fault occurring when the vehicle is in an unstable state will not be recorded, wherein the unstable state includes a state during the engine startup phase or within a set time period after the engine startup ends.

[0015] Preferably, it also includes security access control. When a write operation is required to the instrument, the key needs to be checked. The instrument checks the key sent by the diagnostic device. Only when the key is correct can the external device write to the instrument.

[0016] S3. Record and store the driving information record at the time when the fault occurs.

[0017] S4. Monitor data changes in real time and determine whether there is a fault in the switch input or sensor signal based on the data changes.

[0018] S5. The instrument sends the above fault codes and driving information records to an external diagnostic device.

[0019] Furthermore, the instrument can send fault codes in two encoding methods. When the external diagnostic device supports the first encoding format, the instrument will send a message containing the fault code encoded in the first encoding format to the external diagnostic device at a fixed period; when the external diagnostic device supports the second encoding format, the external diagnostic device sends a message requesting a fault information command to the instrument. After receiving the request command, the instrument sends a message containing the fault code encoded in the second encoding format to the external diagnostic device.

[0020] By utilizing the system and method described in the present invention, the time for fault analysis and processing and the time for repairing functional vulnerabilities in the process of functional debugging and after-sales service assurance are greatly shortened, while taking into account extremely high information security, thereby achieving an improvement in the after-sales service satisfaction of military vehicle manufacturers and a substantial reduction in after-sales costs, and achieving a win-win situation that satisfies end users. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A schematic diagram of the system of the present invention;

[0022] Figure 2 Jump flow chart for the instrument cluster diagnostic communication mode;

[0023] Figure 3 Diagram of the diagnostic principle architecture of the diagnostic equipment and instrument cluster;

[0024] Figure 4 Flow chart of the instrument cluster security access mechanism;

[0025] Figure 5 Flowchart of error handling mechanism for secure access;

[0026] Figure 6 It is a security algorithm process. DETAILED DESCRIPTION

[0027] The following specific implementations are used to explain the technical solutions of the claims of the present invention so that those skilled in the art can understand the claims. The protection scope of the present invention is not limited to the following specific implementation structures. The technical solutions of the claims of the present invention made by those skilled in the art but different from the following specific implementations are also within the protection scope of the present invention.

[0028] like Figure 1The figure shows a schematic diagram of an offline fault diagnosis system for vehicle instruments according to the present invention, which includes a fault code recording module, a fault snapshot recording module, and a data monitoring module.

[0029] The fault code recording module is used to record the fault when the fault occurs. The fault code includes two coding formats: a first coding format and a second coding format. In this embodiment, the first coding format is recorded as coding format A, which can be the SPN (specific subcomponent where the fault occurs) + FMI (fault type) format recommended in the SAEJ1939 protocol, that is, the SPN+FMI format recommended in the SAEJ1939 protocol commonly used by commercial vehicles in the prior art defines the fault code DTC, SPN is a 19-bit binary number, and FMI is a 5-bit binary number. For example, assuming that the current SPN is 522540 and the FMI is 17, its coding is shown in Table 1 below:

[0030]

[0031]

[0032] Table 1

[0033] The SPN is 522540, and its corresponding binary is 1111111100100101100. The high three bits of the high byte 1112 and FMI form byte 5 (11110001), the middle byte 111110012 is placed in byte 4, and the low byte 001011002 is placed in byte 3. The displayed data stream is 0x2cF9F1.

[0034] Since the SAEJ1939 protocol originated from European and American countries, it mainly focuses on defining chassis powertrains such as engines, gearboxes, and ABS systems, and lacks accurate definitions for instrument-type body electrical components. As a result, each car company customizes its own SPN. At the same time, during the actual debugging process, the fault code is stored in the data field of the message data packet. Due to the CAN bus protocol mechanism, data exceeding eight bytes needs to be unpacked and packaged. Therefore, this type of coded DTC will often be unpacked into multiple message data, and the high 3 bits of the SPN are alone in a byte. When the byte where it is located and the other bytes of the SPN are unpacked into multiple message data, the difficulty of encoding and parsing is increased, and a protocol stack is required to implement the encoding and parsing work. In the field environment where there is a lack of program parsing, field personnel cannot complete the decoding work independently. In order to solve the problem of complex decoding while taking into account the historical parts in the past; it is necessary to adopt a more flexible and intuitive fault code encoding rule. Based on this, the present invention introduces a second encoding format, which is recorded as encoding format B in this embodiment, and its encoding rules are shown in Table 2 below:

[0035] The upper two bits of the first byte represent the current encoding format, which is set to 10 in this embodiment, indicating that the current encoding format is format B; the lower 6 bits and the middle byte of the first byte represent the specific sub-component SPN where the fault occurs, and there is a preset mapping relationship table between it and the definition of SPN recommended by the original SAEJ1939 protocol; the last byte represents the specific fault type FMI. This fault code representation is more intuitive and clear than fault code encoding format A.

[0036]

[0037] Table 2

[0038] It can be seen from Table 1 and Table 2 that coding format B can completely cover all fault type FMIs defined in coding format A, and correspond one to one with the original FMI. As shown in Table 3, the FMI in the original coding format A is 17 10 , the corresponding FMI in the existing coding format B is 0x17, and the fault types that can be represented are expanded from 31 to 255; the design of the SPN of the subcomponent where the fault is located in the original coding format A is redundant. Under the current coding format, 14 bits are sufficient to cover the types of the subcomponents where the fault is located. The new and old representation methods can be matched one by one through the preset mapping table. As shown in Table 3 below, the SPN in the original coding format A is 522540, and the corresponding SPN in the new coding format B is 4375 (010001000101112). This mapping relationship is imported into the software database of the controller to achieve one fault corresponding to two fault codes, and is compatible with the fault information storage and record reading functions of historical old parts and current parts.

[0039]

[0040] Table 3

[0041] It can also be seen from the data stream display in Table 3 that the last byte of encoding format B can intuitively show the current fault type, but the fault failure type of encoding format A is difficult to intuitively see because it forms a byte with the first 3 bits of SPN; coupled with the unpacking and assembly of the CAN bus, the entire DTC combination process is very cumbersome.

[0042] The parsing methods of the two encoding formats are as follows:

[0043] The parsing of the code is mainly completed by the diagnostic equipment. The fault information of code format A is actively pushed by the instrument according to the set period (such as 1s) with the set message ID carrying the data field (the data field contains code A information), and has a specific message ID header; Code B is obtained by the diagnostic equipment and then replied by the instrument to the request instruction, and also has a specific message ID header.

[0044] The instrument supports two diagnostic devices at the same time. If the current diagnostic device only supports the coding format A, the diagnostic device receives the message using the coding format A sent by the instrument at a fixed period and parses the current fault information. If the current diagnostic device can support the new coding format B, the diagnostic device will actively send a request command message to the instrument. After receiving the request command from the diagnostic device, the instrument sends a new message using the coding format B.

[0045] Combine the following Figure 3 Taking voltage abnormality and external equipment supporting coding format B as an example, the system architecture for fault diagnosis is described:

[0046] The internal fault detection circuit of the instrument detects abnormal voltage and transmits the analog voltage signal to the microcontroller. The microcontroller transmits the data to the MCU processor. The MCU analyzes the existence of the fault according to the internal software definition, identifies the two fault codes corresponding to the fault and stores them in the memory. When the external diagnostic instrument sends a diagnostic request command through the CAN bus, the CAN transceiver inside the instrument transmits the diagnostic communication request data to the MCU processor. The MCU processor transmits the fault information stored in the memory to the internal CAN transceiver. The internal CAN transceiver transmits the diagnostic data to the diagnostic equipment, and the human-machine interface of the diagnostic equipment displays the relevant information.

[0047] The fault snapshot recording module is used to record and store the driving information record at the time when the fault occurs, and the driving information record includes key travel data information when the fault occurs;

[0048] The driving information record at the time of the fault occurs is stored in the EPROM in the form of a fault snapshot data stream, and forms a one-to-one mapping relationship with the fault code. The data snapshot is divided into two groups: the first group is the fault snapshot information at the first time of occurrence, and the second group is the snapshot information of the most recent fault. When the fault information is stored through the diagnostic tool, it can be called and read together; the fault snapshot information is the key travel data information at the time of the fault, which consists of two parts. One part of the parameters is received and stored in real time by the instrument through the CAN bus in the car, including battery input voltage, vehicle speed value, speed value, ignition switch status value, date and time; the other part of the parameters is the parameters calculated and recorded by its own system, including mileage, remaining fuel in the main tank, and remaining fuel in the auxiliary tank.

[0049] The data monitoring module is used to monitor the changes of instrument data in real time, and judge whether the switch input and sensor input signals are correct and effective through the changes of data flow, so as to quickly locate the fault point;

[0050] The data status that can be monitored include but are not limited to: the fuel level signal value of the main and auxiliary fuel tanks, the input status of the main and auxiliary fuel tank switching switches, the front and rear air pressure signal values, and the turn signal status.

[0051] For example, manually push the turn signal downward to enable it in the on position; observe the actual lighting status of the instrument turn signal indicator light. If it is not lit, read the turn signal data stream signal value; if the turn signal status signal bit in the signal value is on at this time, it is judged and analyzed that the turn signal switch input signal is valid at this time, so as to further troubleshoot the instrument fault.

[0052] If some data cannot be directly realized by monitoring the data stream signal value, the data monitoring module can also be an external diagnostic device. For example, the speed monitoring sends a tachometer drive command to the instrument through the CAN tool to drive the tachometer to rotate, and at the same time monitors whether the tachometer pointer responds and rotates correctly, and further realizes the function detection of the tachometer stepper motor.

[0053] The fault code recording module also includes a fault code parent-child relationship definition module, and the fault represented by the child fault code is a derivative fault of the fault represented by the parent fault code.

[0054] When many faults occur at the same time, some of them are not the root cause of the current fault, but are derived from other faults, such as:

[0055] When the instrument detects a fault of too high battery voltage, other controller node loss faults (such as ABS signal loss) may also occur at this time, but this type of fault is a derivative fault caused by the system power supply voltage being too high. After the voltage overload fault is resolved, the corresponding ABS signal loss fault will generally disappear. Therefore, "system power supply voltage is too high" and "ABS signal loss" are parent-child relationships. "System power supply voltage is too high" is the parent fault of "ABS signal loss", and "ABS signal loss" is the child fault of "system power supply voltage is too high";

[0056] When the instrument detects a BUS OFF fault, since the entire bus is in the BUS OFF state at this time, according to the error mechanism of the CAN bus, each controller will turn off its signal transceiver, then other signal loss faults will also occur at this time, but these signal loss faults are all caused by the BUS OFF fault, so other signal loss faults are sub-faults of the BUSOFF fault.

[0057] When a frame timeout fault occurs in the ABS controller, since the signal of the ABS controller is used for speedometer display, the frame timeout of the ABS controller will inevitably cause the speedometer function to fail. Therefore, the speedometer function failure fault is a sub-fault of the ABS controller frame timeout.

[0058] Therefore, the root cause fault that caused the current fault is recorded as the parent fault, and the faults derived from the parent fault are recorded as child faults. The parent-child relationship between faults is preset by the system and can be adjusted according to actual needs.

[0059] Usually, the occurrence of a parent fault will inevitably lead to the occurrence of a child fault, and the occurrence of the two will have a sequence relationship depending on the actual situation; if the child fault occurs first and the parent fault does not occur, the system will determine that the child fault is the real fault and record the fault code; if the parent fault occurs, followed by all the child faults with clear parent-child relationships, in order to avoid such faults causing misjudgment and interference to maintenance personnel, only the parent fault code is recorded, and the fault state of the child fault is determined to be suspended, and the fault code is not recorded.

[0060] The fault code recording module also includes a pause module for pausing the recording of faults when the vehicle state is unstable. The unstable state includes the state within a set time period during the engine startup phase or after the engine startup ends. The set time period may not exceed 5 seconds.

[0061] During the engine startup phase and within the set time after the engine starts, the battery voltage will be in a large jump and drop moment. Based on long-term experience, this stage should be considered to be in an unstable state. The instrument can detect faults, but the faults detected in this stage should be in a pre-judgment suspension state. After exceeding the set time, the instrument MCU will analyze the detection results of the detection circuit to determine whether to generate a fault code and record and store it.

[0062] The system also includes a key verification module, which is used when an external device needs to write data to the meter. The meter needs to verify whether the key sent by the external diagnostic device is correct. The meter can only be written if the key is correct.

[0063] like Figure 2 As shown, the communication modes of the instrument include the default security mode, the edit control mode and the programming session mode. The edit control mode and the programming session mode require a verification key.

[0064] Each session mode realizes different functions: 1. Default safety mode, the instrument cluster automatically enters this mode after power-on, in this mode, it can realize fault data communication, dynamic and static data are called to read and send, fault data is cleared and other functions; 2. Basic editing control mode, in this communication session mode, it can realize the writing and deletion operations of the internal data of the instrument cluster; and by receiving the diagnostic data command, it can drive the internal load or actuator of the instrument cluster to perform the action test; 3. Programming session mode: that is, the application upgrade mode.

[0065] The following embodiment describes the method for offline fault diagnosis of vehicle instruments according to the present invention, comprising the following steps:

[0066] S1. The internal self-checking system of the instrument detects the status of the input signal in real time to determine whether there is a fault;

[0067] The instrument's internal self-detection system detects its input status in real time. The detection content includes but is not limited to: power supply voltage, status of bus signal receiving nodes (engine controller, anti-lock controller, body controller, transmission controller, transfer case controller), hard-wire sensor input status monitoring (front and rear hydraulic sensors, oil level sensor).

[0068] The power supply voltage is usually too low or too high, and it is monitored and judged according to the rated voltage UA range. The bus signal failure is mainly whether the input receiving node signal is lost. The judgment basis is whether the valid message sent by the node is received within N times the message period. The message reception status is monitored by the CAN transceiver. The N times the message period can be 5 times the period, not limited to this value; the fault of the sensor input state is generally judged by detecting the level state. For example, if the design is a high level, but the actual reading is a low level, it is judged that there is a fault.

[0069] The definition principle of node timeout fault is shown in Table 4:

[0070] Nominal cycle Node timeout determination 10-100ms ≥T*10 Node timeout 100ms-500ms ≥T*5 Node timeout 500ms or more ≥T*3 Node timeout

[0071] Table 4

[0072] S2. The faults found by the internal self-checking system of the instrument are stored in the form of fault codes. The fault codes include two types: one encoding format is the SPN+FMI format recommended in the SAEJ1939 protocol, and the other encoding format is the encoding format B which is an improvement on the above encoding method;

[0073] When recording fault codes, according to the pre-defined parent-child relationship of the fault codes, that is, when a parent fault code appears, if a child fault code appears at the same time, the child fault code will not be recorded, and the fault represented by the child fault code is a derivative fault of the fault represented by the parent fault code.

[0074] Faults that occur when the vehicle is in an unstable state will not be recorded. The unstable state includes the state during the engine startup phase or within a set time after the engine startup ends. The set time can be no longer than 5 seconds, but is not limited to this value. At this time, the battery voltage will be in a large jump voltage drop moment. Based on long-term experience, this stage should be considered to be in an unstable state. The instrument can detect faults, but the faults detected at this stage should be in a pre-judgment suspension state. After exceeding the set time, the instrument MCU will analyze the detection results of the detection circuit to determine whether to generate a fault code and record and store it.

[0075] Preferably, it also includes switching of the instrument communication mode. When writing and deleting operations are required on the instrument, the instrument mode needs to be switched to the editing control mode through diagnostic communication commands and security access mechanism. The editing control mode can perform read and write operations on the instrument.

[0076] S3. Record and store the driving information record at the time when the fault occurs.

[0077] The driving information record includes: fault snapshot information when the fault occurs for the first time and the most recent time.

[0078] The fault snapshot information is the key travel data information at the time when the fault occurs, which includes two parts. One part of the parameters is received and stored in real time by the instrument through the CAN bus in the vehicle, including but not limited to the battery input voltage, vehicle speed value, rotation speed value, ignition switch status value, date and time; the other part of the parameters is the parameters calculated and recorded by its own system, including but not limited to mileage, remaining fuel amount in the main tank, and remaining fuel amount in the auxiliary tank.

[0079] S4. Monitor data changes in real time and determine whether there is a fault in the switch input or sensor signal based on the data changes.

[0080] The data that can be monitored include but are not limited to the oil level signal value of the main and auxiliary fuel tanks, the input status of the main and auxiliary fuel tank switching switches, and the front and rear air pressure signal values. By monitoring the changes in this data, it is possible to determine whether the switch input and sensor input signals are correct and effective, and quickly locate the fault point.

[0081] Some faults cannot be judged by directly monitoring the data flow, such as the speed judgment, so it is necessary to write to the instrument through external diagnostic equipment to determine whether there is a fault. In order to ensure data security, a set of information security protection strategies are designed. The main aspects are as follows: 1) Introduction of security access mechanism; 2) Division of security levels; 3) Application of security algorithms; 4) Access error handling mechanism.

[0082] There are two states for the instrument cluster: 1. Locked state: the application is executed normally, the diagnosis reads the data stream, reads the DTC and related data information; 2. Unlocked state: data can be written and the transmission data package can be downloaded.

[0083] Security access and security level: Security access levels are divided into LEVEL1 and LEVEL2; LEVEL1 is used to write data to the instrument cluster and unlock the internal application of the instrument cluster during the driving function test. Figure 4 As shown, the method uses a polynomial function formula A to calculate the key to unlock the instrument cluster; LEVEL2 level is used to implement a secure access method for downloading program data packages for upgrading the instrument cluster application. This method uses another polynomial function formula B to calculate the key to unlock the instrument cluster, which will not be further elaborated here.

[0084] Combine the following Figure 4 , Figure 5 and Figure 6 Describe the steps for the diagnostic device to access the instrument safely:

[0085] Step 1: The diagnostic device sends a request command to the instrument to enter the edit control mode;

[0086] Step 2: The instrument reads the current status. If it is unlocked, go to step 4; if it is locked, go to step 3.

[0087] Step 3: After receiving the request command, the instrument replies to agree to enter the basic editing control mode;

[0088] Step 4: The diagnostic device sends a command to the instrument requesting to unlock the security level LEVEL1;

[0089] Step 5: After receiving the above instruction, the instrument sends seed data A to the diagnostic instrument. The seed data A is randomly generated by the instrument and has a length of 4 bytes.

[0090] Step 6: The diagnostic device calculates the key B based on the seed data A through a specific algorithm and sends it to the instrument. Figure 6 Describing this specific algorithm in this embodiment:

[0091] Step 6.1, perform an XOR operation on each byte of the seed data A and a specific mask to obtain 4 sets of intermediate data, recorded as Cal[i] (i=1, 2, 3, 4), and the mask is defined and allocated by the host manufacturer;

[0092] Step 6.2, perform a bitwise AND operation on Cal[0] and 0x0e, then shift left 3 bits to get the intermediate data KeyA; perform a bitwise AND operation on Cal[3] and 0xd0, then shift right 3 bits to get KeyB; perform a bitwise OR operation on KeyA and KeyB to get the 0th byte of the key Key[0];

[0093] Step 6.3, perform a bitwise AND operation on Cal[1] and 0x0e, then shift left 4 bits to get the intermediate data KeyA; perform a bitwise AND operation on Cal[3] and 0xd0, then shift right 4 bits to get KeyB; perform a bitwise OR operation on KeyA and KeyB to get the first byte of the key Key[1];

[0094] Step 6.4, perform a bitwise AND operation on Cal[2] and 0x1d, then shift left 2 bits to get the intermediate data KeyA; perform a bitwise AND operation on Cal[0] and 0xd1, then shift right 2 bits to get KeyB; perform a bitwise OR operation on KeyA and KeyB to get the second byte of the key Key[2];

[0095] Step 6.5, perform a bitwise AND operation on Cal[2] and 0x0e, then shift left 3 bits to get the intermediate data KeyA; perform a bitwise AND operation on Cal[1] and 0xd0, then shift right 3 bits to get KeyB; perform a bitwise OR operation on KeyA and KeyB to get the third byte of the key Key[3];

[0096] Step 6.6, assemble Key[3]~Key[0] obtained in the above steps into key B, and send it to the instrument via the CAN bus;

[0097] Step 7: The instrument compares the legality of key B. If it is illegal, the error count is increased by 1 and the key is replied to be illegal. If it is legal, the error count is cleared, the reply is written in agreement, and the instrument status is set to unlocked.

[0098] Access error handling mechanisms such as Figure 5 As shown: Each time the instrument cluster receives an invalid key, the error counter counts to 1 and accumulates in sequence. After the error counter counts to 3, when the instrument cluster is accessed by the diagnostic tool again, the instrument cluster will respond with a delay, and the delay time may be 10s; after the delay penalty, the error counter is reduced by 1, and the error counter is cleared when the correct key is successfully unlocked.

[0099] Step 8: After the diagnostic device receives the instruction of writing consent from the instrument, the diagnostic device can send data to the instrument.

[0100] Step 9: After the data is written, the diagnostic device sends a command to the meter indicating that the data is written, and the meter sets the state to the locked state.

[0101] For safety reasons, the instrument sends heartbeat messages at a fixed frequency. After receiving the heartbeat message, the external device needs to reply to it. The fixed frequency can be 5s, but is not limited to this value. If the instrument does not receive a reply message from the diagnostic device within 5 times the message period (not limited to this value), it is considered that the message has timed out and the current node has a fault. If the message times out for multiple consecutive times, it is considered that the connection with the diagnostic device is disconnected, and the instrument automatically sets the status to a locked state. The multiple consecutive times can be 3 consecutive times, but is not limited to this value.

[0102] S5. The instrument sends the fault information and driving information records to the external diagnostic equipment.

Claims

1. An off-line fault diagnosis system for vehicle instruments, characterized in that: It includes a fault code recording module, a fault snapshot recording module, and a data monitoring module. The fault code recording module is used to record the fault when the fault occurs; the fault snapshot recording module is used to record the driving information when the fault occurs; the data monitoring module is used to monitor the changes in instrument data in real time, and judge whether there is a fault in the switch input or sensor input signal through the data changes; The same fault is stored in the memory in the form of fault codes in two different coding formats, one coding format is a first coding format, and the other coding format is a second coding format; The first encoding format is the SPN+FMI format recommended in the SAEJ1939 protocol; The encoding rules of the second encoding format include: The upper two bits of the first byte represent the current encoding format, the lower 6 bits of the first byte and the middle byte represent the specific subcomponent SPN where the fault occurs, and there is a preset mapping relationship table between the SPN and the original definition of the first encoding format; the last byte represents the specific fault type FMI, and the second encoding format completely covers all fault type FMIs defined in the first encoding format, and has a one-to-one correspondence with the original FMI; The communication modes of the instrument include default security mode, edit control mode and programming session mode. The edit control mode and programming session mode require verification keys. Each session mode realizes different functions:

1. Default safety mode, which is automatically entered after the instrument cluster is powered on. In this mode, fault data communication, dynamic and static data can be called, read and sent, and fault data can be cleared; 2. Basic editing control mode, in this communication session mode, the writing and deletion operations of the internal data of the instrument cluster can be realized; and the internal load or actuator of the instrument cluster can be driven by receiving the diagnostic data command to perform the action test; 3. Programming session mode: that is, the application upgrade mode; Methods for judging whether a switch input or sensor input signal has a fault by data changes include: Step 1: The diagnostic device sends a request command to the instrument to enter the edit control mode; Step 2: The instrument reads the current status. If it is unlocked, go to step 4; if it is locked, go to step 3. Step 3: After receiving the request command, the instrument replies to agree to enter the basic editing control mode; Step 4: The diagnostic device sends a command to the instrument requesting to unlock the security level LEVEL1; Step 5: After receiving the above instruction, the instrument sends seed data A to the diagnostic instrument. The seed data A is randomly generated by the instrument and has a length of 4 bytes. Step 6: The diagnostic device calculates the key B based on the seed data A through a specific algorithm and sends it to the instrument, including: Step 6.1, perform an XOR operation on each byte of the seed data A and a specific mask to obtain 4 sets of intermediate data, recorded as Cal[i] (i=1, 2, 3, 4), and the mask is defined and allocated by the host manufacturer; Step 6.2, perform a bitwise AND operation on Cal[0] and 0x0e, then shift left 3 bits to get the intermediate data KeyA; perform a bitwise AND operation on Cal[3] and 0xd0, then shift right 3 bits to get KeyB; perform a bitwise OR operation on KeyA and KeyB to get the 0th byte of the key Key[0]; Step 6.3, perform a bitwise AND operation on Cal[1] and 0x0e, then shift left 4 bits to get the intermediate data KeyA; perform a bitwise AND operation on Cal[3] and 0xd0, then shift right 4 bits to get KeyB; perform a bitwise OR operation on KeyA and KeyB to get the first byte of the key Key[1]; Step 6.4, perform a bitwise AND operation on Cal[2] and 0x1d, then shift left 2 bits to get the intermediate data KeyA; perform a bitwise AND operation on Cal[0] and 0xd1, then shift right 2 bits to get KeyB; perform a bitwise OR operation on KeyA and KeyB to get the second byte of the key Key[2]; Step 6.5, perform a bitwise AND operation on Cal[2] and 0x0e, then shift left 3 bits to get the intermediate data KeyA; perform a bitwise AND operation on Cal[1] and 0xd0, then shift right 3 bits to get KeyB; perform a bitwise OR operation on KeyA and KeyB to get the third byte of the key Key[3]; Step 6.6, assemble Key[3]~Key[0] obtained in the above steps into key B, and send it to the instrument via the CAN bus; Step 7: The instrument compares the legality of key B. If it is illegal, the error count is increased by 1 and the key is replied to be illegal. If it is legal, the error count is cleared, the reply is written in agreement, and the instrument status is set to unlocked. Step 8: After the diagnostic device receives the instruction of consent to write from the instrument, the diagnostic device can send data to the instrument; Step 9: After the data is written, the diagnostic device sends a command to the meter indicating that the data is written, and the meter sets the state to the locked state; The instrument sends heartbeat messages at a fixed frequency. After receiving the heartbeat messages, the external device needs to reply to them. If the instrument does not receive a reply message from the diagnostic device within multiple message periods, it is considered that the message has timed out and the current node has a fault. If the message times out multiple times in a row, it is considered that the connection with the diagnostic device is disconnected, and the instrument automatically sets the status to locked.

2. The off-line fault diagnosis system for vehicle instrumentation according to claim 1, characterized in that: The fault code recording module also includes a fault parent-child relationship definition module, and the fault represented by the child fault code is a derivative fault of the fault represented by the parent fault code.

3. The off-line fault diagnosis system for vehicle instrumentation according to claim 1, characterized in that: When the vehicle state is unstable, the fault code recording module will stop recording faults, and the unstable state includes the state during the engine startup phase and / or within a set time after the engine startup ends.

4. An off-line fault diagnosis method for automobile instruments based on the system of claim 1, characterized in that: The steps include: S1. The internal self-checking system of the instrument detects the status of the input signal in real time to determine whether there is a fault; S2, storing the faults found by the internal self-checking system of the instrument in the form of fault codes in the memory; S3, record and store the driving information record at the time when the fault occurs; S4, monitor data changes in real time, and judge whether there is a fault in the switch input or sensor signal through data changes; S5. The instrument sends the above fault codes and driving information records to an external diagnostic device.

5. The off-line fault diagnosis method for automobile instrument according to claim 4, characterized in that: After the internal self-checking system of the instrument finds a fault in step S2, the same fault is stored in the memory in the form of fault codes in two different coding formats, one coding format is a first coding format, and the other coding format is a second coding format.

6. The off-line fault diagnosis method for automobile instrument according to claim 5, characterized in that: When the external diagnostic device supports the first coding format, the instrument actively sends a message with a fault code encoded in the first coding format to the external diagnostic device at a fixed period; when the external diagnostic device supports the second coding format, the external diagnostic device sends a message requesting a fault information command to the instrument, and after receiving the request command, the instrument sends a message with a fault code encoded in the second coding format to the external diagnostic device.

7. The off-line fault diagnosis method for automobile instrument according to claim 4, characterized in that: Step S2 also includes selectively recording faults according to the predefined parent-child relationship of faults. When a parent fault occurs, if a child fault occurs at the same time, the child fault will not be recorded. The child fault code is a derivative fault of the parent fault.

8. The off-line fault diagnosis method for automobile instrument according to claim 4, characterized in that: Step S2 also includes that a fault occurring when the vehicle is in an unstable state will not be recorded, and the unstable state includes a state during the engine starting phase or within a set time after the engine starts.

9. The off-line fault diagnosis method for automobile instrument according to claim 4, characterized in that: It also includes security access control. When writing to the instrument is required, the key must be verified before writing to the instrument.