How do we know where the signal EngCoolantTemp is within the message? The DBC file tells us that the signal starts at bit position 16 and is 16 bits long. If we read the data from left to right, we see 9C in the first 8-bit positions (bits 0 through 7), 27 is the second byte in the message (bits 8 through 15), and DC 29 are in bit positions 16 through 31. Bits 16 through 31 represent what we know is the 16-bit value of EngCoolantTemp.
Before we can apply the offset and scaling factor, we must worry about byte order. This is where Byteorder Intel comes into it; the Intel format for byte order is referred to as Little-end-in, or least significant byte first. If the least significant byte is transmitted first, we must reverse the two bytes of the signal and the signal is going to be 29DC. This is the hexadecimal value as transmitted for the signal EngCoolantTemp, before offset and scaling are applied.
Next, we must convert the value to decimal, and we can do this with a hand calculation, or with the calculator on our computer, set in Programmer mode:
29DC (base 16) = 10,716
(If this conversion is not second nature to you, please go back and review numbering systems with different bases, and HEX to decimal conversions.)
Now we’re ready to apply the scale and offset. Both the scale and offset are shown as a decimal number so we apply them to the decimal value we have for EngCoolantTemp, 10,716:
First we apply the scale:
10,716 x 0.03125 = 334.875
Next, applying the offset gives us this:
334.875 – 273 = 61.875
The units on this signal are in dec C so the answer is 61.875 deg C just as shown in the above snip from CANKing.
As you can see, if you look back at the value for EngCoolantTemp above, as interpreted by CANKing, it is the exact value we’ve calculated here. What we’ve manually done here is the exact same calculation done by any software application that uses a DBC file to display data in a human readable format. We’ve taken the raw data received through a CAN bus interface, as it was received from the bus, and applied the definitions and information within the appropriate DBC file, and offset and scaled the raw data to get a human readable value. Without the information in the DBC file the CAN data is useless and without meaning. It is therefore concluded that the DBC file is the most common way of communicating critical information about the identification and the data communicated on a CAN bus.