Perform data stimulation on selected measurements
Simulink Real-Time / XCP / UDP
Vehicle Network Toolbox / XCP Communication / UDP
The XCP UDP Data Stimulation block sends data to the selected slave connection for the selected event measurements. The block uses the XCP UDP transport layer to output raw data for the selected measurements at the specified stimulation time step. Configure your XCP session and use the XCP UDP Data Stimulation block to select your event and measurements on the configured slave connection. The block displays the selected measurements as input ports.
The XCP communication blocks support Simulink® accelerator mode and rapid accelerator mode. Using this feature, you can speed up the execution of Simulink models. For more information about these simulation modes, see the Simulink documentation.
The XCP communication blocks support code generation with limited deployment capabilities. Code generation requires the Microsoft® C++ compiler.
Config name— Specify XCP UDP session name
Select the name of XCP configuration that you want to use. The list displays all available names specified in the available XCP UDP Configuration blocks in the model. Selecting a configuration displays events and measurements available in the A2L file of this configuration.
You can stimulate measurements for only one event by using an XCP UDP Data Stimulation block. Use one block for each event whose measurements you want to stimulate.
Event name— Select an event
Select an event from the event list. The XCP UDP Configuration block uses the specified A2L file to populate the events list.
All Measurements— List all measurements available for event
This list displays all measurements available for the selected event.
Select the measurement that you want to use and click the add button, to move it to the selected measurements.
Ctrl key on your keyboard to select multiple
In the block parameters dialog box, type the name of the measurement you want to use. The All Measurements lists displays a list of all matching names. Click the x
to clear your search.
Selected Measurements— List selected measurements
This list displays your selected measurements. To remove a measurement from this list, select the measurement and click the remove button, .
In the Block Parameters dialog box, use the toggle buttons to reorder the selected measurements.
Force Datatypes and Allow Non-Scalar— Set the port data type according to the type definition in the A2L file
This parameter enables support for XCP data types and dimensions as
defined in the ASAP2 standard. When the parameter value is set to
'on', the block:
Sets the port data type according to the type definition in the A2L file
Supports up to three-dimensional XCP measurements in Simulink
These ASAP2 data types are supported by corresponding Simulink port data
The dimension support in the block accommodates the different treatment of
matrices by MATLAB® and the ECU. MATLAB default operation treats matrices as
row-major. An XCP measurement can have
ROW_DIR . If a
matrix measurement is
COLUMN_DIR, the blocks rearranges
the measurement in memory and ensures that the matrix (row X, col Y) in
MATLAB refers to the same entry as (row X, col Y) on the ECU. The
rearrangement causes matrix entries that are contiguous on the ECU to be
noncontiguous in MATLAB and Simulink.
Enable Timestamp— Enable sending Simulink timestamp in STIM DTO packets
When the Timestamp is enabled, the block inputs a timestamp from Simulink and sends the timestamp in the STIM DTO packets. The Enable Timestamp check box appears in the block parameters dialog box when the parameter is supported in the A2L file.