Main Content

writeSingleValue

Write single sample to specified measurement

Description

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 server module.

example

Examples

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 server module

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

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 server 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.

Version History

Introduced in R2013a