Open search

Protocol stack

CANopen for Python

The Python script realizing CANopen communication by Christian Sandberg is still under development. It implements the CANopen protocols and the object dictionary.

CANopen for Python is an open-source project initiated by Christian Sandberg (Photo: CiA)

The open source approach uses the Python script language to implement the CANopen application layer. It supports currently the basic CANopen communication functions including the object dictionary. The software is available in source code. The release 0.4 introduces an improved documentation, the ability to open SDO variables as readable files, callbacks for PDOs, and a node scanner function.

The CANopen object dictionary is represented as Python dictionary. It is normally provided when creating a node. The protocol stack supports NMT functionality as well as SDO, PDO, EMCY, and SYNC protocols. The aim of the project is to support the most common parts of the CiA 301 specification for a master node wrapped in a Pythonic interface.