Page 1 of 1

Intepreting this CAN config

PostPosted: Sun Jul 11, 2021 12:41 pm
by 38D
HI, I am attempting to configure the CAN message from a Porsche GT4 Clubsport to a C187. I have documentation from Manthey Racing as to the messages, but am not sure how some of the values translate to the motec config software. Below is an example of the documentation from the manufacturer. Anyone know how to convert this to a motec config?

Re: Intepreting this CAN config

PostPosted: Mon Jul 12, 2021 1:04 am
by David Ferguson
Do you want someone to do it for you, or teach you how to decode the information?

Re: Intepreting this CAN config

PostPosted: Mon Jul 12, 2021 4:21 am
by 38D
Ideally teach, and I realize that won’t be free.

Re: Intepreting this CAN config

PostPosted: Mon Jul 12, 2021 10:29 am
by David Ferguson
OK, first I would watch these 4 webinars:

I believe most of what you're looking for will be found in there.

Next, HP Academy has some a "CAN Bus Communications Decoded" online course:

I think most of the relavent content would be found in the free MoTeC Webinars, and lot of it focuses on decoding unknown CAN messages (you have big clues) -- but it still might be useful to you.

To get started with your data, open your config in C187 Dash Manger, go to Connections->Communications.. Select the C187 CAN bus that is connected to the CAN bus you have the documentation for, click the New... button.

In the CAN Communications Setup, set the Deice Parameter to "Receive Message", Format to "Binary" and alignment to "Word Swap" (this is the "Intel" Byte order from our docs). Set the Receive Timeout to 1000 milliseconds (1 second).
Enter the Base Address of 0x300 (this is the ID column in your doc).

Now click the "Received Channels" tab. Leave Message type to "Single".
Click the Add... button to add a channel like "Inlet Air Temperature", this would work for the "Intake Temp" row in your document. MoTec uses a byte offset and mask to access the 64 bits (8 bytes of 8 bits each) contained in a can messages. So Start Bit 0, length 8, would be "Offset = 0, Length = 2" in the MoTeC Comms channel.

Next is the tricky bit (pun intended). The Motec base units is in 0.1C, but the Porsche is only reporting in (.75 degC increments. I believe this might get you the correct answer, but I would look at logged data (comparing to the OEM dash) and adjust as needed. Multiplier 750 Divisor 100 Adder 480. (750/100 = 7.5 or 0.75degC per bit).

Note the Water_Temp is the same scaling as the Intake_Temp, but the Offset would be 7 (bit 56 / 8 bits per byte = 7), length 1.

The Manifold Pressure is the challenging one (since it's only 6 bits and will require the correct mask Multiplier/Divider to get things to align correctly). But the other should be fairly straightforward.

Re: Intepreting this CAN config

PostPosted: Mon Jul 12, 2021 12:00 pm
by 38D
This was hugely helpful Dan! Thanks for helping. I should be able to figure the rest out, though dealing with binary bitmasks is always less than fun (and I'm a computer engineer by trade!).

Re: Intepreting this CAN config

PostPosted: Mon Jul 12, 2021 9:55 pm
by MikeD
Hi 38D,
if you set up the CAN on your own you will benefit from the learning effect that comes with such tasks.

However if you want to take a shortcut you may ask Manthey for the matching DBC file, which you can then import with a few clicks... there is still some room for errors as the importer isn't perfect, but pretty sure it will help to get you going.


Re: Intepreting this CAN config

PostPosted: Mon Jul 26, 2021 11:58 pm
by 38D
Finally working on this a bit more. Getting into bitmasks, here's what I am doing which I believe is correct.

Here are two other channels from the config. Since these channels span, but but dont fill the bytes,I need to use a bit mask. Starting with binary, a value of "1" in the bit means it is used, a "0" means it is ignored. So for the acc_lat channel, the binary is 1111111110000000 which in hex is FF80. The one thing I am not sure about is if I need to do any math on the result to "scale" the number; that's a problem for a different day.

Hope this is right and helps someone else (if it's wrong I will edit based on feedback)

Screen Shot 2021-07-26 at 9.45.44 AM2.png
Screen Shot 2021-07-26 at 9.45.44 AM2.png (31.03 KiB) Viewed 2040 times