chipKIT® Development Platform

Inspired by Arduino™

CAN bus ID's

Created Tue, 23 Oct 2012 15:01:16 +0000 by Bravo685


Bravo685

Tue, 23 Oct 2012 15:01:16 +0000

I need help with answering this question. Can multiple CAN id's exist on the CAN bus?

The reason I ask is, I wish to read in data from the CAN bus and create an action based on this data. This action is a button when manually pressed sends out a '0' for open or '1' for closed over the bus as an existing id. Instead of pressing the button I want to control it via the chipKit. In other words I want to be able to send the bit that says the button was pressed using the chipKit.

I know that two id's can not co-exist but how do CAN analyzers do it? My CAN analyzer can transmit any data over the bus even if the id is in use.

Any thoughts? Has anyone tried this yet, was it successful?

Thanks, Rob


mkirby

Tue, 23 Oct 2012 23:26:51 +0000

Are you sure that your CAN analyzer does not simply wait for an idle period on the bus and then do a re-transmit? This is how the CAN protocol works. You will not be able to have two frames on the bus at the same time, but as soon as the first frame transmission is complete the bus should be free for a re-transmit of the waiting frame. For your given circumstance this should be adequate I would think.


Bravo685

Wed, 24 Oct 2012 00:23:38 +0000

Thank you mkirby, I will give it a try.


MGLSOFT

Fri, 26 Oct 2012 00:42:25 +0000

It's very rare that you say, one should not be possible id repeated in CAN BUS, because if there is a chance that both teams are giving the same data at the same time, there will be a collision, since the arbitration never work, and can be fatal to the bus.

You can have several different IDs on the same machine, of course, and you should be able to prioritize IDs few posts over others, and separate functionalities hierarchy.

But please, controls IDs are not repeated ever! :mrgreen: :mrgreen:


Bravo685

Fri, 26 Oct 2012 13:31:46 +0000

It's very rare that you say, one should not be possible id repeated in CAN BUS, because if there is a chance that both teams are giving the same data at the same time, there will be a collision, since the arbitration never work, and can be fatal to the bus. You can have several different IDs on the same machine, of course, and you should be able to prioritize IDs few posts over others, and separate functionalities hierarchy. But please, controls IDs are not repeated ever! :mrgreen: :mrgreen:

Understood about the IDs not being duplicated. The CAN spec states this and I was aware of it. What I'm now trying to duplicate is how my CAN analyzer can re-transmit an existing ID with modified data. I'am working on this now and will update once I have it working.