Acquire selected measurements from configured slave
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.
Note 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.
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.
Use the Block Parameters dialog box to select your data acquisition parameters.
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.
Note: 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.
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.
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.
This list displays selected measurements. To remove a measurement from this list, select the measurement and click the remove button, .
Use the toggle buttons to reorder the selected measurements.
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).