Over the past 2 days I successfully implemented the checking and loading of DTCs. I have used the Scantool.net’s code database file for all the codes. This is loaded into my program. I can then do something as simple as:
qDebug() << automonApp.getNumberOfCodes();
This will let me know if the MIL is on and the number of DTCs currently stored on the ECU. There are 4 types or categories of codes:
- Powertrain Codes – eg. P0133
- Chassis Codes – eg. C0100
- Body Codes – eg. B0200
- Network Codes – eg. U0122
The most common codes are the Powertrain codes. A code starting with P0 is SAE defined, while P1, P2, P3 are manufacturer defined, SAE defined, jointly defined respectively. It is a similar naming scheme with the C,B and U codes.
My simulator gives 6 DTCs if you press the malfunction button. This also illuminates the MIL. Reading these codes was a little difficult as there are 3 ECU’s in the simulator, ECU, ABS and Transmission unit. So I ended up getting codes from other ECUs as well but knowing where the delimiter was, proved to be difficult. The response to a 03 mode command responds with 43, but 43 can be a valid code as well. The 4 represents a chassis code so 43 00 would be C0300. I could not use 43 as a delimiter so I turned headers on using the ATH1 option and this gave back the sender/receiver/priority and CRC header bits. Using this information I successfully interpreted the correct bytes.
Resetting the MIL is very simple, just a matter of sending a mode 04 command.
Leave a Reply
You must be logged in to post a comment.