Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

createMeasurementList

Create measurement list for XCP channel

Syntax

createMeasurementList(xcpch,resource,eventName,measurementName)
createMeasurementList(xcpch,resource,eventName,{measurementName,measurementName,measurementName})

Description

example

createMeasurementList(xcpch,resource,eventName,measurementName) creates a data stimulation list for the XCP channel with the specified event and measurement.

example

createMeasurementList(xcpch,resource,eventName,{measurementName,measurementName,measurementName}) creates a data stimulation list for the XCP channel with the specified event and list of measurements.

Examples

collapse all

Create an XCP channel connected to a Vector CAN device on a virtual channel and set up a DAQ measurement list.

a2lfile = xcp.A2L('XCPSIM.a2l')
xcpch = xcp.Channel(a2lfile, 'CAN', 'Vector', 'Virtual 1', 1)
xcpch = 

  Channel with properties:

               SlaveName: 'CPP'
             A2LFileName: 'XCPSIM.a2l'
          TransportLayer: 'CAN'
    TransportLayerDevice: [1x1 struct]
              SeedKeyDLL: []

Connect the channel to the slave module.

connect(xcpch)

Setup a data acquisition measurement list with the ‘10 ms’ event and 'Triangle' measurement.

createMeasurementList(xcpch, 'DAQ', '10 ms', 'Triangle');

Create an XCP channel connected to a Vector CAN device on a virtual channel and set up a STIM measurement list.

a2l = xcp.A2L('XCPSIM.a2l')
xcpch = xcp.Channel(a2lfile, 'CAN', 'Vector', 'Virtual 1', 1)
xcpch = 
  Channel with properties:

               SlaveName: 'CPP'
             A2LFileName: 'XCPSIM.a2l'
          TransportLayer: 'CAN'
    TransportLayerDevice: [1x1 struct]
              SeedKeyDLL: []

Connect the channel to the slave module.

connect(xcpch)

Setup a data stimulation measurement list with the ‘100ms’ event and 'PWM' and 'ShiftByte' measurements.

createMeasurementList(xcpch, 'STIM', '100ms', {'PWM','ShiftByte'});

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.

Measurement list type, specified as 'DAQ' or 'STIM'.

Example: 'DAQ'

Data Types: char | string

Name of event, specified as a character vector or string. The event is used to trigger the specified measurement list. The list of available events depends on your A2L file.

Data Types: char | string

Name of a single XCP measurement, specified as a character vector or string; or a set of measurements, specified as a cell array of character vectors or array of strings. Make sure measurementName matches the corresponding measurement names defined in your A2L file.

Introduced in R2013a

Was this topic helpful?