• 0Shopping Cart
TK Engineering Oy
  • Businesses
    • Defence
    • Energy
    • Marine
    • Off-Highway Vehicles
  • Services
    • Control system design
    • Testing & Troubleshooting
    • Research / Pre-Study
    • Product development
    • Training
  • IoE by TKE
    • Sensing Network
    • IoEX Gateway
    • Human as a Sensor
    • Analytics
  • Products
    • CANtrace
    • CAN bus
    • Automation
    • Telematics
    • Manufactures
  • Articles
    • Case Studies
    • News
    • Research and publications
    • New products
  • Company
    • Cyber Security
    • Partners
    • Distributors
    • Careers
  • Contact us
  • Shop
  • Menu Menu

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. Custom Python scripts were developed to enable conversion of float signals to fixed point representations and facilitate data logging in custom log files.

At the request of our customer, the team extended the functionality of CANtrace’s Python scripting functions to handle the conversion of float signals to fixed point and generate customized log files in CSV format. One of our main challenges was to decode float signals from a channel multiplexed CAN message, convert them to fixed point and transmit the refined data on another virtual CAN channel. The Python script was also tailored to save CAN data, including converted fixed point signals, in CSV files for further analysis. Our team worked closely with the customer and utilized the platform’s robust Python scripting support to extend existing scripts for float-to-fixpoint conversion and custom log file generation

PreviousNext
CANtrace
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. An advanced algorithm was implemented to convert these float signals to fixed points, ensuring precision and accuracy in the process. In addition, a logical framework was created to transmit the converted fixed point signals on a designated virtual CAN channel, facilitating non-multiplexed data transmission. Generation of CSV files and further analysis: Our Python script was extended to save the CAN data, including the newly converted fixed point signals, to CSV files. These files are carefully structured for easy access and are designed to streamline post-processing analysis. This improvement gives our customers significantly better opportunities to analyze special CAN messages in spreadsheets.

User-friendly configuration

To ensure a seamless integration process, clear instructions were provided on how to associate 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 allowed us to tailor the solution to the customer’s specific requirements and deliver an advanced script for converting floats to fixpoints and generating CSV files.  The Python scripting in CANtrace can be used to decode non-standard data, to make advanced data filters, to create custom log files for interfacing with proprietary systems, to simulate CAN nodes and to combine existing data on the CAN bus into new aggregate signals, in real-time, for quick data analysis.

Tags: CAN Bus, CANtrace, CSV, Marine, Python Scripting
https://tke.fi/wp-content/uploads/2024/01/CANtrace_Python_Script.jpg 320 840 Susanna Leppälä https://tke.fi/wp-content/uploads/2022/10/tke_logo.png Susanna Leppälä2024-02-08 11:33:542024-10-10 13:25:32CANtrace Python Script for Custom Signal Conversion

Categories

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

Tags

#CiA408 Applications Bauma CAN CAN Bus CANFD CAN FD CANopen CANtrace case study CiA Conference Configuration tool control system Data logger DDE Defence Energy Storage Energy storage system Exhibition industrial automation Interface IoT J1939 Kasvu Open Kvaser Marine Mobile Machines Off Highway Machines Release Rugged Safety SecD-Day Softing Switch System System design TCS-10 TKE TK Engineering Training Translifters U100 WCS-10 weCAN

Social

TK Engineering Oy

Hovioikeudenpuistikko 13 as 3
65100 Vaasa, Finland

Kauppakatu 3 B
33200 Tampere, Finland

info@tke.fi
Phone: +358 6 357 6300

Highest creditworthiness
© Copyright - TK Engineering Oy Privacy and cookies policy
Scroll to top