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. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Write single sample to specified measurement





writeSingleValue(xcpch,measurementName,value) writes a single value to the specified measurement through the configured XCP channel. The values are written directly to the memory on the slave module.


collapse all

Create an XCP channel and write a single value for the Triangle measurement directly to memory.

Link an A2L file to your session.

a2l = xcpA2L('XCPSIM.a2l')

Create an XCP channel and connect it to the slave module

xcpch = xcpChannel(a2lfile, 'CAN', 'Vector', 'Virtual 1', 1);

Write the value 10 to the Triangle measurement.

writeSingleValue(xcpch, 'Triangle', 10)

Input Arguments

collapse all

XCP channel, specified as an XCP channel object created using xcpChannel. The XCP channel object can then communicate with the specified slave module defined by the A2L file.

Name of a single XCP measurement specified as a character vector or string. Make sure measurementName matches the corresponding measurement name defined in your A2L file.

Data Types: char | string

Value of the selected measurement, returned as a numeric value.

Introduced in R2013a

Was this topic helpful?