CN113985849A - Method for writing DTC (digital control channel) read ECU (electronic control unit) version of automatic clear-reading whole vehicle based on CANoe software - Google Patents

Method for writing DTC (digital control channel) read ECU (electronic control unit) version of automatic clear-reading whole vehicle based on CANoe software Download PDF

Info

Publication number
CN113985849A
CN113985849A CN202111261991.5A CN202111261991A CN113985849A CN 113985849 A CN113985849 A CN 113985849A CN 202111261991 A CN202111261991 A CN 202111261991A CN 113985849 A CN113985849 A CN 113985849A
Authority
CN
China
Prior art keywords
ecu
dtc
whole vehicle
reading
writing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111261991.5A
Other languages
Chinese (zh)
Inventor
刘鹏程
陈浩
潘泽洵
吴迪
曹包华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changchun Faw Fusheng Group Co ltd
Original Assignee
Changchun Faw Fusheng Group Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changchun Faw Fusheng Group Co ltd filed Critical Changchun Faw Fusheng Group Co ltd
Priority to CN202111261991.5A priority Critical patent/CN113985849A/en
Publication of CN113985849A publication Critical patent/CN113985849A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0259Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the response to fault detection
    • G05B23/0262Confirmation of fault detection, e.g. extra checks to confirm that a failure has indeed occurred
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24065Real time diagnostics

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a method for automatically reading a DTC (digital control Unit) ECU (electronic control Unit) version of a whole vehicle; configuring CANoe software, and right-clicking in a newly-built New Test Environment to newly build an XML Test Module; a CAN file is newly built in a CAPL Browser under a Tool module; according to the diagnosis specification of each ECU of the whole vehicle, writing and reading ECU software and hardware version number codes by using CAPL in a CAN file, writing and removing DTC codes of each ECU of the whole vehicle, and writing and reading DTC codes of each ECU of the whole vehicle; under XML Test Module, Components in Configuration add CAN files; adding an XML file to Common in Configuration; calling a program in the CAN file in the XML file, and then compiling a test case to be executed; and (4) operating the CANoe to execute the test case, namely automatically reading the software and hardware version number of the controller of the whole vehicle and reading the DTC, and automatically generating a test report after the test is finished. The invention realizes the automatic clear reading of DTC in the whole vehicle fault diagnosis test, reads the software and hardware versions of each ECU, and greatly improves the fault diagnosis test efficiency and precision.

Description

Method for writing DTC (digital control channel) read ECU (electronic control unit) version of automatic clear-reading whole vehicle based on CANoe software
Technical Field
The invention belongs to the field of automobile network testing, and relates to a method for automatically reading a DTC (digital control Unit) read ECU (electronic control Unit) version of a whole automobile.
Background
With the increasing number of automobile ECUs (electronic control units), corresponding bus networks are increasingly complex, and therefore network and fault diagnosis testing of the whole automobile is increasingly important. The problems can be found as early as possible by carrying out network and fault diagnosis tests in the development period of the whole vehicle, the faults of the controller are prevented from being brought into a bus system, and the reliability of the bus network and the whole vehicle is ensured. However, manual testing is mainly used in the whole vehicle development testing and verification stage, and meanwhile, the test period is shortened, the number of rounds is increased, and the workload is huge. The traditional manual test consumes long time and has low efficiency which can not meet the requirement.
Disclosure of Invention
The invention aims to solve the technical problem that manual test of vehicle fault diagnosis takes long time in the prior art, and provides a method for reading the ECU version of vehicle DTC (diagnostic trouble code) of the vehicle automatically based on CANoe software compiling.
In order to solve the technical problems, the invention is realized by adopting the following technical scheme, which is described by combining the accompanying drawings as follows:
it is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
A method for writing a DTC (digital control channel) ECU (electronic control unit) version capable of automatically reading a whole vehicle based on CANoe software is characterized by comprising the following steps:
step 1: creating a CANoe project, and carrying out channel configuration, protocol configuration and project file configuration on the CANoe;
step 2: global Variables and diagnostic service Variables are defined in the Variables of the CAN file;
and step 3: according to the ECU diagnosis specifications of the whole vehicle, writing and reading ECU software and hardware version number codes of the whole vehicle by using CAPL in a CAN file;
and 4, step 4: writing DTC codes for clearing each ECU of the whole vehicle by using CAPL in the CAN file;
and 5: writing and reading DTC codes of each ECU of the whole vehicle by using CAPL in the CAN file;
step 6: calling a program in the CAN file in the XML file, and compiling a test case;
and 7: and running the CANoe to execute the test case.
Further, the creating of the CANoe engineering in step 1 refers to opening the CANoe, setting the communication rate to be 500Kbit/s in a HardwareConfiguration window, selecting the CAN interface to be can1, and selecting the bus type to be the CAN bus in a Simulation Setup window. Under a TEST Module, a New TEST Environment is newly built in a TEST Setup, then a right key is clicked to build an XML TEST Module, and then a CAN file is newly built in a CAPL Browser under a Tool Module;
further, in the step 2, defining global Variables and diagnostic service Variables in the Variables of the CAN file, which means defining global Variables such as CAN channel configuration, DTC array, DTC number and the like, and required 14 service clearing DTCs, 19 service reading DTCs, 22 service reading diagnostic request service and diagnostic response service Variables of ECU version number in the Variables;
further, according to the ECU diagnosis specifications of the whole vehicle, CAPL is used for writing and reading ECU software version number codes of the whole vehicle in the CAN file, and the specific contents are as follows:
selecting an ECU target in a test node by using a diagnosis function 'diagsetTarget' in CAPL, identifying the diagnosis ID of the ECU, 'diagResize' setting the length of a diagnosis command for sending the ECU software version number, and 'DiagSetPrimitiveByte' setting the content of the diagnosis command for sending the ECU software version number,
the physical address request is sent using the "DiagSendPhyRequest" setting,
requesting a read of the ECU software version number, the actual result may be: 1. replying a positive response; 2. replying to a negative response; 3. and replying to no response. And according to the multi-path problem of the conversion under different conditions, comparing expected diagnosis response variables with constants after Case one by using a switch statement, judging an actual test result, executing the statement under the constant if the actual test result is equal to one of the constants, and executing the statement behind the default if the actual test result is not equal to any one of the constants.
Further, according to the diagnosis specification of each controller of the whole vehicle, the CAN file is written and read with CAPL to obtain the hardware version number codes of each ECU of the whole vehicle, and the specific contents are as follows:
selecting an ECU target in a test node by using a diagnostic function 'diagsetTarget' in CAPL, identifying the diagnostic ID of the ECU, 'diagResize' setting the length of a diagnostic command for sending the hardware version number of the read ECU, 'diagSetPrimitiveByte' setting the content of the diagnostic command for sending the hardware version number of the read ECU,
the physical address request is sent using the "DiagSendPhyRequest" setting,
requesting to read the ECU hardware version number, the actual result may be: 1. replying a positive response; 2. replying to a negative response; 3. and replying to no response. And according to the multi-path problem of the conversion under different conditions, comparing expected diagnosis response variables with constants after Case one by using a switch statement, judging an actual test result, executing the statement under the constant if the actual test result is equal to one of the constants, and executing the statement behind the default if the actual test result is not equal to any one of the constants. And sequentially writing and reading the software and hardware version number codes of each ECU of the whole vehicle according to the ECU diagnosis standard.
Further, in the step 4, a DTC code for clearing each ECU of the whole vehicle is written in the CAN file by using CAPL, and the specific contents are as follows:
selecting an ECU target in a test node by using a diagnosis function 'diagsetTarget' in CAPL, identifying the diagnosis ID of the ECU, 'diagResize' sets the length of a diagnostic command for sending a clear DTC to be 4 bytes, a diagnosis function 'diagSetPrimitiveByte' sets the content of the diagnostic command for sending the clear DTC to be 14FF FF,
the physical address request is sent using the "DiagSendPhyRequest" setting,
requesting a clear of the DTC code for the ECU, the actual result may be: 1. replying a positive response; 2. replying to a negative response; 3. and replying to no response. And according to the multi-path problem of the conversion under different conditions, comparing expected diagnosis response variables with constants after Case one by using a switch statement, judging an actual test result, executing the statement under the constant if the actual test result is equal to one of the constants, and executing the statement behind the default if the actual test result is not equal to any one of the constants. And writing DTC codes for clearing each ECU of the whole vehicle in sequence according to ECU diagnosis specifications.
Further, in the step 5, the CAN file is written with CAPL to read DTC codes of each ECU of the whole vehicle, and the specific contents are as follows:
the diagnostic function "DiagsetTarget" identifies the diagnostic ID of each ECU, the diagnostic function "DiagResize" sets the length of the send-read DTC diagnostic command to 3 bytes, the diagnostic function "diagsetprimitmittbyte" sets the send-read DTC diagnostic command content 190208, the "DiagSendPhyRequest" setting is used to send a physical address request, the DTC code of the ECU is requested to be read, and the actual results may be: 1. replying no response; 2. recovering to have no fault; 3. replying to a negative response; 4. a positive response is returned. And according to the multi-path problem of the conversion under different conditions, comparing expected diagnosis response variables with constants after Case one by using a switch statement, judging an actual test result, executing the statement under the constant if the actual test result is equal to one of the constants, and executing the statement behind the default if the actual test result is not equal to any one of the constants. And writing and reading DTC codes of all ECUs of the whole vehicle in sequence according to ECU diagnosis specifications.
Further, the program in the CAN file is called in the XML file in step 6, and the specific contents are as follows: the method comprises the steps of firstly adding CAN files to Components in Configuration under XML Test Module, then adding XML files to Common in Configuration, finally calling programs in the CAN files, and then compiling Test cases for reading DTC (Test control Unit) read ECU versions of the whole vehicle clearly.
Further, the operation of the CANoe execution test case in step 7 means that a test device CANoe is connected to an OBD port of the whole vehicle, a configuration project is opened, a start button is clicked, operations of automatically reading software and hardware version numbers of each ECU of the whole vehicle and clearing and reading DTCs can be realized, and a test report is automatically generated after the test is completed.
Compared with the prior art, the invention has the beneficial effects that:
the invention relates to an automatic test system compiled by using CAPL scripts in CANoe software, which can realize automatic clear reading of DTCs and reading of software and hardware versions of each ECU in the whole vehicle fault diagnosis test. The efficiency and the precision of fault diagnosis and test are greatly improved.
Drawings
The invention is further described with reference to the accompanying drawings in which:
FIG. 1 is a network topology diagram of a vehicle model;
FIG. 2 is a flow chart of a method for writing a DTC (digital control channel) read ECU version for automatically reading a whole vehicle based on CANoe software.
Detailed Description
In order to make the implementation objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be described in more detail below with reference to the accompanying drawings in the embodiments of the present invention. In the drawings, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The described embodiments are only some, but not all embodiments of the invention. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate orientations or positional relationships based on those shown in the drawings, and are used merely for convenience in describing the present invention and for simplifying the description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore, should not be taken as limiting the scope of the present invention.
The invention is described in detail below with reference to the attached drawing figures:
the method for writing and automatically reading the DTC (digital control Unit) read ECU (electronic control Unit) version of the whole vehicle based on the CANoe software has the characteristics of automatic testing, short consumed time, high efficiency and high repeatability.
The majority of controllers of the automobile are in CAN bus network communication, a few controllers are in LIN bus communication (such as a skylight, a sun-shading curtain, a rainfall light sensor and the like), all CAN lines are not connected together on the whole automobile, but are divided according to functional definition, and the CAN lines are generally divided into 5 types:
PT CAN power assembly CAN bus.
CH CAN chassis control CAN bus.
A Comfort control bus for Comfort CAN.
Info CAN infotainment system bus.
A Diag CAN diagnostic control bus.
Fig. 1 shows a network topology of a certain vehicle type, GW is a gateway, and all CAN buses are connected to the gateway. OBD is a diagnostic control bus interface, typically below the driver side instrument desk. And the OBD interface can be connected by using the CANoe to read the data of the whole vehicle.
In order to realize writing of automatic clear read diagnostic fault codes DTC and read ECU version number of the whole vehicle controller by using CANoe software, diagnostic command clear DTC (14 FF FF), read DTC (190208) and read ECU version number (22F 195) are used. Firstly, a test environment is set up, and hardware equipment is 1640A, 4 paths of CAN channels. The corresponding software uses canoe10.0. Hardware equipment is connected to a computer through a USB interface, engineering configuration is newly built in CANoe software, a complete vehicle DBC of the vehicle type is added, then automatic scripts are written by using CAPL language, DTC is automatically read in complete vehicle fault diagnosis test, and software and hardware versions of each ECU are read. The method comprises the following specific steps:
step 1:
and configuring the CANoe, setting the communication rate to be 500Kbit/s in a HardwarceConfiguration window, selecting a CAN interface to be CAN1, and selecting the bus type to be a CAN bus in a Simulation Setup window. Under a TEST Module, a New TEST Environment is newly built in a TEST Setup, a right key is clicked to build an XML TEST Module, and then, under a Tool Module, a CAN file is newly built in a CAPL Browser.
Step 2:
global Variables and required 14 service clear DTCs, 19 service read DTCs, 22 service read ECU version number diagnostic request service and diagnostic response service Variables are defined in the Variables of the CAN file;
and step 3:
according to the diagnosis specification of each controller of the whole vehicle, the CAN file is written with and read with CAPL ECU software version number codes. Firstly, a diagnosis function 'DiagsetTarget' in CAPL is used for identifying the diagnosis ID of the ECU, 'DiagResize' sets the diagnosis command length for sending the ECU software version number, and 'DiagSetPrimitiveByte' sets the diagnosis command content for sending the ECU software version number,
the physical address request is sent using the "DiagSendPhyRequest" setting,
requesting a read of the ECU software version number, the actual result may be: 1. replying a positive response; 2. replying to a negative response; 3. and replying to no response. And according to the multi-path problem of the conversion under different conditions, comparing expected diagnosis response variables with constants after Case one by using a switch statement, judging an actual test result, executing the statement under the constant if the actual test result is equal to one of the constants, and executing the statement behind the default if the actual test result is not equal to any one of the constants.
And 4, step 4:
the CAN file is used for writing and reading ECU hardware version number codes. In the same step 3, the diagnosis function ' DiagsetTarget ' in CAPL is used for identifying the diagnosis ID of the ECU, ' DiagResize ' is used for setting the length of the diagnosis command for sending the hardware version number of the read ECU, ' DiagSetPrimitiveByte ' is used for setting the content of the diagnosis command for sending the hardware version number of the read ECU, DiagSendPhyRequest ' is used for setting the content of the diagnosis command for sending the physical address request,
requesting to read the ECU hardware version number, the actual result may be: 1. replying a positive response; 2. replying to a negative response; 3. and replying to no response. And (4) according to the multi-path problem of the conversion under different conditions, comparing expected diagnostic response variables with constants after Case one by using a switch statement, and judging an actual test result. If the constant is equal to one of the constants, executing the statement under the constant, and if the constant is not equal to any constant, executing the statement behind the default. And sequentially writing and reading the software and hardware version number codes of each ECU of the whole vehicle according to the ECU diagnosis standard.
And (4) sequentially writing and reading the software and hardware version number codes of each ECU according to the step (3) and the step (4).
And 5:
the DTC code to clear the ECU is written using CAPL in the CAN file. The diagnosis function 'DiagsetTarget' in CAPL is used for identifying the diagnosis ID of the ECU, 'diagResize' is used for setting the length of the diagnostic command for sending the clear DTC, the diagnosis function 'diagSetPrimitiveByte' is used for setting the content of the diagnostic command for sending the clear DTC 14FF, and 'diagSendPhyRequest' is used for setting the physical address request,
requesting a clear of the DTC code for the ECU, the actual result may be: 1. replying a positive response; 2. replying to a negative response; 3. and replying to no response. And according to the multi-path problem of the conversion under different conditions, comparing expected diagnosis response variables with constants after Case one by using a switch statement, judging an actual test result, executing the statement under the constant if the actual test result is equal to one of the constants, and executing the statement behind the default if the actual test result is not equal to any one of the constants. And writing DTC codes for clearing each ECU of the whole vehicle in sequence according to ECU diagnosis specifications.
Step 6:
the DTC code for reading the ECU is written using CAPL in the CAN file. The diagnosis ID of each controller is identified by using a diagnosis function 'diagsetTarget' in CAPL, the diagnosis function 'diagResize' sets the length of a sending and reading DTC diagnosis command to be 3 bytes, the diagnosis function 'diagSetPrimitiveByte' sets the content of the sending and reading DTC diagnosis command 190208, a 'diagSendPhyRequest' is used for setting and sending a physical address request, the reading of the DTC code of the ECU is requested, and the actual result may be as follows: 1. replying no response; 2. recovering to have no fault; 3. replying to a negative response; 4. a positive response is returned. And according to the multi-path problem of the conversion under different conditions, comparing expected diagnosis response variables with constants after Case one by using a switch statement, judging an actual test result, executing the statement under the constant if the actual test result is equal to one of the constants, and executing the statement behind the default if the actual test result is not equal to any one of the constants. And writing and reading DTC codes of all ECUs of the whole vehicle in sequence according to ECU diagnosis specifications.
And 7:
and calling the programs in the CAN file in the XML file, and compiling the test cases. The specific contents are as follows: adding CAN files to Components in Configuration under XML Test Module, adding XML files to Common in Configuration, calling programs in the XML files, and compiling Test cases for reading DTC (Test control Unit) read ECU versions of the whole vehicle.
And 8:
and running the CANoe to execute the test case. The specific contents are as follows: and connecting a testing device CANoe at an OBD port of the whole vehicle, opening a configuration project, clicking a start button to automatically read the version numbers of software and hardware of each ECU of the whole vehicle and clear and read DTC (digital control transmission) operation, and automatically generating a test report after the test is finished.
The above description is only for the purpose of illustrating the present invention and the appended claims are not to be construed as limiting the scope of the invention, which is intended to cover all modifications, equivalents and improvements that are within the spirit and scope of the invention as defined by the appended claims. And those not described in detail in this specification are well within the skill of those in the art.

