Jump to content

CAN input calculation


wastegate

Recommended Posts

Hi Link, I asked this question on the FB group but seems it was a stupid question and got usual Toxic replies. It might be a simple one but I feel like I'm doing it wrong or it's the limits of what the CAN calculation can do..

I have a J1939 CAN message coming into the G4X. 

CAN ID 419362819 (Extended)
J1939 Transmission Oil Temperature
0.03125/unit with -273 offset.

Link CAN
Start Position 39 Width 16 LS First Unsigned.
Raw CAN message = 9881
9881 x 0.03125 - 273 = 35.78c which is 100% what I want (Cold Transmission).

However I can not put in <1 numbers in the multiplier 
So I'd need to multiple 9881 x 3125 / 100000 - 273 but I can't have a divider >10000.
Doing 9881 x 312.5 would be ok but I can't have a decimal in the multiplier so I'd need to round up to 313 which results in a inaccurate final temp.

For now I'm just piping the Raw CAN to a Math Block and doing the required math then outputting to a GP Temp but I'd really like if there is a simple way to get the CAN itself to do the math right? 

 

Link to comment
Share on other sites

If anything, I want it to goto GP Temp 3 so I can log it, and also push it to my dash.

At the moment it's going there but only via a math block to get the correct result.

Raw CAN value example is 9881 (as stated in OP)

How would you ingest this data into the ECU? Given it has a 0.03125/bit and -273c offset?

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...