You are currently viewing 应用笔记 | 如何利用TSMaster的系统变量触发标定和诊断功能?

Application Notes | How to utilize TSMaster's System Variable Trigger Calibration and Diagnostics?

With the rapid increase of electronic modules, the massive data interaction and real-time requirements brought about by ADAS and driverless scenarios, and the information security challenges brought about by OTA technology, the performance of automotive bus simulation, testing, diagnostics, and calibration toolchain has been put forward with higher requirements. This paper mainly explains how to utilize TSMaster's system variables to trigger calibration and diagnostic functions.

1. Overview of calibration and diagnostics


  1. XCP/CCP calibration
    The process of dynamically adjusting the internal parameters of the controller through the CCP or XCP protocol is called calibration.CCP protocol: a CAN bus-based calibration protocol.XCP protocol: a universal test calibration protocol, which is an upgraded version of the protocol after CCP, and can be applied to a variety of buses.

  2. specificities

    (1) All adopt the master-slave mode, a single master can communicate with multiple slaves at the same time.

    (2) The master establishes connection with the slave by issuing commands, unlocking, reading data, modifying parameters and other operations.

    The XCP/CCP protocols, together with the A2L files, allow certain parameters to be changed directly in software and the actuator will give the appropriate feedback.The TSMaster Calibration Module relies on the following two types of files and ECUs running the XCP or CCP stack.


TSMaster provides a diagnostic console base function, users can configure their own send and answer requests according to their needs. The CAN/CANFD/LIN/UDS BootLoader is currently supported, with support for Some/IP and DoIP to follow.

2. Calibration and diagnostic use

Create TSMaster calibration

1) Choose to create a new project or create an empty project (and subsequently select the save location), click on it.
2) Click Application -> Calibration Manager -> Device Configuration (right click, New ECU) -> Fill in the ECU name to confirm that it is created successfully.

Create TSMaster Diagnostics

Click Diagnositc ISO TP -> Add DIagnositc and a new diagnostic box will pop up.

TSMaster System Variable Trigger Calibration

1) Select the driver and click XCP to select the XCP/CCP protocol.
(2) Select the database, import the A2L file, import successfully to view and configure the relevant information through the database protocol memory, measurement list.
3) If you need security algorithms, click Agreement -> Speed and Key Algorithm DLL file, click Import File.
4) Select the logical channel and configure the memory address mapping.
5) Click Connect ECU- >Start Online Calibration Measurement to connect successfully. (If there is a connection error, please check the logical channel, memory configuration)
6) Click on the database to select a PWM signal, and right-click to select Add to Signal Excitation, Graphics, Panels, and Values, as shown below:
(7) The signal value is changed by modifying the value of the signal excitation or panel variable, and the signal value is displayed graphically and numerically that the signal value has been changed.
8) Also supports C scripts to change the value of a variable, click System Variables to select a variable.
9) Copy the write code.
10) Through the C script, Step function, to realize every second value plus one.

TSMaster System Variable Trigger Diagnostics

1) First, click Diagnostic Window -> Diagnostic BasicConfig form, select the target service, and then right-click the menu to register the diagnostic service as a system variable, click the system variable this variable will be displayed.
2) Add a Button to the panel, associate this variable, change the value of the panel, and you can observe that the value has been modified in the graph.
3) This variable 0 1 jumps through C scripts and can be observed through graphs and panels.

3. Secondary development

1, support for other languages for secondary development, this example uses C# to call the TSMaster API to realize the calibration function, the use of software for Visual Studio 2019.

Create a new project as follows: Select C# -> Windows Forms Application -> Click Next.

2. Set the project name -> Storage Location -> Click Create.
3, import TSMaster.dll file, reference -> add reference to select the dll file, confirm.
4. Click References to view the TSMaster related call functions.

5. Add TSCalibration class

Click Add -> Class, Change Name -> Add (A). The TSCalibration class is successfully created.

6. Import TSMaster Definition Type.
7, created through public, read and write two classes.
8, open the TSMaster simulation -> System Variables -> Internal Variables, slide bar slide to the bottom, you can see the calibration controller status (Calibration.Status), calibration controller automation register status (Calibration.Controller).
9. Calibration can be triggered by simply reading and writing the values of the system variables.
10. Click Open Connection to open the recently closed TSMaster and start it, and click Start ECU to start the measurement in turn.
11, enter the variable name and click Read, the real-time value shows that the value of the variable is 25. write the name of the variable, write the value of 50, you can see that the value of the variable changes to 50.

About More

For more TSMaster related functions, please go to "TOSUN" on B site to watch the video tutorials, and we are looking forward to the update of more new functions of TSMaster~!