This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

XCP Data Acquisition

Acquire selected measurements from configured slave


XCP Communication


The XCP Data Acquisition block acquires data from the configured slave based on the selected measurements. The block uses the XCP CAN transport layer to obtain raw data for the selected measurements at the specified simulation time step. Configure your XCP connection and use the XCP Data Acquisition block to select your event and measurements for the configured slave. The block displays the selected measurements as output ports.


A model with XCP Data Acquisition blocks does not disconnect from the XCP slave when the simulation ends. The model continues to acquire measurements until the data transmission from the XCP slave is terminated.

Other Supported Features

The XCP communication blocks support the use of Simulink® Accelerator™ and Rapid Accelerator mode. Using this feature, you can speed up the execution of Simulink models. For more information on this feature, see the Simulink documentation.

The XCP communication blocks also support code generation with limited deployment capabilities. Code generation requires the Microsoft® C++ compiler.

Dialog Box

Use the Block Parameters dialog box to select your data acquisition parameters.


Config name

Select the name of XCP configuration you want to use. The list displays all available names specified in the available XCP Configuration blocks in the model. Selecting a configuration displays events and measurements available in this configuration’s A2L file.


You can acquire measurements for only one event using an XCP Data Acquisition block. Use one block each for each event whose measurements you want to acquire.

Event name

Select an event from the available list of events. The XCP Configuration block uses the specified A2L file to populate the events list.



Type the name of the measurement you want to use. The All Measurements lists displays a list of all matching terms. Click the x

to clear your search.

All Measurements

This list displays all measurements available for the selected event. Select the measurement you want to use and click the add button, to add it to the selected measurements. Hold the Ctrl key on your keyboard to select multiple measurements.

Selected Measurements

This list displays selected measurements. To remove a measurement from this list, select the measurement and click the remove button, .

Toggle buttons

Use the toggle buttons to reorder the selected measurements.

DAQ List Priority

Specify a priority value as an integer from 0 to 255 for the slave device driver to prioritize transmission of data packets. The slave may accumulate XCP packets for lower priority DAQ lists before transmission to the master. A value of 255 has the highest priority. The SET_DAQ_LIST_MODE command communicates the DAQ List Priority value from master to slave. This communication method differs from the specification of the Event Channel Priority property, which comes from the A2L file.

Sample time

Specify the sampling time of the block during simulation, which is the simulation time as described by the Simulink documentation. This value defines the frequency at which the XCP Data Acquisition block runs during simulation. If the block is inside a triggered subsystem or to inherit sample time, you can specify –1 as your sample time. You can also specify a MATLAB variable for sample time. The default value is 0.01 (in seconds).

Introduced in R2013a