Claims (9)

1. A method for writing a DTC (digital control channel) ECU (electronic control unit) version capable of automatically reading a whole vehicle based on CANoe software is characterized by comprising the following steps:
step 1: creating a CANoe project, and carrying out channel configuration, protocol configuration and project file configuration on the CANoe;
step 2: global Variables and diagnostic service Variables are defined in the Variables of the CAN file;
and step 3: according to the ECU diagnosis specifications of the whole vehicle, writing and reading ECU software and hardware version number codes of the whole vehicle by using CAPL in a CAN file;
and 4, step 4: writing DTC codes for clearing each ECU of the whole vehicle by using CAPL in the CAN file;
and 5: writing and reading DTC codes of each ECU of the whole vehicle by using CAPL in the CAN file;
step 6: calling a program in the CAN file in the XML file, and compiling a test case;
and 7: and running the CANoe to execute the test case.
2. The method for writing the DTC reading ECU version for automatically reading the whole vehicle based on the CANoe software according to claim 1, wherein the method comprises the following steps:
the CANoe engineering is created in the step 1, namely opening a CANoe, setting the communication rate to be 500Kbit/s in a HardwarceConfiguration window, selecting a CAN interface to be CAN1, selecting a bus type to be a CAN bus in a Simulation Setup window, under a TEST Module, newly creating a New TEST Environment in the TEST Setup, then clicking a right key to create an XML TEST Module, and under a Tool Module, newly creating a CAN file in a CAPL Browser.
3. The method for writing the DTC reading ECU version for automatically reading the whole vehicle based on the CANoe software according to claim 2, characterized in that:
the definition of the global Variables and the diagnosis service Variables in the Variables of the CAN file in the step 2 refers to the definition of the global Variables such as the CAN channel configuration, the DTC array, the DTC number and the like and the diagnosis request service and the diagnosis response service Variables of the required 14 service clearing DTC, 19 service reading DTC and 22 service reading ECU version number in the Variables.
4. The CANoe software-based method for writing the DTC read ECU version of the whole vehicle for automatic reading is characterized in that:
and 3, writing and reading version number codes of ECU software of the whole vehicle by using CAPL in the CAN file according to the ECU diagnosis specifications of the whole vehicle, wherein the specific contents are as follows:
selecting an ECU target in a test node by using a diagnosis function 'diagsetTarget' in CAPL, identifying the diagnosis ID of the ECU, 'diagResize' setting the length of a diagnosis command for sending the ECU software version number, and 'DiagSetPrimitiveByte' setting the content of the diagnosis command for sending the ECU software version number,
the physical address request is sent using the "DiagSendPhyRequest" setting,
requesting a read of the ECU software version number, the actual result may be: 1. replying a positive response; 2. replying to a negative response; 3. and replying to no response. And according to the multi-path problem of the conversion under different conditions, comparing expected diagnosis response variables with constants after Case one by using a switch statement, judging an actual test result, executing the statement under the constant if the actual test result is equal to one of the constants, and executing the statement behind the default if the actual test result is not equal to any one of the constants.
5. The CANoe software-based method for writing the DTC read ECU version of the whole vehicle for automatic reading is characterized in that:
writing and reading each ECU hardware version number code of the whole vehicle by using CAPL in the CAN file, wherein the specific contents are as follows: selecting an ECU target in a test node by using a diagnostic function 'diagsetTarget' in CAPL, identifying the diagnostic ID of the ECU, 'diagResize' setting the length of a diagnostic command for sending the hardware version number of the read ECU, 'diagSetPrimitiveByte' setting the content of the diagnostic command for sending the hardware version number of the read ECU,
the physical address request is sent using the "DiagSendPhyRequest" setting,
requesting to read the ECU hardware version number, the actual result may be: 1. replying a positive response; 2. replying to a negative response; 3. and replying to no response. And according to the multi-path problem of the conversion under different conditions, comparing expected diagnosis response variables with constants after Case one by using a switch statement, judging an actual test result, executing the statement under the constant if the actual test result is equal to one of the constants, and executing the statement behind the default if the actual test result is not equal to any one of the constants. And sequentially writing and reading the software and hardware version number codes of each ECU of the whole vehicle according to the ECU diagnosis standard.
6. The CANoe software-based method for writing the DTC read ECU version for automatically reading the whole vehicle is characterized in that:
writing a DTC code for clearing each ECU of the whole vehicle by using CAPL in the CAN file, wherein the specific contents are as follows:
selecting an ECU target in a test node by using a diagnosis function 'diagsetTarget' in CAPL, identifying the diagnosis ID of the ECU, 'diagResize' sets the length of a diagnostic command for sending the clear DTC, a diagnosis function 'diagSetPrimitiveByte' sets the content of the diagnostic command for sending the clear DTC 14FF,
the physical address request is sent using the "DiagSendPhyRequest" setting,
requesting a clear of the DTC code for the ECU, the actual result may be: 1. replying a positive response; 2. replying to a negative response; 3. and replying to no response. And according to the multi-path problem of the conversion under different conditions, comparing expected diagnosis response variables with constants after Case one by using a switch statement, judging an actual test result, executing the statement under the constant if the actual test result is equal to one of the constants, and executing the statement behind the default if the actual test result is not equal to any one of the constants. And writing DTC codes for clearing each ECU of the whole vehicle in sequence according to ECU diagnosis specifications.
7. The CANoe software-based method for writing the DTC read ECU version of the whole vehicle for automatic reading is characterized in that:
writing and reading DTC codes of all ECUs of the whole vehicle by using CAPL in the CAN file, wherein the specific contents are as follows:
the diagnostic function "DiagsetTarget" identifies the diagnostic ID of each controller, the diagnostic function "DiagResize" sets the length of the send-read DTC diagnostic command to 3 bytes, the diagnostic function "diagsetprimitmittbyte" sets the send-read DTC diagnostic command content 190208, and the diagnostic function "DiagSendPhyRequest" sets the send-physical address request to read the DTC code of the ECU, the actual results may be: 1. replying no response; 2. recovering to have no fault; 3. replying to a negative response; 4. a positive response is returned. And according to the multi-path problem of the conversion under different conditions, comparing expected diagnosis response variables with constants after Case one by using a switch statement, judging an actual test result, executing the statement under the constant if the actual test result is equal to one of the constants, and executing the statement behind the default if the actual test result is not equal to any one of the constants. And writing and reading DTC codes of all ECUs of the whole vehicle in sequence according to ECU diagnosis specifications.
8. The CANoe software-based method for writing the DTC read ECU version of the whole vehicle for automatic reading is characterized in that:
the program in the CAN file is called in the XML file in step 6, and the specific contents are as follows: the method comprises the steps of firstly adding CAN files to Components in Configuration under XML Test Module, then adding XML files to Common in Configuration, finally calling programs in the CAN files, and then compiling Test cases for reading DTC (Test control Unit) read ECU versions of the whole vehicle clearly.
9. The method for writing the DTC reading ECU version for automatically reading the whole vehicle based on the CANoe software according to claim 8, wherein the method comprises the following steps:
the running of the CANoe execution test case in the step 7 specifically comprises the following contents: and connecting a testing device CANoe at an OBD port of the whole vehicle, opening a configuration project, clicking a start button to automatically read the version numbers of software and hardware of each ECU of the whole vehicle and clear and read the DTC, and automatically generating a test report after the test is finished.
CN202111261991.5A 2021-10-28 2021-10-28 Method for writing DTC (digital control channel) read ECU (electronic control unit) version of automatic clear-reading whole vehicle based on CANoe software Pending CN113985849A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111261991.5A CN113985849A (en) 2021-10-28 2021-10-28 Method for writing DTC (digital control channel) read ECU (electronic control unit) version of automatic clear-reading whole vehicle based on CANoe software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111261991.5A CN113985849A (en) 2021-10-28 2021-10-28 Method for writing DTC (digital control channel) read ECU (electronic control unit) version of automatic clear-reading whole vehicle based on CANoe software

