Communication in MATLAB
An A2L file is a special description file that defines the implementation of an ECU. The information in an A2L file allows an XCP client to communicate with a server module via an XCP connection. The formatted text file contains event and measurement definitions, and other configuration information, used for acquiring and stimulating data and to perform other functions.
To communicate with an XCP server over CAN, an A2L file (ECU description file) must contain at least the following property information:
Eventscontent is required if using dynamic DAQ list functionality.
Simulink®: Because the XCP CAN Data Acquisition block uses dynamic DAQ list functionality,
Eventscontent is required.
You can connect your XCP client to a server module using the CAN protocol. This allows you to use events and access measurements on the server module. Follow the XCP Database and Communication Workflow to learn how to connect to a device using XCP.
You can perform a direct read from or write to the memory on the server module. Alternatively, create a dynamic data stimulation list and assign measurements to the list, then read acquired DAQ data and write stimulation data.
Read and Write Data to Memory
|Read and scale specified characteristic value from direct memory|
|Scale and write specified characteristic value to direct memory|
|Read and scale specified measurement value from direct memory|
|Scale and write specified measurement value to direct memory|
|Read and scale specified axis value from direct memory|
|Scale and write specified axis value to direct memory|
|Read single sample of specified measurement from memory|
|Write single sample to specified measurement|
Acquire and Stimulate Measurements
|Create measurement list for XCP channel|
|View configured measurement lists on XCP channel|
|Remove all measurement lists from XCP channel|
|Start configured DAQ and STIM lists|
|Indicate if measurement is active|
|Read scaled samples of specified measurement from DAQ list|
|Read samples of specified measurement from DAQ list|
|Write scaled value of specified measurement to STIM list|
|Write to specified measurement|
|Stop configured DAQ and STIM lists|
- XCP Hardware Connection
Diagram for connecting XCP client and server.