CANape® is one of the third-party products that support integration with Simulink. You can use CANape for optimizing parameterization (calibration) of electronic control units (ECU). For more information, see CANape.
You can use XCP-based External mode simulation over serial connection to connect to the Arduino® board from a third-party calibration software like CANape and perform signal monitoring and parameter calibration.
To configure the Simulink model for signal monitoring and parameter tuning using CANape:
In the Simulink model, enable the signals for logging and identify the parameters for tuning. For details, see XCP-Based External Mode Simulation over Serial, TCP/IP, or Wi-Fi Connection
Open Configuration Parameters dialog box, go to the Hardware Implementation pane and select the connected Arduino board from the Hardware board list.
Go to Target hardware resources > External mode tab, and choose
XCP on Serial as
the Communication interface.
Third party calibration tools as the
Click Apply and OK.
You can use XCP-based External mode simulation over Serial to connect to the Arduino board from a third-party calibration software such as CANape and perform signal monitoring and parameter calibration.
The integration of Simulink with CANape using these settings has been tested with CANape 16.0 SP6. The functionality does not work with CANape versions above 17.0 as they do not support XCP on Serial.
To configure the Simulink model for signal monitoring and parameter tuning using third-party calibration tools perform these steps:
In the Hardware tab of Simulink toolstrip, click
Build for Monitoring. This action builds the
model and generates the executable along with the A2L file in the
current MATLAB folder path. The A2L file contains XCP slave information
for using in third-party calibration tools. The file name of the A2L
file is in this format:
For more information on A2L file generation, see Export ASAP2 File for Data Measurement and Calibration (Simulink Coder).
Click Deploy in the Simulink Toolstrip to deploy the executable onto the target.
Import the A2L file into third-party calibration tools, connect to the XCP slave, and start monitoring of signals and calibration of parameters using the interface in third-party calibration tool. For more information, see Calibrate ECU Parameters in CANape Using XCP-based Serial Interface.