pythonrcanopen

Tools to convert CANopen raw data using *.dbc file?


I'm pretty new with CANopen, and also a little bit shooting in the dark... I would like to know if there are tools or packages in R or Python to convert raw data logged from a CANopen device, to human readable values, with a *.dbc file? Does someone have experience with this? In advance thank you for your answers.


Solution

  • Looks like cantools might do the trick:

    https://pypi.org/project/cantools/

    It can decode CAN data using a DBC file. For actually reading the CAN bus it integrates with python-can.

    https://python-can.readthedocs.io/en/master/index.html#

    To read CAN data from a log file there's a module in python-can for that

    https://python-can.readthedocs.io/en/master/listeners.html

    And finally if you want to interact directly with a live CANopen bus there's the CANopen for Python library

    https://canopen.readthedocs.io/en/latest/