Python script to interpret CAN traces as CANopen messages according to CiA DS301 / V4.2.0.
See CiA group for specification.
Controller Area Network (CAN bus) is a vehicle bus standard designed 1983 by Robert Bosch GmbH.
CANopen is a higher level communication protocol and device profile specification for embedded systems used in automation based on CAN.
There are many tools available to record CAN messages. Usually they provide simple text files.
But for CANopen it would mean to translate all bytes manually since they usually do not provide higher level interpreters out of the box.
I did not found any free tools to interpret CANopen at all. And even (expensive) professional tools don't present all data (which I am interessted in).
So this (incomplete and non perfect) tool might help.
usage: analyze.py [-h] -s SOURCE [-o OUTPUT] -f {pcan}
( on Windows: py analyze.py [-h] -s SOURCE [-o OUTPUT] -f {pcan} )
options:
-h, --help show this help message and exit
-s SOURCE, --source SOURCE
trace file (*.*)
-o OUTPUT, --output OUTPUT
output file (*.csv)
-f {pcan}, --format {pcan}
trace format type ('pcan')
CAN trace file. (currently only PCAN-View *.trc is supported)
output file. (currently only CSV with ';' as separator is supported)
- pcan : PCAN-View *.trc files (currently only V1.1 is supported)
py analyze.py -s sample1.trc -o sample1.csv -f pcan