python-can-sontheim

A python-can interface driver for Sontheim Industrie Elektronik CAN bus interfaces


Keywords
CANbus, Sontheim, python-can, CANfox
License
LGPL-3.0
Install
pip install python-can-sontheim==0.1.3

Documentation

python-can-sontheim

Latest Version on PyPi Supported Python implementations coverage Downloads on PePy

This module is a plugin for the python-can. module, that allows the use of CAN interfaces that rely on the Sontheim Industrie Elektronik (SIE) MTAPI drivers (windows only). These include the SIE CANfox (including rebranded versions such as that by IFM), SIE CANUSB, etc.

Installation

Install using pip:

$ pip install python-can-sontheim

Usage

In general, useage is largely the same as with the main python-can library, using the interface designation of "sontheim". When integrating the sontheim interface into scripts, it is possible to import constants, device deisgnations etc from the python-can-sontheim module using "import can_sontheim". For the majority of the use cases, using an SIE interface is as simple as amending any python-can examples with the lines shown below:

Create python-can bus with the SIE CANfox USB interface:

import can
from can_sontheim import devices

bus = can.Bus(interface="sontheim", channel=devices.CANfox.CAN1, bitrate=250000, echo=False)

Some examples are present in the python-can-sontheim/examples directory in the repository, and more complete documentation specific to the SIE interfaces and driver will be uploaded to this module in due course.