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.

writeMeasurement

Scale and write specified measurement value to direct memory

Syntax

writeMeasurement(chanObj,measurement,value)

Description

example

writeMeasurement(chanObj,measurement,value) scales and writes a value for the specified measurement through the XCP channel object chanObj. This action performs a direct write to memory on the slave module.

Examples

collapse all

Write a value to an XCP measurement, and verify the value.

Read original value.

a2lObj = xcpA2L('myA2Lfile.a2l');
chanObj = xcpChannel(a2lObj,'CAN','Vector','Virtual 1',1);
connect(chanObj);
measObj = a2lObj.MeasurementInfo('limit');
value = readMeasurement(chanObj,measObj)
     100

Write a new value.

newValue = 120;
writeMeasurement(chanObj,measObj,newValue);

Read the value again to verify the change.

readMeasurement(chanObj,measObj)
     120

Input Arguments

collapse all

XCP channel, specified as an XCP channel object.

Example: xcpChannel()

XCP channel measurement, specified as a character vector or measurement object.

Example: 'curve1_8_uc'

Data Types: char

Value for measurement write, specified as a data type supported by the measurement.

Introduced in R2018a