Sharing | Zero-Basic Tutorial! TSMaster's Graph Data Export CSV Function

Sharing | Zero-Basic Tutorial! TSMaster's Graph Data Export CSV Function

In vehicle performance testing, the data generated by the testing process may involve various types of sensor data such as speed, acceleration, fuel consumption, temperature, pressure, vibration, and so on.These data are usually presented in the form of charts or graphs, which are exported to CSV format to facilitate detailed digital analysis.. For example, during crash tests, handling tests, and braking tests, the collected data such as acceleration, force, and vehicle speed can be exported in CSV format, which makes it easy for engineers to further analyze, count, and compare the performance of different vehicles or test conditions.

One-click export of acquired graphical data is a handy feature during vehicle testing.This article describes how to export the graphical data to a CSV file after the run.


There are two ways to export graphical data to CSV provided in the TSMaster software:Graphics module built-in export method, API export method.

TSMaster provides the function ui_graphics_export_csv() to export signal data to csv, which realizes exporting graphic data via API.


1. Preparation of engineering environment

Add the signals to be observed to the graph, run the project, get the graph data, and pause the project, as in Figure 1.

Graphical observation of signal data
Figure 1: Graphical observation of signal data

2.Graphics built-in export method

2.1 Realization steps

Graph->Options->Export Signal Data Points to csv file in TSMaster to realize one-click exporting of signal data to csv through the built-in function, as in Figure 2.

Graphical Built-in Function Interface
Figure 2: Graphical Built-in Functions Interface

2.2 Realization of effects

The exported CSV is shown in Figure 3, note that the order of all signals in the table corresponds to the order of the signals in the graphical interface.

CSV exported by Graphics Built-in Functions
Figure 3: CSV exported by Graphics Builder

3.API Export Methods

3.1 Description of ui_graphics_export_csv function

sports eventdescriptive
[Name]ui_graphics_export_csv
[ParametersThere are five: ► Graphics form name ► Names of all exported signals (separated by commas) ► Full path to the exported CSV file ► Start time of the export (us level), set -1 for override all times ► End time of the export (us level), set -1 for override all times

The types are referenced separately as follows: ► char*► char*► char*► s64► s64

3.2 API Export Implementation Steps

In the first step, add the signals to be observed to the graph, run the project and get the graph data as in Fig. 4.

Graphical observation of signal data
Figure 4: Graphical observation of signal data

In the second step, the works are suspended after the observation.

The third step, add the export function in the appropriate event, this paper selects the program start event as an example, add the program start event, write the function parameters, as shown in Figure 5.

Add function to export signal data to CSV.
Figure 5: Adding a function to export signal data to CSV

Step 4: Compile the program and run and stop the C applet.

If there is a renamed signal, right click on the renamed signal in the graph and right click on Edit Signal to modify the signal name, as in Figure 6.

Modification of renamed signal names
Figure 6: Modifying a renamed signal name

3.3 Realization of effects

Get the CSV file of the signal data exported through the API method, as shown in Figure 7.

CSV exported by Graphics Built-in Functions
Fig. 7: CSV exported via the API
Tip:
1. Software download:
Click on the software download link below to download and install directly, beta version is recommended:

2. Software upgrades:
You can check for upgrades to the latest version within the software, provided that your computer has an Internet connection.

Note: TOSUN Technical Support Email:support@tosunai.cnWe welcome inquiries! (Company and contact information must be indicated)

发表回复

en_USEnglish
×
×

产品入口: 产品添加到购物车

Download location

Please click the download button below to start experiencing the powerful TSMaster features. Thank you for your support!

Beta version updated weekly, full version updated monthly
Installation environment
  • 1
    Windows 7 SP1 or higher, supports Win10, and WIn11.

    Operating System

  • 2
    8GB

    random access memory (RAM)

  • 3
    At least 550MB of free space

    disk space

  • 4
    Dual-core (2-core) or higher

    CPU

Please ensure that your computer meets at least these requirements in order to install and run the TSMaster software successfully. If your computer does not meet these requirements, it may cause performance problems or not run the software properly. You may want to consider upgrading your hardware if you need smoother running features.