In this article, we will explore how the CAN bus bitrate and the number of transmitted objects are interdependent. Common sense suggests that if the total number of bits transmitted through the bus exceeds the total bitrate, data transmission will fail. In the following paragraphs, we will demonstrate the calculation of total transmitted bits over cycle times through examples, provide the calculation formula, and present tables with various bitrates and cycle times that define the maximum allowed number of TPDOs. 


_________________________________________________________________________________________________________

1. Example: CAN Bus Load Calculation for 1 Mbps Baud Rate 


In this example we will calculate the required time to sent 8 TPDOs and one Heartbeat message through the CANbus with 1 Mbos transmition rate.


Scenario: 

  • Baud Rate: 1 Mbps 
  • TPDOs: 8 Transmit Process Data Objects (TPDOs) each with 8 bytes 
  • Heartbeat Message: 1 additional message with 1 byte 
  • Cycle time: 1 ms
 

Calculation of Bus Load: 


  • TPDO Frame Size Calculation: 
  • Start of Frame (SOF): 1 bit 
  • Arbitration Field: 11 bits (Standard Identifier) 
  • Control Field: 6 bits 
  • Data Field: 64 bits (8 bytes. Change this if the object size is smaller) 
  • CRC Field: 15 bits + 1 bit delimiter 
  • ACK Field: 2 bits 
  • End of Frame (EOF): 7 bits 
  • Interframe Space (IFS): 3 bits 
  • Total Frame Size for one TPDO: 110 bits 


  • Heartbeat Frame Size Calculation: 
  • Total Frame Size for Heartbeat: 54 bits (Standard value)  


  • Total Length Calculation: 
  • Length for 8 TPDOs (8 bytes each): 
  • Each TPDO: 110 bits 
  • Total for 8 TPDOs: 8×110 bits=880 bits   
  • Length for 1 Heartbeat (1 byte): 
  • Heartbeat: 54 bits 
  • Total Length Calculation: 
  • Total length for 8 TPDOs: 880 bits 
  • Total length for Heartbeat: 54 bits 
  • Total Length: 880 bits+54 bits= 934 bits 


  • Conversion to Microseconds (µs): 
  • At a baud rate of 1 Mbps, each bit takes 1 microsecond (1 bit = 1 µs). 
  • Total Time in µs: 
  • Time for 8 TPDOs: 880 µs 
  • Time for 1 Heartbeat: 54 µs 
  • Total Time: 934 µs  


Conclusion: 


The total transmission time of 934 µs for all 8 TPDOs and 1 Heartbeat message fits within the 1 ms (1000 µs) cycle time. 

This configuration leads to a very high bus load, reaching 99% as measured by PCAN. 


 

_________________________________________________________________________________________________________

2. Formula to Calculate Maximum Allowed TPDOs


To calculate the maximum number of TPDOs that can be transmitted within a given cycle time, use the following formula:



Where: 


  • Max TPDOs = Maximum number of TPDOs 
  • Cycle Time = The configured cycle time that each set of objects should be transmitted  (in seconds) 
  • Heartbeat bits = Total number of bits for the heartbeat message (optional) 
  • TPDO bits = The total number of bits of each TPDO


 

 

_________________________________________________________________________________________________________

3. Table of Maximum TPDOs for Different Bitrates 


This table provides an easy reference for determining the maximum number of TPDOs that can be transmitted at different bitrates and cycle times. 


 

Bitrate

 (Mbps) 

Cycle Time 

(µs) 

Time for 1 TPDO (µs) 

Time for 1 Heartbeat 

(µs) 

Maximum TPDO

1 

1000 

110 

54 

8 

0.5 

1000 

220 

108 

4 

0.25 

1000 

440 

216 

1 

1 

2000 

110 

54 

17 

0.5 

2000 

220 

108 

8 

0.25 

2000 

440 

216 

4 



Calculation for Different Bitrates: 



1 Mbps / 1 ms cycle time: 


  • TPDO: 110 µs 
  • Heartbeat: 54 µs 
  • Cycle Time: 1000 µs

       

 


0.5 Mbps / 1 ms cycle time: 


  • TPDO: 220 µs 
  • Heartbeat: 108 µs 
  • Cycle Time: 1000 µs



1 Mbps / 2 ms cycle time: 


  • TPDO: 110 µs 
  • Heartbeat: 54 µs 
  • Cycle Time: 2000 µs