4

Im working on a project that requires me to use CAN for communication. There are 3 Master nodes and 48 slave nodes. Each Master does the same functions(for redundancy in decisions and voting). Each master will be sending about 64 bytes of data per transfer to a slave and receiving about 40 bytes of data back from the slave. Per CAN transfer of message only 8 bytes of data is possible. After sending 8 bytes each master node has to wait for acknowledgement from the slave before sending the next 8 and so on. Currently im implementing this myself.

My question is: Are there any CAN Application layer protocols that i can refer to and implement a customised protocol to handle large packets of data ?Im not looking for hardware level of details about the CAN. Im looking for how to handle packets of data in software once they arrive(like using software besed mailboxes using received ID etc)

AlphaGoku
  • 968
  • 1
  • 9
  • 24
  • [CANopen](https://en.wikipedia.org/wiki/CANopen) could be useful. – LPs Jan 14 '16 at 07:05
  • @LPs CANopen doesn't define the higher layers though, I don't really see how it would add anything beyond doing the same with raw CAN data frames and RTR frames. Perhaps CANopen would add a bit of structure. Possibly you could also do this with CANopen SDOs rather than the obvious PDOs, since there is a SDO mechanism which supports splitting larger amounts of data into packages. But it is all quite burnensome to implement, especially if done by the book. – Lundin Jan 14 '16 at 08:04
  • @Lundin Yes. It was a suggestion to use a well structured protocol, maybe to avoid acks an nacks at application layer. – LPs Jan 14 '16 at 08:09
  • So you guys recommend i have a look at CAN Open??? iv heard about j1939 for large data...is it good? – AlphaGoku Jan 14 '16 at 09:00
  • each node on the can bus will have one or more 'mailboxs' that can be set to either consume or ignore specific values in the 'identifier' field (for a standard message, that means ignoring/observing certain bits in a 11 bit field. for an extended message, the same ignoring/observing bits in a 28 bit field. As an example, the first 2 bits could be used to identify the master that originated/or is the destination of the message. the next 6 bits could be used to identify the slave. with a standard message the last three bits could be used for sequencing message 0...7. – user3629249 Jan 14 '16 at 14:29
  • (cont) the 0...7 sequencing is enough for the 64 bytes of master sent data and/or 40 bytes of slave data. by each node masking the identifier field into only paying attention to certain bits. all the communication routing and data sequencing is handled – user3629249 Jan 14 '16 at 14:31
  • What was the reason for downvoting this question? – AlphaGoku Feb 04 '16 at 06:20

1 Answers1

2

I don't know why it hasn't been answered before, but ISO-TP (ISO 15765-2) is designed to do exactly that.

Osman-pasha
  • 634
  • 8
  • 18