TKE Sweden AB
  • Services
    • Control system design
    • Testing
    • Research / Pre-Study
    • Product development
    • Training
  • IoE by TKE
    • Sensing Network
    • IoEX Gateway
    • Human as a Sensor
    • Analytics
  • Products
    • CANtrace
    • Accessories
    • Interfaces
    • Loggers
    • Sensors
    • Software
    • Switches
  • Articles
    • Case Studies
    • News
    • Research and publications
    • New products
  • Company
  • Contact us
  • Menu Menu
  • Shopping Cart Shopping Cart
    0Shopping Cart

CANtrace Python Script for Custom Signal Conversion

Case Studies
CANtrace Python Script

TK Engineering executed a project for a customer that utilized CANtrace’s Python scripting to decode float signals from channel multiplexed CAN messages. This meant that the signals were converted to fixed point and transmitted without multiplexing on a virtual CAN channel, allowing the data to be plotted and logged like standard CAN signals. Python code was also used to log CAN channel data in multiple CSV files for spreadsheet analysis.

Custom Python Scripting for Float-to-Fixed Point Conversion and Custom Log File Generation

The project aimed to improve CAN data analysis, with a focus on improving the precision and readability of specific signals. We developed custom Python scripts to convert float signals to fixed point representations and enable data logging in custom log files.

At the customer’s request, our team expanded CANtrace’s Python scripting functions. We handled the conversion of float signals to fixed point and generated customized CSV log files. A major challenge was decoding float signals from a multiplexed CAN message, converting them to fixed point, and transmitting the refined data on another virtual CAN channel. Additionally, we tailored the Python script to save CAN data, including converted fixed point signals, in CSV files for further analysis. Working closely with the customer, we utilized the platform’s robust Python scripting support to extend existing scripts for float-to-fixpoint conversion and custom log file generation.

Previous Previous Previous Next Next Next
CANtrace Open image in lightbox: CANtrace Open image in lightbox: CANtrace
CANtrace Open image in lightbox: CANtrace Open image in lightbox: CANtrace

Python Script Optimization, CSV File Generation

Python script enhancement: We developed Python code within CANtrace to decode float signals from channel multiplexed CAN messages. We implemented an advanced algorithm to convert float signals to fixed points, ensuring precision and accuracy. Additionally, we created a logical framework to transmit the converted fixed point signals on a designated virtual CAN channel, facilitating non-multiplexed data transmission. We extended our Python script to save the CAN data, including the newly converted fixed point signals, to CSV files for further analysis. These carefully structured files facilitate easy access, streamlining post-processing analysis. This improvement gives our customers significantly better opportunities to analyze special CAN messages in spreadsheets.

User-friendly configuration

We provided clear instructions for seamlessly integrating the right database with the relevant CAN channel within CANtrace. We also implemented a user-friendly configuration process for signals in both the graph and data tabs. This allows users to easily visualize and analyze the fixed point signals, improving the overall user experience.

Seamlessly Converting Floats to Fixed Points and Enhancing CAN BUS Analysis

The extended Python script in CANtrace met the customer’s needs by seamlessly converting floats to fixed points. Customized CSV log files improved data analysis and increased the accuracy of signal interpretation for efficient CAN BUS analysis. CANtrace’s flexibility and Python scripting capabilities enabled us to customize the solution to meet the customer’s specific needs. We delivered an advanced script for converting floats to fixpoints and generating CSV files. Additionally, Python scripting in CANtrace decodes non-standard data. This creates advanced data filters, generates custom log files for interfacing with proprietary systems, simulates CAN nodes. Additionally it combines existing data on the CAN bus into new aggregate signals in real-time for quick data analysis.

 

Tags: CAN bus, CANtrace, CSV, Python Scripting
https://tkesweden.se/wp-content/uploads/2024/02/CANtrace_Python_Script.jpg 320 840 Filip Kesti https://tkesweden.se/wp-content/uploads/2022/11/tke_sweden.png Filip Kesti2024-02-08 11:22:592024-03-06 12:21:47CANtrace Python Script for Custom Signal Conversion

Categories

  • Case Studies
  • New products
  • News
  • Research and publications

Tags

#CiA408 #translifter Air Bridge Analyzer Applications Automation Bauma CAN CAN bus CANFD CANopen CANtrace case study Conference Configuration tool Data logger Defence Digitalization DNV FIMA iCC Interface IoE IoT Kvaser Kvaser U100 Leaf Mobile Machines Off Highway Machines Online Store Projects Release Rugged SecD-Day Switch System System design TCS-10 tke TK Engineering TKESweden U100 WCS-10 weCAN Wireless

TKE Sweden AB
Slöjdgatan 5
S-903 25 Umeå, Sweden

info@tkesweden.se

© Copyright - TKE Sweden AB Privacy and cookies policy
Scroll to top