0
\$\begingroup\$

I want to send raw data with CANopen. Which COB-ID should I use then?

My goal is to transmit for example an array of X bytes and when the receiver got that array, it going to understand how to intepret that array of X bytes.

For example when I use SAE J1939, to send raw data, i need to use DM16 message combinding with Transport Protocol Data Transfer(TP.DT) and Transport Protocol Connection Management (TP.CM)

  1. I first create my array of X bytes.
  2. Then I begin to send a TP.CM mesage how many bytes (total bytes of the array), in how many packages(8 bytes = 1 package), and what type of message(PGN number of DM16).
  3. Then I send my bytes, package after package by using TP.DT
  4. When the receiver got all packages, it look what kind of message it is, then the receiver re-construct the message and bring the array of X bytes to the user.

That's how raw data transfer is done with SAE J1939. Here is an example how DM16 works

Question:

How is that done in CANopen?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Generally you would use one of the TPDO COBID, because these are meant to be used for data and only PDO can have other data length (DLC) than 8 bytes. There are standard COBID for PDO - you can check out the GPIO module standard DS401 and mimic it as far as possible. That means you'll have to have node id as well, which gets added as offset to the COBID.

In practice CANopen allows you to use custom identifiers too though, long as they don't collide with any reserved ones.

For larger data it is also possible to use SDO, which has a bit of protocol support for fragmented data over several frames and is therefore a better fit for the scenario you describe. But then you probably need to implement some manner of Object Dictionary too and the complexity grows quite a bit.

\$\endgroup\$
2
  • \$\begingroup\$ Thank you. Can you refer to some available resources? \$\endgroup\$
    – DanM
    Oct 7, 2021 at 12:18
  • \$\begingroup\$ And also examples i bytes. That would be good. \$\endgroup\$
    – DanM
    Oct 7, 2021 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.