Search code examples
can-buscanopen

Transfer binary file with CANopen


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?


Solution

  • 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.