What will happen in CAN?

10,574

Solution 1

There are two cases here

  1. Same ID and the same DATA field
  2. Same ID with a different DATA field

CASE 1: when two nodes are trying to transmit the same ID and the same data field, the CAN will see it as a single message, and it will send it on the CAN bus. Here you really can't say if node 1 is sending or node 2 is sending, because both has the same ID and data.

CASE 2: here the data field is different. Until the arbitration field there will be no problem. Since the data is different for both the nodes you will get a bus error. This is because your data field is protected by a CRC and bit stuffing also will come into the picture.

Solution 2

In a CAN N/W if 2 devices are with same Node Id's, then both devices will not detect & No resquest/ response of messages will takes place. (Nothing will work.. like Bit Stuffing, Arbitration, Error Detection, Bit monitoring, ACK, CRC).

In a N/W if we have differernt ID's, then we can transfer same or different messages. Inorder to take control over the CAN N/W then we use the concept of Arbitration.

Share:
10,574

Related videos on Youtube

Rasmi Ranjan Nayak
Author by

Rasmi Ranjan Nayak

Always ready for programming. Favorite Programming Languages C, C++, Python, Java, Android

Updated on June 04, 2022

Comments

  • Rasmi Ranjan Nayak
    Rasmi Ranjan Nayak almost 2 years

    I had an interview. The interviewer asked me:

    If two nodes are sending two messages of the same identifier (0x100) with different data, who will win the arbitration? Which message will be there on the bus?

    If node 1 wins then what about node 2's message? When will node 2's message be sent?