Display Engine Protection Reason/Codes - Haltech

I run a Haltech Elite with a custom xml and dash layout. The Haltech CAN has “Engine Protection Reason” which is displays the errors the same as OBD2 Error Codes. I was wondering what code would be required to display this code correctly?
This is how the data comes on the Haltech CAN.

Coding is new to me so with the help of a mate who hasn’t used realdash before we came up with the below, but it doesn’t work and I’m not sure what to try next.

conversion=“V>>14)==0?‘P’:((V>>14)==1?‘B’:((V>>14)==2?‘C’:‘U’)) +hex(V&0x3FFF)”

Is there a typo or syntax issue with the code? or is what I’m wanting to be displayed not possible?

Thank you in advance
Jason

You can read the code pretty easily:

	<frame id="0x6F3" endianess="big">
	  <value id="739" units="bit" offset="4" length="1"></value> <!-- Front Left tyre leaking -->
	  <value id="740" units="bit" offset="4" length="1" conversion="V>>1"></value> <!-- Front Right tyre leaking -->
	  <value id="741" units="bit" offset="4" length="1" conversion="V>>2"></value> <!-- Rear Left tyre leaking -->
	  <value id="742" units="bit" offset="4" length="1" conversion="V>>3"></value> <!-- Rear Right tyre leaking -->
	  <value name="Haltech: Engine Protection Severity Level" offset="5" length="1"></value>
	  <value name="Haltech: Engine Protection Reason" offset="6" length="2"></value>
	</frame>

Although, getting the protection reason to show when reading error codes will require changes to RealDash.

Thank you for the response. I did past a copy of the code but the forum wouldn’t allow me to have 2 images so id removed it. :frowning:
My code is the same as that with the only difference being I had put units=“enum” (I’m not sure if that will make a difference?)
With this code the values on the dash don’t correspond to an error code. i.e. If I activate the intake warning temp sensor code P0111 on the Haltech, the value I get on the dash is 273. ( haven’t tried other errors to see what the other values are) is it possible to display the actual code P0111? Or with the below sentence are you suggesting it is possible to display the code P0111, but not the description that relates to it?

Although, getting the protection reason to show when reading error codes will require changes to RealDash

If I cant get it to display the code, is there a way to link Haltech: Engine Protection Reason to be able to be shown in the Quick Settings screen Read Error Codes?

Thank you again
Jason

Ok I did a little more testing. Haltech code P0111 = 273 on the Dash, P0110 = 272, so the number does change with a different error code.
How do I convert the code on the dash 273 to P0111?

Thank you in advance
Jason

You can use the enum for that.

	<frame id="0x6F3" endianess="big">
	  <value name="Haltech: Engine Protection Reason" offset="6" length="2" enum="272:P0110,273:P0111"></value>
	</frame>

Could you link the Haltech error codes? I can add them to error code reading for the next release.

Haltech use the standard OBDII Codes. i.e. P0111 is intake air temp, however I don’t believe there is a list of these codes and what is being output on the screen. The only reason I knew those and used it as an example was because I changed the warning in the Haltech to trip these codes. I guess I could manually trip all the codes to create the list, but would be time consuming.
This is why I was hoping that there was a formula / conversion that could extract the first 2 bits (then use enum to have that display the “P”, or “B” etc. then the remaining 14 bits for the number.

ffeaf22380c7742c5a629d9e27985b17e8742d4c_2_690x263

Is this possible? even it I had to have 2 text gauges next to each other (one for the “P” and the other for the number?

Thank you
Jason

The letter would be pretty straight forward, but RealDash currently has no means of showing the numeric value in hexadecimal.

For now, Add enums for most common ones, I will try to add all codes to next release of RealDash.

Awesome… Thank you :slight_smile:
its not a critical requirement as you can see I have most of the main sensors displayed, so it wouldn’t be hard to work out which is the sensor with the issue, but there is benefit for other items that aren’t normally displayed.

Layout still a work in progress as ill change some of the words to icons. but quite happy with what I have created so far. (most warning lights / indicators are through an Arduino to put them on the CAN network.)

Thank you again
Jason

1 Like

Just following up if you have an ETA on when you would be able to add the codes?

Thank you in advance.
Jason

I’m sorry, I completely forgot this. Will add a ticket so it will be done.

All good…

Thank you in advance.
Jason

1 Like

What code do I need to get this to work? I tried the below, but no luck.

Any suggestions?

 <frame id="0x6F3" endianess="big">
       <value name="Haltech: Engine Protection Severity Level" units="raw" offset="5" startbit="0" bitcount="4"></value>
      <value name="Haltech: Engine Protection Reason" units="enum" offset="6" length="2" conversion="if ((V >> 14) == 0) 'P' + hex(V &amp; 0x3FFF).upper();
        else if ((V >> 14) == 1) 'B' + hex(V &amp; 0x3FFF).upper();
        else if ((V >> 14) == 2) 'C' + hex(V &amp; 0x3FFF).upper();
        else 'U' + hex(V &amp; 0x3FFF).upper();
      "></value>
    </frame>

As always. Thank you in advance for your help

Jason

Don’t know where you got that XML snippet, but I don’t see any chance for it working as:

  • It is using unknown ‘units’
  • conversion uses functions that are not available at all.

In order to read These two Haltech values, could you link Haltech CAN documentation so we can take a look how values are packed into CAN frames. This is what we have on our Haltech CAN XML:

	  <value name="Haltech: Engine Protection Severity Level" offset="5" length="1"></value>
	  <value name="Haltech: Engine Protection Reason" offset="6" length="2"></value>

Of course that only shows a number for a engine protection reason.

To be honest that was chat GPT and it kinda made sense to me, but clearly wasn’t right for this. :stuck_out_tongue:

The Haltech Documentation from a few posts above:

If its going to take more then a few minutes to come up with the code, I’m ok with continuing with the current enum=“273:P1011 - Air Temp Sensor High” etc., but if I can get this working it will help with the non common codes I haven’t used in the enum function.

Thank you again

Jason

I’m sorry, been so busy that I cannot keep track of these conversations.

Unfortunately XML and enum cannot be used to parse error codes from frame 0x6F3. We need to implement that into the app itself. I added this to our todo list for next release.

1 Like

Sorry I wasn’t having a dig at you. I appreciate the work you do and how active you are to help everyone.
This was an older post and I believe you already implemented it into Realdash a few versions ago in 2.3.8.
I’d been using the temp work around of using the decimal number with enum for the most common fault codes. But I wanted to revisit doing it properly (and to capture new codes without having to update my XML every time I need to add a new code)
Although as with my first sentence. I do understand you are busy. So if it’s not a quick and simple thing for you to help with I’m ok keeping it as I currently have it with enum and just the common codes.

Thank you again.
Jason.

When connected to Haltech via CAN, does RealDash read error codes properly?

It reads / shows them as decimal correctly. But not as the hex value. But I’m not sure what I need in the xml to make it work.

Thank you.
Jason.

I will fix that into next release.

I just worked out a way to incorporate all the DTC codes using the enum function which appears to be working fine as I’ve tested faults. And I’ve realised if there is a new code added I don’t have in the list. I still get the decimal value and can work out the DTC (This would be a rare occurrence of a new code and for my care to trip the fault.)
So, if there is benefit for other ECUs or people to have realdash be able to read the hex value please continue to implement it at whatever priority level you feel. As I have worked my setup out I don’t technically have a requirement anymore.
As always appreciate your willingness to make the product better and help out users.

Thank you again

Jason.