Inspect the Contents of an A2L File

Access Measurement Information

This example shows how to open an A2L file and access measurement information.

Open an A2L file:

a2lfile = xcpA2L('XCPSIM.a2l');

Display properties of the A2L object:

A2L with properties:

                 FileName: 'XCPSIM.a2l'
                 FilePath: 'H:\Documents\work\XCPSIM.a2l'
                SlaveName: 'CPP'
        ProtocolLayerInfo: [1x1 struct]
                  DAQInfo: [1x1 struct]
    TransportLayerCANInfo: [1x1 struct]
                   Events: {'Key T'  '10 ms'  '100ms'  '1ms'  'FilterBypassDaq'  'FilterBypassSt'}
             Measurements: {1x38 cell}

View all available measurements:

ans = 

  Columns 1 through 8

    'BitSlice'    'BitSlice0'    'BitSlice1'    'BitSlice2'    'Counter_B4'    'Counter_B5'    'Counter_B6'    'Counter_B7'

  Columns 9 through 16

    'FW1'    'KL1Output'    'PWM'    'PWMFiltered'    'PWM_Level'    'ShiftByte'    'Shifter_B0'    'Shifter_B1'

  Columns 17 through 25

    'Shifter_B2'    'Shifter_B3'    'TestStatus'    'Triangle'    'ampl'    'bit12Counter'    'byte1'    'byte2'    'byte3'

  Columns 26 through 33

    'byte4'    'byteCounter'    'bytePWMFilter'    'channel3'    'dwordCounter'    'map1InputX'    'map1InputY'    'map1Output'

  Columns 34 through 38

    'period'    'sbytePWMLevel'    'v'    'vin'    'wordCounter'

Get information about the BitSlice measurement:

ans = 

                   Name: 'Triangle'
         LongIdentifier: 'Triangle test signal used for PWM output PWM'
               DataType: 'SBYTE'
             Conversion: 'BitSlice.CONVERSION'
             Resolution: 0
               Accuracy: 0
             LowerLimit: -50
             UpperLimit: 50
             ECUAddress: 4951377
    ECUAddressExtension: 0
              ByteOrder: 'MSB_LAST'
            SizeInBytes: 1
          SizeInNibbles: 2
             SizeInBits: 8
             MATLABType: 'int8'
Was this topic helpful?