File: systec.rst

package info (click to toggle)
python-can 4.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,372 kB
  • sloc: python: 25,840; makefile: 38; sh: 20
file content (78 lines) | stat: -rw-r--r-- 2,523 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
.. _systec:

SYSTEC interface
================

Windows interface for the USBCAN devices supporting up to 2 channels based on the
particular product. There is support for the devices also on Linux through the :doc:`socketcan` interface and for Windows using this
``systec`` interface.

Installation
------------

The interface requires installation of the **USBCAN32.dll** library. Download and install the
driver for specific `SYSTEC <https://www.systec-electronic.com/en/products/>`__ device.

Supported devices
-----------------

The interface supports following devices:

- GW-001 (obsolete),
- GW-002 (obsolete),
- Multiport CAN-to-USB G3,
- USB-CANmodul1 G3,
- USB-CANmodul2 G3,
- USB-CANmodul8 G3,
- USB-CANmodul16 G3,
- USB-CANmodul1 G4,
- USB-CANmodul2 G4.

Configuration
-------------

The simplest configuration would be::

    interface = systec
    channel = 0

Python-can will search for the first device found if not specified explicitly by the
``device_number`` parameter. The ``interface`` and ``channel`` are the only mandatory
parameters. The interface supports two channels 0 and 1. The maximum number of entries in the receive and transmit buffer can be set by the
parameters ``rx_buffer_entries`` and ``tx_buffer_entries``, with default value 4096
set for both.

Optional parameters:

* ``bitrate`` (default 500000) Channel bitrate in bit/s
* ``device_number`` (default first device) The device number of the USB-CAN
* ``rx_buffer_entries`` (default 4096) The maximum number of entries in the receive buffer
* ``tx_buffer_entries`` (default 4096) The maximum number of entries in the transmit buffer
* ``state`` (default BusState.ACTIVE) BusState of the channel
* ``receive_own_messages`` (default False) If messages transmitted should also be received back


Bus
---

.. autoclass:: can.interfaces.systec.ucanbus.UcanBus
    :members:


Internals
---------

Message filtering
~~~~~~~~~~~~~~~~~

The interface and driver supports only setting of one filter per channel. If one filter
is requested, this is will be handled by the driver itself. If more than one filter is
needed, these will be handled in Python code in the ``recv`` method. If a message does
not match any of the filters, ``recv()`` will return None.

Periodic tasks
~~~~~~~~~~~~~~

The driver supports periodic message sending but without the possibility to set
the interval between messages. Therefore the handling of the periodic messages is done
by the interface using the :class:`~can.broadcastmanager.ThreadBasedCyclicSendTask`.