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:
ProtocolLayerInfo
TransportLayerCANInfo
Measurements
DAQInfo
andEvents
MATLAB®:
DAQInfo
andEvents
content is required if using dynamic DAQ list functionality.Simulink®: Because the XCP CAN Data Acquisition block uses dynamic DAQ list functionality,
DAQInfo
andEvents
content 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.
Functions
Properties
Topics
Hardware Connection
- XCP Hardware Connection
Diagram for connecting XCP client and server.
Read and Write Data to Memory
- Read a Calibrated Measurement
Translate pedal position to read a calibrated torque demand measurement. - Read a Single Value
Read a single value by name directly from memory. - Write a Single Value
Write a single value by name directly to memory.
Acquire and Stimulate Measurements
- Acquire Measurement Data via Dynamic DAQ Lists
Create a dynamic data acquisition list and read measurements from the list events. - Stimulate Measurement Data via Dynamic STIM Lists
Create a dynamic data stimulation list and assign measurements to the list events.