Reputation: 799
Usually, a remote frame is sent to require data from another node, which sends a corresponding data frame with the same identifier later. But when both of the nodes are sending a data frame, how to avoid the bus conflict?
For example, node A sends a data frame to node B, e.g., move 10mm forward, then node B returns a data frame to node A when the motion is completed. So that both of the messages have the same data and the identifiers are same.
Update
Currently the node id is assigned to an entire PCB, which contains mulitple components like sensors and motors. According to Lundin's post, I realize that it's impossible to distinguish these components. There is a high possibility to lead to bit error, when sending messages to a mortor, and meanwhile get a response message from sensors, for example. No arbitration takes effect in this case. So, are the following points the best practices?
Upvotes: 0
Views: 1584
Reputation: 215255
This is not a problem as long as they never send at the same time. If you implement a handshaking scheme like the one you describe, where only one node is allowed to send data at a time, it will work fine.
Otherwise it is common to use node id to distinguish between nodes. For example if your data has identifier 0x100
, then node A can send id 0x100
and node B id 0x101
. The receiver can then treat these the same.
Upvotes: 1