I2C SPI USB CAN eSPI Cable Testing View All Quick Start Guides User Manuals Software Downloads Knowledge Base Videos Case Studies App Notes White Papers Sales Support About Us
Products Blog Sales Support Contact Search
Can I Measure the CAN Bus Load with the Komodo CAN Duo Interface?
Rena Ayeras

Question from the Customer:

I am using the Komodo CAN Duo Interface with Komodo Software API. I’m using km_https://www.totalphase.com/products/komodo-software-api/can_read() to retrieve the CAN data. To ensure system capacity is not overloaded, I need to know the CAN bus load. It looks like I can’t get the number of raw bits per frame – is there another way to measure the bus load?

 

Komodo API Software can be used to create custom functions for your setup.

 

Response from Technical Support:

Thanks for your question! As you noted, extracting raw bits is not available - the Komodo interface decodes the CAN packet and returns the data at the byte level. However, you can calculate the bus load using the Komodo Software API command km_read(), which may be accurate enough for your project.

Overview of Calculating the CAN Bus Load

The CAN bus load is based on the used capacity divided by maximum capacity. For example, the maximum capacity in a 125 KHz rate CAN system is 1 s * 125 KHz = 125000 bits/s.

On the CAN bus, the overhead in a CAN frame is known:

  • 1 bit is stuffed for every 4 bits
  • The SoF/EoF/CRC/etc., which is common for every frame.

Bus Load Calculation Method

Here is an example, which is based on accumulating the data frames and then calculating the bus load:

  1. Call km_read() in a 5-second loop
  2. Accumulate all the packets returned by the Komodo interface within that time frame.
  3. Use the timestamp of the first packet, which we’ll name t0.
  4. Use the timestamp of the last packet, t1
  5. Calculate the total capture time t: (t1 - t0) + time for last packet
  6. Calculate the total number of bits in this time frame, which is based on the data returned by km_read() (total_bits): bus load = total_bits/t * 125000

For more information about calculating the bus load of a can bus, please refer to this article provided by Electrical Engineering.

For more information about API commands, please refer to the API Documentation section of the Komodo CAN Interface User Manual.

Additional resources that you may find helpful include the following:

We hope this answers your questions. If you have other questions about our CAN interfaces or other Total Phase products, feel free to email us at mailto:sales@totalphase.com. You can also request a demo that is specific for your application.