PCAN Basic API

Warning

This PCAN documentation is a work in progress. Feedback and revisions are most welcome!

Interface to Peak-System‘s PCAN-Basic API.

Configuration

An example can.ini file for windows 7:

[default]
interface = pcan
channel = PCAN_USBBUS1

Bus

class can.interfaces.pcan.PcanBus(channel, *args, **kwargs)[source]

Bases: can.bus.BusABC

A PCAN USB interface to CAN.

On top of the usual Bus methods provided, the PCAN interface includes the flash() and status() methods.

Parameters:
  • channel (str) – The can interface name. An example would be PCAN_USBBUS1
  • bitrate (int) – Bitrate of channel in bit/s. Default is 500 Kbs
flash(flash)[source]

Turn on or off flashing of the device’s LED for physical identification purposes.

status()[source]

Query the PCAN bus status.

Returns:The status code. See values in pcan_constants.py
status_is_ok()[source]

Convenience method to check that the bus status is OK