Transfer binary file with CANopen

611 Views Asked by At

I would like to transfer a binary file to a CANopen node. The binary file should finaly written in an Eeprom of the CANopen node.

I'm not sure how I must setup my Object Dictionary for that?

My idea would be to have different objects as manufacturer specific parameters:

  • DataIn (array, domain, ... ???)
  • Command write
  • Status of action

What's the state of the art way to do this?

2

There are 2 best solutions below

0
On BEST ANSWER

I worked with CANopen but binary transfers I only did with CAN so far.

Checking the CANopen cia 301 documents, I would go with the DOMAIN type, as it fits the problem well:

  • DOMAIN (Object code 2): Large variable amount of data e.g. executable program code.
  • Domains can be used to transfer an arbitrary large block of data from a client to a server and vice-versa. The contents of a data block is application specific.

The tutorial from canopennode has a "Demo domain" part with some examples.

Usually in a CANopen stack you then can react to a received object and start writing to eeprom etc.

0
On

I am not aware of any way how to send the files over CANopen and I am affraid it is not intended for this purpose. If, for any reasons, you need to transfer a file the best approach will be to mount the FS in a senders node, read the file and send the data over SDO service, the block SDO communication fits the best. Look also here https://youtu.be/GB-a6JRC9WM