If you need to work with the CANedge data in Python/MATLAB, we now recommend to use the methods described in the below documentations:
The Python methods/modules shown in repository under examples/data-processing/
can still be used, but will not be updated going forward (this refers to the sub modules of our Python API, mdf-iter
, canedge-browser
and can-decoder
). We instead refer to our new integration with python-can - and our examples of how to work with DBC decoded Parquet data lakes in Python using our MF4 decoders. The script examples found in examples/other/
will still be relevant going forward.
This project includes Python and MATLAB examples of how to process MF4 log files with CAN/LIN data from your CANedge data loggers. Most examples focus on the use of our Python API modules (canedge_browser
, mdf_iter
, can_decoder
) for use with the CANedge log file formats (MF4
, MFC
, MFE
, MFM
). However, you'll also find other script examples incl. for the asammdf Python API, MATLAB, S3 and more.
For most use cases we recommend to start with the below examples:
- data-processing: List log files, load them and DBC decode the data (local, S3)
For some use cases the below examples may be useful:
- other/asammdf-basics: Load and concatenate MF4 logs, DBC decode them - and save as new MF4 files
- other/matlab-basics: Examples of how to load and use MF4/MAT CAN bus data
- other/s3-basics: Examples of how to download, upload or list specific objects on your server
- other/s3-events: Using AWS Lambda or MinIO notifications (for event based data processing)
- other/misc: Example of automating the use of the MDF4 converters and misc tools
requirements.txt
file and enter below in your command prompt:python -m venv env & env\Scripts\activate & pip install -r requirements.txt
python script_to_run.py
python -m venv env && source env/bin/activate && pip install -r requirements.txt
python script_to_run.py
If you later need to re-activate the virtual environment, use env\Scripts\activate
.
The various folders include sample log files and DBC files. Once you've tested a script with the sample data, you can replace it with your own.
README.md
files for extra informationThere are many ways that you can work with the data from your CANedge devices. Most automation use cases involve fetching data from a specific device and time period - and DBC decoding this into a dataframe for further processing. Here, we recommend to look at the examples from the data-processing/
folder. These examples use our custom modules designed for use with the CANedge: The mdf_iter (for loading MDF4 data), the canedge_browser (for fetching specific data locally or from S3) and the can_decoder (for DBC decoding the data). In combination, these modules serve to support most use cases.
If you have needs that are not covered by these modules, you can check out the other examples using the asammdf API, the AWS/MinIO S3 API and our MDF4 converters.
If in doubt, contact us for sparring.
For details on installation and how to get started, see the documentation:
Feature suggestions, pull requests or questions are welcome!
You can contact us at CSS Electronics below: