Hello,
We are using CAN bus with a proprietary (non-standard) high level protocol. There can be an arbitrary number of nodes connected to the bus, and at start-up we auto-assign node IDs using a master node that assigns a different CAN ID to every slave node. The nodes use this CAN ID to transmit their CAN packets.
Initially, some nodes have the same node ID and send frames (at the same time) with same CAN ID and their serial numbers in the CAN data. We know that CAN packets with same ID and different data are not supposed to be sent in a "well-designed" system, but we only do this at the beggining to automatically assign different IDs to each node, based on their serial number (which is always different). There only are identical Piccolos in this CAN bus.
This process works well, but we noticed that the two nodes with the same ID compete for a few miliseconds to send the packet, and because they have different data, they get errors during these retries. After this time (around 6 to 8ms) one of the nodes sends the packet successfully and almost immediately the other one sends it too.
The strange thing is that after this first time where the two nodes compete to send the packet for 6-8ms, if they want to send again under the same conditions (packet with same ID and different data), this time there is some kind of arbitration that works like the CAN ID arbitration that makes one of the nodes immeditialy send the data first (without any retry) and then the other node. The node that "wins" is the one with the first different/dominant bit, which is identical to the arbitration used in the CAN ID.
We thought that the modules may be going to error-passive mode, however the EP bit in CANES is 0 and CANTEC is 127 when this "data arbitration" starts to work.
We would like this "data arbitration" to be always active because it makes our protocol very clean and consistent.
Can somebody explain this behaviour and tell me how to enable it during the configuration?
Thank you in advance,
Max