Main Content

startMeasurement

Start configured DAQ and STIM lists

Description

startMeasurement(xcpch) starts all configured data acquisition and stimulation lists on the specified XCP channel. When you start the measurement, configured DAQ lists begin acquiring data values from the server module and STIM lists begin transmitting data values to the server module.

example

Examples

collapse all

Create an XCP channel connected to a Vector CAN device on a virtual channel. Set up a DAQ measurement list and start measuring data.

a2l = xcpA2L('XCPSIM.a2l')
xcpch = xcpChannel(a2l, 'CAN', 'Vector', 'Virtual 1', 1), 
xcpch = 

  Channel with properties:

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

Connect the channel to the server module.

connect(xcpch)

Set up a data acquisition measurement list with the ‘10 ms’ event and 'Bitslice' measurement.

createMeasurementList(xcpch, 'DAQ', '10 ms', 'BitSlice')

Start your measurement.

startMeasurement(xcpch);

Create an XCP channel connected to a Vector CAN device on a virtual channel. Set up a DAQ measurement list and start measuring data.

a2l = xcpA2L('XCPSIM.a2l')
xcpch = xcpChannel(a2l,'CAN','Vector','Virtual 1',1)
xcpch = 

  Channel with properties:

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

Connect the channel to the server module.

connect(xcpch)

Set up a data stimulation measurement list with the ‘100ms’ event and 'Bitslice0', 'PWMFiletered', and 'Triangle'measurements.

createMeasurementList(xcpch,'STIM','100ms',{'BitSlice0','PWMFiletered','Triangle'})

Start your measurement.

startMeasurement(xcpch);

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.

Version History

Introduced in R2013a