×

Sale ends todayGet 30% off any course (excluding packages)

Ends in --- --- ---

CAN Bus Communications Decoded: Compound CAN Message

Watch This Course

$199 USD $99.50 USD

-OR-
Or 8 easy payments of only $12.44 Instant access. Easy checkout. No fees. Learn more
Course Access for Life
60 day money back guarantee

Compound CAN Message

03.53

00:00 - In the previous module, we looked in depth at a single CAN data frame and showed how we could construct it to transfer our required data with enough resolution.
00:09 In doing so, we almost filled up an entire data frame with only a few critical parameters.
00:14 So what happens when we want to transmit more data than this? The obvious solution is to create additional data frames on different PIDs.
00:21 Each data frame is then completely separate and constructed exactly as we discussed in the previous course module.
00:28 There's a variation on this that's often used though called a compound message.
00:32 Compounding is a way of transmitting more data than a single frame can contain but still only using a single PID.
00:39 This is done by transmitting multiple frames with that single PID in a particular order with the first 1 or 2 data bytes of those frames being an index.
00:50 The receiving devices use that index to determine what the parameters in the rest of those frames are.
00:56 These frames are then compounded into a single message.
01:00 A good example of message compounding is the generic dash CAN profile defined by Link.
01:06 If we have a look at this in the Link help documentation, we can see how it's laid out.
01:09 There are some initial setup instructions, the most important of these being steps 4 and 7 where we set the message board rate and the PID that this compound structure should be broadcast out on.
01:21 The message structure is then well defined, with the first data byte being the frame index and the second data byte always being 0.
01:28 After this, there are 3 parameters in each frame, all being 16 bits in length with various multipliers and offsets and bit field definitions as defined in the documentation.
01:39 If we configure the Link ECU to output this generic dash profile on PID 1000 which is 0x3E8 in hex, and looked at the raw data on the bus, we would see 14 frames transmitted by the ECU at a time, all on the same PID but each having an increasing frame index number.
01:58 This chunk of 14 frames is the complete compound message.
02:03 It's quite likely that there's a lot of data being transmitted by this profile that isn't needed by any of the other modules on the bus but as long as the bus isn't being overloaded, something we'll be talking about in the next module, this isn't actually a problem.
02:17 It's better to have the data available on the bus in case it's needed, than have to go back and reprogram the transmitting devices to include it later on.
02:25 Whether you use multiple frames on different PIDs or a compounding scheme on the same PID, doesn't make a huge difference.
02:33 As long as there are enough PIDs and space on the bus available for all the messages being sent.
02:38 The use of compounding is done to make the internal coding of the micro processors in the electronics modules more straightforward but it is less efficient than simply using multiple PIDs as each data frame loses some of its space due to having to have an index.
02:52 In these last 2 course modules, we've spent quite a bit of time going over how CAN data frames are constructed as well as what needs to be considered when this is happening, purely because it's important to understand how these decisions are made.
03:05 However it's not actually very common to be constructing the data frames yourself.
03:10 But instead, you're more likely to be working with a device that has a fixed transmission profile and programming receiving modules to suit.
03:17 Or a device with a fixed reception profile and programming transmitting devices to suit.
03:24 Even better is when you can simply select matching pre defined transmission and reception profiles on the modules in the system.
03:31 This is thankfully a pretty common occurrence in the performance automotive aftermarket and in this situation, all you then need to do is specify the communication board rate which will almost always be 1 Mb per second, and the PID.
03:45 The rest of the hard work around parameter length, multipliers and offsets is taken care of for you.

We usually reply within 12hrs (often sooner)

Need Help?

Need help choosing a course?

Experiencing website difficulties?

Or need to contact us for any other reason?