Documentation

This is machine translation

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

createMeasurementList

Create measurement list for XCP channel

Syntax

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

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 the character vector ‘DAQ' or ‘STIM'.

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

Name of a single XCP measurement specified as a character vector, or a set of measurements specified as a cell array of character vectors. Measurement name corresponds to the measurement name defined in your A2L file. Make sure the name matches the name specified in the A2L file.

Introduced in R2013a

Was this topic helpful?