CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

CANopen

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
notbad



Joined: 10 Jan 2013
Posts: 68

View user's profile Send private message

CANopen
PostPosted: Wed Nov 13, 2013 4:05 am     Reply with quote

Hi
There is an industrial motor drive with a CANopen port which i want to control using a PIC with a built-in CAN.
Is this possible? Where do I get stated?
notbad



Joined: 10 Jan 2013
Posts: 68

View user's profile Send private message

PostPosted: Sat Nov 16, 2013 6:34 am     Reply with quote

Does the CAN controller inside the pic automatically Re-transmit the messages that didn't get acknowledged?
Can we be sure that when a send command is issued, the message is delivered unless there is a connection problem?

Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Nov 16, 2013 3:29 pm     Reply with quote

See this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=22772

Also, do a Google search for this:
Quote:
site:microchip.com "can bus" retransmit
RF_Developer



Joined: 07 Feb 2011
Posts: 839

View user's profile Send private message

PostPosted: Sun Nov 17, 2013 2:59 am     Reply with quote

notbad wrote:
Does the CAN controller inside the pic automatically Re-transmit the messages that didn't get acknowledged?
Can we be sure that when a send command is issued, the message is delivered unless there is a connection problem?
Thanks


Some CAN gotchas:

CAN is a broadcast message passing bus. It is not a point to point comms link. It is not addressable. This has possibly unexpected consquences:

Any CAN device running at the right speed and correctly connected will acknowledge CAN messages. The CAN interface will retransmit any message that are not correctly acknowledged. The buffering in the CAN interface means that it is not possible to ensure any message has been transmitted, nor that it is sent in any particular order in relation to other messages.

The buffering means that when a CAN node locks up and refuses to transmit it is not the message on which the lock-up appears to happen, rather it is two messages prior to the lock up that the node is trying to transmit. I.e. message A fails to transmit and continually resends. Then software tries to send message B, which the CAN interface accepts and buffers, despite message A not having been successfully transmitted. Then software tries to send message C, which also is buffered. However, when the software tries to send message D, it fails as there is no transmit buffer space, BUT message A is still being re-sent, and B and C haven't been sent at all.

As ANY and all active CAN nodes can acknowledge, an acknowledgement does not mean the message has been received correctly by the intended node: all messages are broadcast to all nodes and they are not addressed to specific nodes. One point that sometimes catches developers out is that CAN monitors are just another CAN node, and they generally will acknowledge all messages on the bus, though some may have a setting where they will not acknowledge.

All good fun :-)
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group