A time parameter testing method, device, equipment and medium for diagnostic fault codes
By controlling the target function state change and reading the diagnostic trouble code state within a preset time period, the problem of large error in the diagnostic trouble code time parameter test in the prior art is solved, and accurate time parameter measurement is achieved.
Patent Information
- Application Number
- CN202310911853.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-24
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2043-07-24
AI Technical Summary
The existing technology has large errors when testing the time parameters of diagnostic fault codes on a test bench, and it is impossible to accurately determine whether the time parameters meet the test requirements.
By controlling the target function state change before and after the preset time period and sending a diagnostic request to the electronic control unit to be tested, the first state and second state of the diagnostic fault code are read. If the first state is the target state and the second state is the preset state, it is determined that the preset time period meets the test requirements.
It achieves accurate measurement of the time parameters of the diagnostic trouble code, eliminates the deviation caused by the internal processing time of the software and the response to the diagnostic reply, and controls the error within one message cycle.
Smart Images

Figure CN116700226B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle diagnosis, and in particular to a method, device, equipment and medium for testing time parameters of a diagnostic fault code. Background Art
[0002] Diagnostic trouble codes (DTCs) are used to determine the vehicle's technical condition, pinpoint the fault location, and perform an inspection without disassembling the vehicle. DTC time parameters include the fault maturation period and the fault recovery period. The fault maturation period is the time from when the fault occurs until the DTC is stored in memory. The fault recovery period is the time it takes for the DTC status to change from the current state to the historical state after the fault has resolved.
[0003] When testing DTCs on a test bench, the conditions for triggering the DTC are created. The DTC in the electronic control unit (ECU) under test is read periodically, starting with the time the fault occurs. The DTC is read until the DTC is read. The current time is recorded, and then the starting time is subtracted to remove a certain amount of time deviation, which is considered the DTC's fault maturation time period. Because of the time deviation, the fault maturation time period, whether correct or not, will amplify the correct value range. The deviation time includes the running time of the software's internal processing logic; the time spent on the diagnostic response to reading the DTC; and the error introduced by the reading interval size when reading the DTC periodically. Furthermore, the same problem exists when testing the DTC's fault recovery time period.
[0004] In summary, how to accurately test the time parameters of the diagnostic trouble code to further determine whether the time parameters meet the test requirements is a problem that needs to be solved. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for testing the time parameters of diagnostic trouble codes, which can accurately test the time parameters of diagnostic trouble codes to further determine whether the time parameters meet the test requirements. The specific scheme is as follows:
[0006] In a first aspect, the present application discloses a time parameter testing method for a diagnostic trouble code, which is applied to a diagnostic device, comprising:
[0007] Determining a preset time period corresponding to a target function set in the electronic control unit to be tested; the preset time period is the time required for a diagnostic trouble code corresponding to the target function to change from a target state to a preset state;
[0008] Controlling the target function to change its current functional state before the preset time period, and sending a diagnostic request to the electronic control unit to be tested to read a first state of a current diagnostic trouble code;
[0009] After the preset time period, controlling the target function to change the current functional state, and sending a diagnostic request to the electronic control unit to be tested to read the second state of the current diagnostic trouble code;
[0010] If the first state is the target state and the second state is the preset state, it is determined that the preset time period meets the test requirement.
[0011] Optionally, controlling the target function to change its current functional state before the preset time period includes:
[0012] Controlling the target function to change its current functional state in a message period before the preset time period;
[0013] Accordingly, controlling the target function to change its current functional state after the preset time period includes:
[0014] The target function is controlled to change its current functional state in a message period following the preset time period.
[0015] Optionally, the preset time period includes a fault maturity time period and a fault recovery time period, and the functional state includes a fault state and a non-fault state.
[0016] Optionally, the fault maturation time period is the time required for the diagnostic trouble code corresponding to the target function to change from an untriggered state to a current state;
[0017] Correspondingly, if the first state is the target state and the second state is the preset state, determining that the preset time period meets the test requirement includes:
[0018] If the first state is an untriggered state and the second state is a current state, it is determined that the fault maturity time period meets the test requirement.
[0019] Optionally, the fault recovery time period is the time required for the diagnostic trouble code corresponding to the target function to change from a current state to a historical state;
[0020] Correspondingly, if the first state is the target state and the second state is the preset state, determining that the preset time period meets the test requirement includes:
[0021] If the first state is a current state and the second state is a historical state, it is determined that the fault recovery time period meets the test requirement.
[0022] Optionally, controlling the target function to change a current functional state includes:
[0023] When the preset time period is a fault mature time period, controlling the current functional state of the target function to change from a fault state to a non-fault state;
[0024] When the preset time period is a fault recovery time period, the current functional state of the target function is controlled to change from a non-fault state to a fault state.
[0025] Optionally, after sending the diagnostic request to the electronic control unit to be tested, the method further includes:
[0026] Obtain the current diagnostic trouble code replied by the electronic control unit under test, and determine the corresponding status information according to the target bit of the current diagnostic trouble code; wherein, the status information includes a first state and a second state. If the electronic control unit under test replies that there is no current diagnostic trouble code, the corresponding status information is an untriggered state.
[0027] In a second aspect, the present application discloses a time parameter testing device for a diagnostic fault code, which is applied to a diagnostic device, comprising:
[0028] a time period determination module, configured to determine a preset time period corresponding to a target function set in the electronic control unit to be tested; the preset time period being the time required for a diagnostic trouble code corresponding to the target function to change from a target state to a preset state;
[0029] a first state reading module, configured to control the target function to change its current function state before the preset time period, and send a diagnostic request to the electronic control unit to be tested to read a first state of a current diagnostic trouble code;
[0030] a second state reading module, configured to control the target function to change its current function state after the preset time period, and send a diagnostic request to the electronic control unit to be tested to read a second state of a current diagnostic trouble code;
[0031] The judgment module is configured to judge whether the preset time period meets the test requirement if the first state is the target state and the second state is the preset state.
[0032] In a third aspect, the present application discloses an electronic device, comprising:
[0033] Memory, used to store computer programs;
[0034] The processor is used to execute the computer program to implement the steps of the time parameter testing method of the diagnostic trouble code disclosed above.
[0035] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned disclosed method for testing time parameters of diagnostic fault codes are implemented.
[0036] It can be seen that in this application, the preset time period corresponding to the target function set in the electronic control unit to be tested is determined by the diagnostic equipment; the preset time period is the time required for the diagnostic trouble code corresponding to the target function to change from the target state to the preset state; before the preset time period, the target function is controlled to change the current functional state, and a diagnostic request is sent to the electronic control unit to be tested to read the first state of the current diagnostic trouble code; after the preset time period, the target function is controlled to change the current functional state, and a diagnostic request is sent to the electronic control unit to be tested to read the second state of the current diagnostic trouble code; if the first state is the target state and the second state is the preset state, it is determined that the preset time period meets the test requirements. As can be seen, in the present application, a preset time period corresponding to the target function set in the electronic control unit to be tested is pre-determined. The preset time period refers to the time required for the diagnostic trouble code corresponding to the target function to change from the target state to the preset state. Then, before the preset time period, the target function is controlled to change to the current functional state, and a diagnostic request is sent to the electronic control unit to be tested to read the first state of the current diagnostic trouble code. After the preset time period, the target function is controlled to change to the current functional state, and a diagnostic request is sent to the electronic control unit to be tested to read the second state of the current diagnostic trouble code. If the first state is the target state and the second state is the preset state, it is determined that the preset time period of the diagnostic trouble code meets the test requirements. In this way, by reading the states of the diagnostic trouble code before and after the preset time period in two tests, the present application can accurately measure the time parameters of the diagnostic trouble code to further determine whether the time parameters meet the test requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0038] Figure 1A schematic diagram of a DTC fault maturity time period currently tested disclosed in this application;
[0039] Figure 2 A schematic diagram of a current test DTC fault recovery time period disclosed in this application;
[0040] Figure 3 This is a flow chart of a time parameter testing method for a diagnostic trouble code disclosed in this application;
[0041] Figure 4 A schematic diagram of communication between a diagnostic device and an electronic control unit disclosed in this application;
[0042] Figure 5 This is a flow chart of a method for testing a fault maturity time period disclosed in this application;
[0043] Figure 6 This is a schematic diagram of a specific test DTC fault maturity time period disclosed in this application;
[0044] Figure 7 This is a flow chart of a method for testing a fault recovery time period disclosed in this application;
[0045] Figure 8 This is a schematic diagram of a specific DTC fault recovery time period tested in this application;
[0046] Figure 9 This is a schematic structural diagram of a time parameter testing device for a diagnostic trouble code disclosed in this application;
[0047] Figure 10 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0049] Currently, when testing DTCs on a test bench, the triggering conditions are created. Starting with the fault occurrence time, DTCs are read periodically until a DTC is read. The current time is recorded and then subtracted from the starting time to eliminate a certain amount of time deviation, which is considered the DTC's fault maturation period. However, due to this time deviation, the correct value range of the fault maturation period is often widened. This deviation includes the runtime of the software's internal processing logic, the time it takes to recover from the DTC reading, and errors introduced by the interval between readings during the periodic DTC reading. The same issue also arises when testing the DTC's fault recovery period.
[0050] For example, the message cycle is 10ms, the DTC fault maturity time cycle is 10 message cycles, and the fault recovery time cycle is 5 message cycles. For details, see Figure 1 and Figure 2 As shown in . In the existing solution, when a fault occurs, that is, after an error is made, the diagnostic equipment will continuously read the DTC to test the fault maturation time period. After recovery, it will continuously read the DTC to test the fault recovery time period. However, when testing according to the existing solution, the tested time parameters will be delayed by T1+T2. T1 is the delay caused by the software in the patrol processing process, which is approximately between 10 and 20ms; T2 is the delay of the diagnostic response after sending the diagnostic request, which is approximately more than 50ms. To this end, the embodiment of the present application discloses a time parameter testing method, device, equipment and medium for diagnostic fault codes, which can accurately test the time parameters of diagnostic fault codes to further determine whether the time parameters meet the test requirements.
[0051] See also Figure 3 As shown, the embodiment of the present application discloses a time parameter testing method for a diagnostic fault code, which is applied to a diagnostic device. The method includes:
[0052] Step S11: determining a preset time period corresponding to a target function set in the electronic control unit to be tested; the preset time period is the time required for the diagnostic trouble code corresponding to the target function to change from a target state to a preset state.
[0053] In this embodiment, a preset time period corresponding to a target function, which is pre-set in the electronic control unit under test, is determined. It should be noted that the preset time period is a pre-defined standard value. The preset time period refers to the time it takes for a diagnostic trouble code corresponding to the target function to change from a target state to a preset state. The preset time period specifically includes a fault maturation time period and a fault recovery time period.
[0054] In one specific embodiment, after establishing communication with the electronic control unit to be tested, the diagnostic device can obtain the preset time period corresponding to the target function set in the electronic control unit to be tested; in another specific embodiment, a correspondence table can be established in advance locally in the diagnostic device, in which the preset time periods corresponding to different functions of different electronic control units are recorded. Then, after determining the functional information of the electronic control unit currently to be tested, the corresponding preset time period can be determined.
[0055] Step S12: controlling the target function to change its current functional state before the preset time period, and sending a diagnostic request to the electronic control unit to be tested to read the first state of the current diagnostic trouble code.
[0056] In this embodiment, the target function is controlled to change its current functional state before a preset time period, and a diagnostic request is sent to the electronic control unit under test to read the first state of the current diagnostic trouble code. It should be noted that the above functional states include fault states and non-fault states. That is, if the current functional state of the target function is a fault state, it is controlled to change to a non-fault state; if the current functional state of the target function is a non-fault state, it is controlled to change to a fault state.
[0057] Step S13: After the preset time period, the target function is controlled to change its current functional state, and a diagnostic request is sent to the electronic control unit to be tested to read the second state of the current diagnostic trouble code.
[0058] In this embodiment, after a preset time period, the target function is controlled to change its current functional state, and a diagnostic request is sent to the electronic control unit under test to read the second state of the current diagnostic fault code. It should be noted that the diagnostic device communicates with the ECU under test via the CAN (Controller Area Network) bus. The diagnostic device is equipped with a body message simulation module, an automatic test script module, a diagnostic protocol module, and a CAN communication module. Figure 4 shown.
[0059] In a specific embodiment, after sending the diagnostic request to the electronic control unit to be tested, the method further includes: obtaining the current diagnostic fault code replied by the electronic control unit to be tested, and determining the corresponding status information according to the target bit of the current diagnostic fault code; wherein, the status information includes a first state and a second state, and if the electronic control unit to be tested replies that there is no diagnostic fault code at present, the corresponding status information is an untriggered state. That is, after the diagnostic device sends a diagnostic request to the electronic control unit under test, it obtains the current diagnostic trouble code returned by the electronic control unit under test. The diagnostic trouble code consists of 8 bits. The corresponding state information can be determined through the target bit of the current diagnostic trouble code, that is, the first state read before the preset time period and the second state read after the preset time period can be determined. Among them, the target bit refers to the 1st and 4th bits of the diagnostic trouble code, that is, bit0 and bit3. If bit0 and bit3 are both 1, it means that the target function is still in a fault state, and the diagnostic trouble code is still in the current state; if bit0 is 0 and bit3 is 1, it means that the fault has occurred but is no longer continuing, that is, the target function is in a fault-free state, and the diagnostic trouble code is in a historical state. In addition, if the electronic control unit under test replies that there is no current diagnostic trouble code, it means that the current diagnostic trouble code has not been triggered, and the corresponding state information is an untriggered state.
[0060] Step S14: If the first state is the target state, and the second state is the preset state, it is determined that the preset time period meets the test requirement.
[0061] In this embodiment, the preset time period refers to the time it takes for a diagnostic trouble code corresponding to a target function to change from a target state to a preset state. Therefore, if the first state of a diagnostic trouble code read before the preset time period is the target state, and the first state of a diagnostic trouble code read after the preset time period is the preset state, then the preset time period satisfies the test requirements and conforms to the definition. Otherwise, under other state combinations, the preset time period does not meet the test requirements and does not conform to the definition.
[0062] It can be seen that in this application, the preset time period corresponding to the target function set in the electronic control unit to be tested is determined by the diagnostic equipment; the preset time period is the time required for the diagnostic trouble code corresponding to the target function to change from the target state to the preset state; before the preset time period, the target function is controlled to change the current functional state, and a diagnostic request is sent to the electronic control unit to be tested to read the first state of the current diagnostic trouble code; after the preset time period, the target function is controlled to change the current functional state, and a diagnostic request is sent to the electronic control unit to be tested to read the second state of the current diagnostic trouble code; if the first state is the target state and the second state is the preset state, it is determined that the preset time period meets the test requirements. As can be seen, in the present application, a preset time period corresponding to the target function set in the electronic control unit to be tested is pre-determined. The preset time period refers to the time required for the diagnostic trouble code corresponding to the target function to change from the target state to the preset state. Then, before the preset time period, the target function is controlled to change to the current functional state, and a diagnostic request is sent to the electronic control unit to be tested to read the first state of the current diagnostic trouble code. After the preset time period, the target function is controlled to change to the current functional state, and a diagnostic request is sent to the electronic control unit to be tested to read the second state of the current diagnostic trouble code. If the first state is the target state and the second state is the preset state, it is determined that the preset time period of the diagnostic trouble code meets the test requirements. In this way, by reading the states of the diagnostic trouble code before and after the preset time period in two tests, the present application can accurately measure the time parameters of the diagnostic trouble code to further determine whether the time parameters meet the test requirements.
[0063] See also Figure 5 As shown, the embodiment of the present application discloses a specific time parameter testing method for diagnostic trouble codes. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically, it includes:
[0064] Step S21: determining a fault maturation time period corresponding to a target function set in the electronic control unit to be tested; the fault maturation time period is the time required for a diagnostic trouble code corresponding to the target function to change from an untriggered state to a current state.
[0065] In this embodiment, the fault maturation time period corresponding to the target function set in the ECU under test is determined. The fault maturation time period is the time required for the diagnostic trouble code corresponding to the target function to change from an untriggered state to a current state. For example, if the fault maturation time period is 10 message cycles, then according to the above definition, the diagnostic trouble code should be read and in the current state after 10 message cycles.
[0066] Step S22: in a message period before the fault maturation time period, controlling the current functional state of the target function to change from a fault state to a non-fault state, and sending a diagnostic request to the electronic control unit to be tested to read the first state of the current diagnostic fault code.
[0067] In this embodiment, the current function state of the target function is controlled to change from the fault state to the non-fault state in the message cycle before the fault maturity time period. For example, the fault maturity time period defined as 10 message cycles is used. Figure 6 As shown, after 9 message cycles of error generation, the error generation stops, that is, the functional state of the control target function at this time changes from the fault state to the non-fault state, and then a diagnostic request is sent to the electronic control unit to be tested to read the first state of the current diagnostic fault code.
[0068] Step S23: in a message cycle after the fault maturation time period, controlling the current functional state of the target function to change from a fault state to a non-fault state, and sending a diagnostic request to the electronic control unit to be tested to read the second state of the current diagnostic fault code.
[0069] In this embodiment, specifically, the current functional state of the target function is controlled to change from the fault state to the non-fault state in the message cycle after the fault maturity time period. For example, the defined fault maturity time period is 10 message cycles. Figure 6 As shown, after 11 message cycles of error generation, the error generation stops, that is, the functional state of the control target function at this time changes from the fault state to the non-fault state, and then a diagnostic request is sent to the electronic control unit to be tested to read the second state of the current diagnostic fault code.
[0070] Step S24: If the first state is an untriggered state and the second state is a current state, it is determined that the fault maturity time period meets the test requirements.
[0071] In this embodiment, if the ECU under test responds that there is no current diagnostic trouble code in the message cycle before the fault maturation time period, that is, the current diagnostic trouble code read is in the untriggered state, and the current diagnostic trouble code read in the message cycle after the fault maturation time period is in the current state, then it can be determined that the fault maturation time period meets the test requirements. Taking the aforementioned example, if the DTC is untriggered after 9 message cycles of error, and the DTC is triggered and in the current state after 11 message cycles of error, it can be said that the fault maturation time period of the DTC is 10 message cycles, and the error is controlled within one message cycle. That is, through the technical solution of this application, the time accuracy can be controlled within one message cycle, eliminating the deviation caused by the internal processing time deviation of the software and the response to the diagnostic reply.
[0072] Furthermore, only when the first state is an untriggered state and the second state is a current state can it be determined that the fault maturity period meets the test requirements. For example, if both the first state and the second state are untriggered states or both are current states, then neither meets the test requirements.
[0073] It can be seen that when testing the fault maturation time of the diagnostic fault code, the present application first determines the fault maturation time period corresponding to the target function set in the electronic control unit to be tested, and then controls the current functional state of the target function to change from a fault state to a non-fault state in the message period before the fault maturation time period, and sends a diagnostic request to the electronic control unit to be tested to read the first state of the current diagnostic fault code, and controls the current functional state of the target function to change from a fault state to a non-fault state in the message period after the fault maturation time period, and sends a diagnostic request to the electronic control unit to be tested to read the second state of the current diagnostic fault code. If the first state is an untriggered state and the second state is the current state, it is determined that the fault maturation time period meets the test requirements. Through the technical solution of the present application, the fault maturation time period of the diagnostic fault code can be accurately tested, the error can be controlled within one message period, and the deviation of the internal processing time of the software and the deviation caused by the response to the diagnostic reply are eliminated.
[0074] See also Figure 7 As shown, the embodiment of the present application discloses a specific time parameter testing method for diagnostic trouble codes. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically, it includes:
[0075] Step S31: determining a fault recovery time period corresponding to a target function set in the electronic control unit to be tested; the fault recovery time period is the time required for the diagnostic trouble code corresponding to the target function to change from a current state to a historical state.
[0076] In this embodiment, a fault recovery time period corresponding to a target function set in the ECU under test is determined. The fault recovery time period is the time required for a diagnostic trouble code corresponding to the target function to change from a current state to a historical state. For example, if the fault recovery time period is five message cycles, then according to the above definition, the read diagnostic trouble code should be in the historical state after the fault has recovered for five message cycles.
[0077] Step S32: in a message period before the preset time period, controlling the current functional state of the target function to change from a no-fault state to a fault state, and sending a diagnostic request to the electronic control unit to be tested to read the first state of the current diagnostic fault code.
[0078] In this embodiment, specifically, the current function state of the target function is controlled to change from a non-fault state to a fault state in the message cycle before the fault recovery time period. For example, the defined fault recovery time period is 5 message cycles. Figure 8 As shown, after the recovery is completed for 4 message cycles, the error is continued, that is, the functional state of the control target function is changed from a non-fault state to a fault state, and then a diagnostic request is sent to the electronic control unit to be tested to read the first state of the current diagnostic fault code.
[0079] Step S33: in a message period after the preset time period, controlling the current functional state of the target function to change from a no-fault state to a fault state, and sending a diagnostic request to the electronic control unit to be tested to read the second state of the current diagnostic fault code.
[0080] In this embodiment, specifically, the current functional state of the target function is controlled to change from a non-fault state to a fault state in the message period after the fault recovery time period. For example, the defined fault recovery time period is 5 message periods. Figure 8 As shown, after the recovery is completed for 6 message cycles, the error is continued, that is, the functional state of the control target function is changed from a non-fault state to a fault state, and then a diagnostic request is sent to the electronic control unit to be tested to read the second state of the current diagnostic fault code.
[0081] Step S34: If the first state is the current state and the second state is the historical state, it is determined that the fault recovery time period meets the test requirements.
[0082] In this embodiment, if the current diagnostic trouble code read during the fault recovery time period is in the current state, and the current diagnostic trouble code read in the message cycle after the fault mature time period is in the historical state, then the fault recovery time period can be determined to meet the test requirements. Taking the aforementioned example, if the DTC is in the current state after four message cycles of recovery, and in the historical state after six message cycles of recovery, then the DTC fault recovery time period is five message cycles, and the error is controlled within one message cycle. In other words, through the technical solution of this application, the time accuracy can be controlled within one message cycle, eliminating the deviation caused by internal software processing time and response diagnostic reply.
[0083] Furthermore, only when the first state is the current state and the second state is the historical state can the fault recovery time period be determined to meet the test requirements. For example, if both the first state and the second state are the current state or both are the historical state, then both do not meet the test requirements.
[0084] It can be seen that when testing the fault recovery time of the diagnostic fault code, the present application first determines the fault recovery time period corresponding to the target function set in the electronic control unit to be tested, and then controls the current functional state of the target function from a non-fault state to a fault state in the message period before the fault recovery time period, and sends a diagnostic request to the electronic control unit to be tested to read the first state of the current diagnostic fault code, and controls the current functional state of the target function from a non-fault state to a fault state in the message period after the fault recovery time period, and sends a diagnostic request to the electronic control unit to be tested to read the second state of the current diagnostic fault code. If the first state is the current state and the second state is the historical state, it is determined that the fault recovery time period meets the test requirements. Through the technical solution of the present application, the fault recovery time period of the diagnostic fault code can be accurately tested, the error can be controlled within one message period, and the deviation caused by the internal processing time deviation of the software and the response to the diagnostic reply is eliminated.
[0085] See also Figure 9 As shown, the embodiment of the present application discloses a time parameter testing device for a diagnostic fault code, which is applied to a diagnostic device, and the device includes:
[0086] The time period determination module 11 is used to determine a preset time period corresponding to a target function set in the electronic control unit to be tested; the preset time period is the time required for the diagnostic trouble code corresponding to the target function to change from a target state to a preset state;
[0087] A first state reading module 12 is configured to control the target function to change its current function state before the preset time period, and to send a diagnostic request to the electronic control unit to be tested to read a first state of a current diagnostic trouble code;
[0088] A second state reading module 13 is configured to control the target function to change its current function state after the preset time period, and to send a diagnostic request to the electronic control unit to be tested to read a second state of the current diagnostic trouble code;
[0089] The judgment module 14 is configured to determine whether the preset time period meets the test requirement if the first state is the target state and the second state is the preset state.
[0090] It can be seen that in this application, the preset time period corresponding to the target function set in the electronic control unit to be tested is determined by the diagnostic equipment; the preset time period is the time required for the diagnostic trouble code corresponding to the target function to change from the target state to the preset state; before the preset time period, the target function is controlled to change the current functional state, and a diagnostic request is sent to the electronic control unit to be tested to read the first state of the current diagnostic trouble code; after the preset time period, the target function is controlled to change the current functional state, and a diagnostic request is sent to the electronic control unit to be tested to read the second state of the current diagnostic trouble code; if the first state is the target state and the second state is the preset state, it is determined that the preset time period meets the test requirements. As can be seen, in the present application, a preset time period corresponding to the target function set in the electronic control unit to be tested is pre-determined. The preset time period refers to the time required for the diagnostic trouble code corresponding to the target function to change from the target state to the preset state. Then, before the preset time period, the target function is controlled to change to the current functional state, and a diagnostic request is sent to the electronic control unit to be tested to read the first state of the current diagnostic trouble code. After the preset time period, the target function is controlled to change to the current functional state, and a diagnostic request is sent to the electronic control unit to be tested to read the second state of the current diagnostic trouble code. If the first state is the target state and the second state is the preset state, it is determined that the preset time period of the diagnostic trouble code meets the test requirements. In this way, by reading the states of the diagnostic trouble code before and after the preset time period in two tests, the present application can accurately measure the time parameters of the diagnostic trouble code to further determine whether the time parameters meet the test requirements.
[0091] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Specifically, the device may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the time parameter testing method for diagnostic trouble codes performed by an electronic device as disclosed in any of the aforementioned embodiments.
[0092] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0093] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0094] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.
[0095] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, enabling the processor 21 to calculate and process the massive amount of data 223 in the memory 22. It can be run under Windows, Unix, Linux, or other operating systems. In addition to including computer programs capable of performing the time parameter testing method for diagnostic trouble codes performed by the electronic device 20 as disclosed in any of the aforementioned embodiments, the computer programs 222 may further include computer programs capable of performing other specific tasks. Data 223 may include data received by the electronic device from external devices, as well as data collected by its own input / output interface 25.
[0096] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the method steps performed during the time parameter testing of the diagnostic fault code disclosed in any of the aforementioned embodiments are implemented.
[0097] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.
[0098] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0099] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0100] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0101] The above is a detailed introduction to the time parameter testing method, device, equipment and storage medium for diagnostic fault codes provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A time parameter testing method for a diagnostic trouble code, characterized in that: Used in diagnostic equipment, including: Determining a preset time period corresponding to a target function set in the electronic control unit to be tested; the preset time period is the time required for a diagnostic trouble code corresponding to the target function to change from a target state to a preset state; Controlling the target function to change its current functional state before the preset time period, and sending a diagnostic request to the electronic control unit to be tested to read a first state of a current diagnostic trouble code; After the preset time period, controlling the target function to change the current functional state, and sending a diagnostic request to the electronic control unit to be tested to read the second state of the current diagnostic trouble code; If the first state is the target state and the second state is the preset state, it is determined that the preset time period meets the test requirement.
2. The time parameter testing method for diagnostic trouble codes according to claim 1, characterized in that: The controlling the target function to change the current functional state before the preset time period includes: Controlling the target function to change its current functional state in a message period before the preset time period; Accordingly, controlling the target function to change its current functional state after the preset time period includes: The target function is controlled to change its current functional state in a message period following the preset time period.
3. The time parameter testing method for diagnostic trouble codes according to claim 1, characterized in that: The preset time period includes a fault maturity time period and a fault recovery time period, and the functional state includes a fault state and a non-fault state.
4. The time parameter testing method for diagnostic trouble codes according to claim 3, characterized in that: The fault maturity time period is the time required for the diagnostic trouble code corresponding to the target function to change from an untriggered state to a current state; Correspondingly, if the first state is the target state and the second state is the preset state, determining that the preset time period meets the test requirement includes: If the first state is an untriggered state and the second state is a current state, it is determined that the fault maturity time period meets the test requirement.
5. The time parameter testing method of the diagnostic trouble code according to claim 3, characterized in that: The fault recovery time period is the time required for the diagnostic trouble code corresponding to the target function to change from the current state to the historical state; Correspondingly, if the first state is the target state and the second state is the preset state, determining that the preset time period meets the test requirement includes: If the first state is a current state and the second state is a historical state, it is determined that the fault recovery time period meets the test requirement.
6. The time parameter testing method for diagnostic trouble codes according to claim 3, characterized in that: The controlling the target function to change the current functional state includes: When the preset time period is a fault mature time period, controlling the current functional state of the target function to change from a fault state to a non-fault state; When the preset time period is a fault recovery time period, the current functional state of the target function is controlled to change from a non-fault state to a fault state.
7. The time parameter testing method for diagnostic trouble codes according to any one of claims 1 to 6, characterized in that: After sending the diagnostic request to the electronic control unit to be tested, the method further includes: Obtain the current diagnostic trouble code replied by the electronic control unit under test, and determine the corresponding status information according to the target bit of the current diagnostic trouble code; wherein, the status information includes a first state and a second state. If the electronic control unit under test replies that there is no current diagnostic trouble code, the corresponding status information is an untriggered state.
8. A time parameter testing device for a diagnostic trouble code, characterized in that: Used in diagnostic equipment, including: a time period determination module, configured to determine a preset time period corresponding to a target function set in the electronic control unit to be tested; the preset time period being the time required for a diagnostic trouble code corresponding to the target function to change from a target state to a preset state; a first state reading module, configured to control the target function to change its current function state before the preset time period, and send a diagnostic request to the electronic control unit to be tested to read a first state of a current diagnostic trouble code; a second state reading module, configured to control the target function to change its current function state after the preset time period, and send a diagnostic request to the electronic control unit to be tested to read a second state of a current diagnostic trouble code; The judgment module is configured to judge whether the preset time period meets the test requirement if the first state is the target state and the second state is the preset state.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the steps of the time parameter testing method for diagnostic trouble codes as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that Used to store a computer program; wherein, when the computer program is executed by a processor, the steps of the time parameter testing method for a diagnostic trouble code as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Timeout time verification method and device, equipment and storage medium
CN116048051A
Failure logging device and this failure logging has device for car
CN206133298U