Documentation Center

  • Trial Software
  • Product Updates

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

expand all

Create a DAQ Measurement List

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 a Data Stimulation List

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

expand all

xcpch — XCP channelXCP channel object

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.

resource — Measurements list type‘DAQ' | ‘STIM'

Measurement list type, specified as a literal string ‘DAQ' or ‘STIM'.

eventName — Name of eventcharacter string

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

measurementName — Name of single XCP measurementcharacter string | cell array of strings

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

See Also

| |

Was this topic helpful?