Skip to main content

Package that let easily interact with the Xcom-CAN device

Project description

Python library to access Studer-Innotec Xcom-CAN with the Studer Public Protocol using CAN 2.0B frames

Prerequisites

Please read the complete documentation available on : Studer Innotec SA -> Support -> Download Center -> Software and Updates -> Communication protocols Xcom-CAN

Getting Started

1. Package installation

$ pip install xcomcan

2. Hardware installation

  • Connect your Xcom-CAN (Studer side) to your installation using the cable provided with the device

  • Connect your Xcom-CAN (External side) to your controller (personal computer, Raspberry Pi, etc.) using a USB to CAN adapter (Kvaser, etc.)

  • Please refer to the Xcom-CAN manual for more information about commissioning the device

3. Xcom-CAN Protocol selection

Interaction with the Xtender/Vario systems through third party devices such as PLC or SCADA requires to select Studer Public Protocol with dip switches as shown below. There’s two operation modes available :

  • Exclusive : This configuration is recommended when there is only one device communicating with the Studer Public Protocol on the external CAN interface. The Xcom-CAN will send a response to every frame that appears on the external CAN interface. For frames which do not fit the Studer Public Protocol specifications, the Xcom-CAN will send an error frame message. This mode is practical for debugging as every frame sent by the PLC/SCADA will get a response. It will also detect any frame that could be corrupted when transmission occurs.

  • Tolerant : This configuration is recommended when there are several devices communicating with different protocols on the external CAN interface. The Xcom-CAN will only send a response to the frames that completely fit the Studer Public Protocol specifications. This mode enable the installer to extend the CAN bus on the external interface and to add others devices that can communicate with the PLC/SCADA on the same physical support as the Xcom-CAN.

Xcom-CAN Dip switches protocol selection

N° 1

N° 2

N° 3

N° 4

Studer Public

OFF

ON

OFF

OFF

Exclusive Protocol

OFF

ON

OFF

ON

Tolerant Protocol

4. Software configuration

Set the Studer CAN public client as follow :

StuCanPublicClient(0x00, CAN_BUS_SPEED, bustype='kvaser', debug=True)
  • where ‘0x00’ is the source address

  • where CAN_BUS_SPEED is your CAN bus bitrate as selected inside the XcomCAN device with the dip-switches, it must be set to 10000, 20000, 50000, 100000, 125000, 250000, 500000 or 1000000

  • where bustype is the CAN interface name has specified here : python-can

  • where debug enables you to get some useful console information for debugging purpose

Xcom-CAN Dip switches CAN bus speed selection

N° 6

N° 7

N° 8

CAN bus speed

OFF

OFF

OFF

10 kbps

OFF

OFF

ON

20 kbps

OFF

ON

OFF

50 kbps

OFF

ON

ON

100 kbps

ON

OFF

OFF

125 kbps

ON

OFF

ON

250 kbps

ON

ON

OFF

500 kbps

ON

ON

ON

1 Mbps

5. Run an example from /examples folder

Go to /examples folder with a terminal and execute this script

$ python try_stu_can_public_client.py

Check client file to understand it.

6. Open documentation

Open documentation from Read The Docs

Warnings

  • Please check carefully the Xcom-CAN dip switches configuration as well as the jumper for CAN-H, CAN-L and GND signals

  • Use devices addresses generated into addresses file

  • It is strongly recommended NOT to spam the Xcom-CAN with multiple requests. Even if the Xcom-CAN has a frame buffer, the response will not be faster because of internal Studer bus load. The correct way to communicate with the Xcom-CAN is to send a request and to wait for the response before sending the next request. If no response comes from Xcom-CAN after a delay of 1 second, we can consider that the timeout is over and another request can be send.

Authors

Studer Innotec SA - Initial work - Studer Innotec SA

License

This project is licensed under the MIT License - see the LICENSE file for details

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

xcomcan-0.9.1.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xcomcan-0.9.1-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file xcomcan-0.9.1.tar.gz.

File metadata

  • Download URL: xcomcan-0.9.1.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.8

File hashes

Hashes for xcomcan-0.9.1.tar.gz
Algorithm Hash digest
SHA256 c7a1b90cb57711aaef7a459b4be994d6951475716bed580d4b7fac72ce08e899
MD5 a333231b9cac4f81a8b50219eccd2513
BLAKE2b-256 ddd3a143cb506db6a7ed39b5ed5e49fc5bd31b0bce8f3fffabc3375161f4a766

See more details on using hashes here.

File details

Details for the file xcomcan-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: xcomcan-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.8

File hashes

Hashes for xcomcan-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 337d1578e84a11939d9f4a9f8f9db2dd8baed2e397b2767aae17c34bb9239dc9
MD5 19c8aea6b22e7e418c7e2bf0dbffb40a
BLAKE2b-256 71956fc44146e007aa0225dc3232036901fa85e8582ba9cac76ecc650ab305f1

See more details on using hashes here.

Supported by

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