Skip to main content

Interface between the SUNIX SDC Expansion Board Software and python-can

Project description

This plugin adds support for the ThinkEdge SE50's CAN-bus controller to the python-can library. Specifically, the ThinkEdge SE50 provides a CAN-bus connection via a SUNIX Industry card.

System requirements

  • Hardware: ThinkEdge SE50
  • Operating system: Ubuntu 20.04 GA

Installation

  1. Download and unzip the drivers from Lenovo
  2. This folder contains a PDF with the name "SDC Expansion Board SDK Document1.0.2-linux.pdf". Follow the instructions inside the PDF to install the driver and to check the driver status. You can disregard all instructions that come after.
  3. Run pip install path/to/thinkedgecan.

Usage

Refer to the documentation of python-can for general usage.

Create the Bus object with the following code:

from can import ThreadSafeBus

with ThreadSafeBus(interface="sunix", baudrate=500) as bus:
    ...

For the baudrate, you can choose one of 125, 250, 500 and 1000 kbit/s. All devices on a CAN-bus must use the same baudrate.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thinkedgecan-0.1.2.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

thinkedgecan-0.1.2-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page