Main Content

createMeasurementList

Create measurement list for XCP channel

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:

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

Connect the channel to the server module.

connect(xcpch)

Set up 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:

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

Connect the channel to the server module.

connect(xcpch)

Set up 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 server 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.

Version History

Introduced in R2013a