Main Content

Signal Monitoring and Parameter Tuning Using Third-Party Product Like CANape

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:

  1. 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

  2. Open Configuration Parameters dialog box, go to the Hardware Implementation pane and select the connected Arduino board from the Hardware board list.

  3. Go to Target hardware resources > External mode tab, and choose XCP on Serial as the Communication interface.

  4. Choose Third party calibration tools as the Host interface.

    Arduino Configuration Parameters External Mode CANape

  5. Click Apply and OK.

Configuring Model to Use Third-Party Calibration Tools

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.

Note

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:

  1. 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 peripheral information for using in third-party calibration tools. The file name of the A2L file is in this format: <modelname>.a2l.

    For more information on A2L file generation, see Export ASAP2 File for Data Measurement and Calibration (Simulink Coder).

    build for monitoring

  2. Click Deploy in the Simulink Toolstrip to deploy the executable onto the target.

  3. Import the A2L file into third-party calibration tools, connect to the XCP peripheral, 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 on Arduino Hardware.