How to measure CAN bus loading

Ask any questions about using PicoScope 6 Automotive software here.
Post Reply
joshnovak
Newbie
Posts: 1
Joined: Thu Oct 08, 2020 3:35 pm

How to measure CAN bus loading

Post by joshnovak »

Quick question,

I'm diagnosing CAN fault issues on a Kenworth CAN bus and the customer has aftermarket telematics and GPS installed onto the public CAN. Is there a way to measure and log the bus loading to see if these components are overloading the bus?

Thanks!

muttnjeff
TwoWaves
TwoWaves
Posts: 72
Joined: Tue Jul 21, 2020 7:19 pm

Re: How to measure CAN bus loading

Post by muttnjeff »

Ran into this quite a bit, can’t say for certain how to determine can overlaying but what we typically found was improper connection of aftermarket components, anything from scotch locks to removing termination resistors and tapping into the harness ends.

vdompierre
Newbie
Posts: 2
Joined: Tue May 12, 2020 12:44 pm

Re: How to measure CAN bus loading

Post by vdompierre »

Which interface are you using for diagnostic with your diagnostic software?

If you're using a Nexiq USB link you can see the bus loading with the device tester provided with the Nexiq driver.
Attachments
Device tester.pdf
(34.39 KiB) Downloaded 502 times

Steve Smith
Pico Staff Member
Pico Staff Member
Posts: 1587
Joined: Sun Aug 25, 2013 7:22 am

Re: How to measure CAN bus loading

Post by Steve Smith »

Hello and thank you for the post

The following link will help with CAN Bus load calculation which does state that such a calculation can only be an estimate https://kb.vector.com/entry/1519/

Below we have used the CAN Guided Test example waveform…
“Communications > CAN bus > CAN bus serial decoding”

The first step is to determine the baud rate which is calculated by measuring the smallest single bit of a CAN packet

The image below demonstrates 2 methods:

• Measure the frequency of the smallest bit (499 kHz) which equates to a CAN baud rate of 500 kbs (Choose the nearest applicable baud rate)
250 kbs would be 250 kHz
125 kbs would be 125 kHz

• Measure the time difference (Delta) between the time rulers positioned either side of the smallest bit (2µs). Use the formula “1/baud rate” calculation to qualify the measured time
1/500,000 bits per second = 0.000002 seconds (2 µs) for a baud rate of 500 kbs
1/250,000 bits per second = 0.000004 seconds (4 µs) for a baud rate of 250 kbs
1/125,000 bits per second = 0.000008 seconds (8 µs) for a baud rate of 125 kbs
Image 1
Image 1
Note in the capture below we have placed the time rulers at 0.2 s and 1.2 s positions on the graph. The difference (delta) between these time rulers is 1 second

Now use the serial decode feature of PicoScope 7 to determine the number of CAN packets transmitted in 1 second. The following link will help viewtopic.php?p=101144#p101144

N.B remember to select “Decode between time rulers” to ensure the decode table consists of all the packets transmitted in 1 second only
Image 2
Image 2
Once the decoder is created as above, the decode table will only consist of packets transmitted between the rulers (i.e. in 1 second)
Image 3
Image 3
Click on the “Packet” header arrows (in the decode table) to organize the packets in descending order. Above we can see 778 packets were transmitted in 1 second

Using the information contained in the initial Vector link above, a typical CAN packet contains approx. 125 bits. We now each bit is 2 µs long, therefore 2 µs/bit x 125 = 250 µs per packet

The time taken to transmit 1 x packet on the CAN bus = approx. 250 µs

Based on these values, how many packets can we transmit in 1 second at a baud rate of 500 kbs?

1/0.000250 seconds (transfer rate of 1 packet in seconds) = 4000 packets per second
4000 packets per second = 100 % bus loading
This is the maximum number of packets transferable on the CAN bus

Returning to our decode table, we have 778 packets transmitted in 1 second.

To determine the percentage of bus loading at 778 packets per second:

778/4000 = 0.1945 x 100 = 19.45% bus load.

Once again, the above is an approximation and does not account for CAN FD or packets containing 29-bit identifiers (the above is based on 11-bit identifiers)

I hope this helps, take care……Steve

Post Reply