Publications (1)

Publication Number Publication Date
CN113985849A true CN113985849A (en) 2022-01-28

Family

ID=79743244

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111261991.5A Pending CN113985849A (en) 2021-10-28 2021-10-28 Method for writing DTC (digital control channel) read ECU (electronic control unit) version of automatic clear-reading whole vehicle based on CANoe software

Country Status (1)

Country Link
CN (1) CN113985849A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115065628A (en) * 2022-05-30 2022-09-16 一汽奔腾轿车有限公司 Automatic test method and test system for self-clearing of fault codes of sleep-free strategy controller

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104298224A (en) * 2014-09-12 2015-01-21 中国第一汽车股份有限公司 Automatic vehicle-mounted electronic control unit CAN bus communication testing device and system
CN105278978A (en) * 2014-07-23 2016-01-27 广州汽车集团股份有限公司 CANoe based ECU (Electronic Control Unit) software refresh method and apparatus
CN108132663A (en) * 2017-12-19 2018-06-08 风度(常州)汽车研发院有限公司 The analytic method of vehicle trouble messages, device and system
CN109358606A (en) * 2018-11-09 2019-02-19 广州锦红源电子科技有限公司 Vehicle automatization test system, test method and device
WO2019109915A1 (en) * 2017-12-08 2019-06-13 深圳市道通科技股份有限公司 Vehicle trouble diagnosis method, vehicle trouble diagnosis apparatus and electronic device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105278978A (en) * 2014-07-23 2016-01-27 广州汽车集团股份有限公司 CANoe based ECU (Electronic Control Unit) software refresh method and apparatus
CN104298224A (en) * 2014-09-12 2015-01-21 中国第一汽车股份有限公司 Automatic vehicle-mounted electronic control unit CAN bus communication testing device and system
WO2019109915A1 (en) * 2017-12-08 2019-06-13 深圳市道通科技股份有限公司 Vehicle trouble diagnosis method, vehicle trouble diagnosis apparatus and electronic device
CN108132663A (en) * 2017-12-19 2018-06-08 风度(常州)汽车研发院有限公司 The analytic method of vehicle trouble messages, device and system
CN109358606A (en) * 2018-11-09 2019-02-19 广州锦红源电子科技有限公司 Vehicle automatization test system, test method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
罗超文 等: "基于CAPL的诊断仪设计与仿真", 《中国内燃机学会燃烧节能净化分会2015年学术年会论文集》, 21 March 2018 (2018-03-21), pages 695 - 697 *
闫旭琴 等: "CANoe软件在车载诊断中的应用", 《科技传播》, no. 10, 31 December 2009 (2009-12-31), pages 88 - 90 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115065628A (en) * 2022-05-30 2022-09-16 一汽奔腾轿车有限公司 Automatic test method and test system for self-clearing of fault codes of sleep-free strategy controller
CN115065628B (en) * 2022-05-30 2024-02-13 一汽奔腾轿车有限公司 Automatic test method and test system for fault code self-clearing of controller without sleep strategy

