Calibrate Parameters with Vector CANape
This example shows how to view signals and tune parameters by using Vector CANape®. You must have already completed the steps in Prepare ASAP2 Data Description File.
You also must be familiar with the Vector CANape user interface. For information about the user interface, see the vendor documentation (www.vector.com).
Build and download the real-time application
Start the real-time application by selecting REAL-TIME > RUN ON TARGET > Start Application.
Disconnect the connection from MATLAB:You can now connect to third-party calibration tools.
tg = slrealtime disconnect(tg)
Open Vector CANape.
Create a Vector CANape project with project name
Accept the default folder.
From the extracted
slrt_ex_osc_cal.a2l, create an XCP device named
Do not configure dataset management.
Select your local computer Ethernet adapter as the Ethernet channel.
Accept the remaining defaults.
Upload data from the device.
Configure Signals and Parameters
slrt_ex_osc_cal_slrt, and then open
L_2Din separate display windows.
To make the waveform easier to evaluate, set the time and
For example, try the following settings for
y-axis min home value —
y-axis max home value —
Min home time-axis value —
Max home time-axis value —
Time duration —
Open the measurement list.
To set the required sample time for a signal, open the measurement properties for the signal. Select the required sample time from the measurement mode list.
The default sample time is the base sample time.
Add a graphic control on parameter
Measure Signals and Calibrate Parameters
Start the Vector CANape measurement.
To shorten the ring time on
L_2D, set parameter
As required, toggle between calibration RAM active and inactive.
When using the Run on Target button on the Simulink Editor Real-Time tab to run the simulation, there is a time lag of a couple of seconds between the start of the real-time application on the target computer and the connect model operation on the development computer. If you are examining signals at or very close to application start, consider using the step-by-step approach to connect model and then using an SSH connection (for example, using PuTTY) start the real-time application. For more information, see Execute Real-Time Application in Simulink External Mode by Using Step-by-Step Commands and Execute Target Computer RTOS Commands at Target Computer Command Line.