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.

readAxis

Read and scale specified axis value from direct memory

Syntax

value = readAxis(chanObj,axis)

Description

example

value = readAxis(chanObj,axis) reads and scales a value for the specified axis through the XCP channel object chanObj. This action performs a direct read from memory on the slave module.

Examples

collapse all

Read the value from an XCP channel axis, identifying the axis by name.

a2lObj = xcpA2L('myA2Lfile.a2l');
chanObj = xcpChannel(a2lObj,'CAN','Vector','Virtual 1',1);
connect(chanObj);
value = readAxis(chanObj,'pedal_position');

Alternatively, create an axis object and read its value.

axisObj = a2lObj.AxisXs('pedal_position');
value = readAxis(chanObj,axisObj);

Input Arguments

collapse all

XCP channel, specified as an XCP channel object.

Example: xcpChannel()

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

Example: 'pedal_position'

Data Types: char

Output Arguments

collapse all

Value from axis read, returned as type supported by the axis.

Introduced in R2018a