Similar Documents

Publication Publication Date Title
CN107145140B (en) Automatic test system and test method for CAN interface of vehicle-mounted electronic control unit
CN109740222B (en) Testing device and system for automobile networking scene
CN111679836B (en) Automobile ECU flashing system and method
CN113189970B (en) Hardware-in-loop automatic test method and system of CAN bus controller and storage medium
CN107179971B (en) Automatic coding method and system for CAN bus fault processing
CN104483959A (en) Fault simulation and test system
CN107370637B (en) Vehicle-mounted ECU communication function automatic test system and method
CN114460925B (en) Automatic test method for CAN interface HIL of electric automobile controller
CN113985849A (en) Method for writing DTC (digital control channel) read ECU (electronic control unit) version of automatic clear-reading whole vehicle based on CANoe software
CN115080104A (en) Method and system for automatically configuring COM (component object model) code in Autosar
CN116521217A (en) Method, system and storage medium for rapidly configuring BSW based on AUTOSAR tool
CN115756918A (en) Method for compiling complete vehicle EOL test based on CANoe software
CN116224963A (en) Automatic testing device of remote vehicle control system and construction method thereof
CN116340146A (en) Whole-vehicle OTA upgrading automatic test system and method
CN114488997B (en) ECU (electronic control Unit) refreshing method and device, electronic equipment and storage medium
CN115495363A (en) Software testing method, electronic equipment and readable storage medium
CN103294053A (en) K-line diagnostic system for automobiles
CN115658460A (en) Automatic performance testing method and system based on cloud and vehicle-end interface
CN113934198A (en) Vehicle diagnosis method, vehicle diagnosis device, electronic device, and storage medium
CN109783417B (en) Serial port communication device and method
CN111414299A (en) SSD extended information obtaining method and device based on hdparm
Xu et al. Design of vehicle gateway automatic test system based on CANoe
CN111740972A (en) Method, device, equipment and storage medium for updating communication protocol stack information
CN112260919A (en) Vehicle-mounted CAN network diagnosis system-level automatic testing device and system
Mouzakitis et al. Advanced automated onboard vehicle diagnostics testing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination