What's The Maximum CAN Bus Frame (message) Rate At 125 Kbit/s?

6 min read Sep 26, 2024
What's The Maximum CAN Bus Frame (message) Rate At 125 Kbit/s?

The Controller Area Network (CAN) bus is a robust and widely adopted communication protocol in automotive and industrial applications. It facilitates communication between various electronic control units (ECUs) in a system, enabling them to exchange data efficiently and reliably. One crucial aspect of CAN communication is the message rate, which determines how frequently messages can be transmitted over the bus. In this article, we delve into the relationship between the CAN bus bit rate and the maximum message rate, focusing specifically on the 125 kbit/s bit rate.

Understanding CAN Bus Frame Rate

The maximum message rate on a CAN bus is influenced by several factors, including the bit rate, message length, and bus load. The bit rate, expressed in kilobits per second (kbit/s), represents the speed at which data is transmitted over the bus. A higher bit rate indicates faster data transmission. However, the message rate, measured in messages per second (msgs/s), is not directly proportional to the bit rate.

Calculating the Maximum Message Rate

To calculate the maximum message rate, we need to consider the time required to transmit a single CAN message. This time is determined by the message length, the number of bits per message, and the bit rate.

1. Message Length:

A CAN message consists of a header and a data field. The header includes various control bits like the identifier (arbitration ID), remote transmission request (RTR) bit, and data length code (DLC). The DLC indicates the number of data bytes in the message.

2. Number of Bits per Message:

The total number of bits per message can be calculated as follows:

  • Header bits: 29 bits (fixed)
  • Data bits: 8 bits * DLC (data length code)
  • CRC bits: 15 bits
  • ACK bit: 1 bit
  • EOF bits: 7 bits

Total bits per message: 29 + (8 * DLC) + 15 + 1 + 7 = 52 + (8 * DLC)

3. Time per Bit:

The time per bit is calculated by dividing 1 second by the bit rate. For a 125 kbit/s bit rate, the time per bit is:

Time per bit = 1 second / 125,000 bits/second = 8 microseconds (µs)

4. Time per Message:

The time required to transmit a single message is calculated by multiplying the number of bits per message by the time per bit:

Time per message = (52 + (8 * DLC)) bits * 8 µs/bit = (416 + 64 * DLC) µs

5. Maximum Message Rate:

The maximum message rate is the reciprocal of the time per message:

Maximum message rate = 1 / ((416 + 64 * DLC) µs)

Maximum Message Rate at 125 kbit/s

For a 125 kbit/s CAN bus, the maximum message rate varies depending on the data length code (DLC). The following table illustrates the maximum message rate for different DLC values:

DLC Data Bytes Maximum Message Rate (msgs/s)
0 0 2404
1 1 1538
2 2 1024
3 3 769
4 4 610
5 5 512
6 6 441
7 7 391
8 8 352

Conclusion:

The maximum message rate on a 125 kbit/s CAN bus is inversely proportional to the data length code (DLC). As the DLC increases, the time required to transmit a message increases, resulting in a lower maximum message rate. Therefore, choosing an appropriate DLC based on the application's data requirements is crucial for maximizing message rate and communication efficiency.

Note: These calculations provide theoretical maximum message rates. In real-world scenarios, factors such as bus load, message priorities, and network delays can affect the actual message rate.