Python


Python is a popular programming language for working with CAN data from the CLX000.

You can work with the CLX000 CAN data in Python in multiple ways:

  1. TXT decoders: DBC decode your TXT log files to Parquet data lakes for large scale analysis
  2. python-can-csscan-txt: Use python-can to load TXT log files e.g. for DBC decoding
  3. python-can-csscan-serial: Use python-can to stream CAN data via USB

Which method should you use?

If your goal is to analyse large amounts of DBC decoded CAN/LIN data (across many log files), we recommend using the TXT decoders to create a Parquet data lake. This will make it easier to ‘abstract away’ the log file aspect of your data and enables ‘beyond-memory’ analyses. The Parquet data lake can also serve other purposes, such as dashboard visualization.

For more specialized use cases, the python-can-csscan-txt package enables direct loading of the CLX000 TXT log files in the popular python-can library. This is useful if you wish to analyse the raw CAN frames, replay the data through the CLX000 USB-to-CAN interface, selectively DBC decode messages/signals, inject conditional logic etc. The integration with python-can also offers several extensions related to e.g. J1939, CANopen, ISO-TP, UDS, XCP and more.

The python-can-csscan-serial package gives you full scripted control over the CLX000 as a CAN-USB interface, enabling e.g. automated logic/alerts based on your CAN data, real-time Grafana dashboard visualization (see our can2mqtt demo) and advanced dynamic communication (e.g. leveraging more advanced UDS/CCP/XCP extensions to python-can).

Note

If you do not follow the steps in the Stream section, you will not see your device in Python via the python-can-csscan-serial package