Example ASAM Framework Mapping Configuration XML File

NI VeriStand 2018 Help

Edition Date: May 2018

Part Number: 372846M-01

»View Product Info
Download Help (Windows Only)

The following example shows a mapping configuration file for the ASAM framework. This example file defines labels for the testbench ports and the framework and maps them together. Refer to the ASAM website at www.asam.net for more information about programming with the ASAM XIL API. The following example references the Engine Demo example project.

<?xml version="1.0" encoding="UTF-8"?>

<Mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.asam.net/XILAPI/Mapping/2.1.0">

   <FrameworkLabelList>

      <FrameworkLabel Id="Aliases_EngineTemp" Type="FloatVariable" UnitId="NO_UNIT">

      <Metadata IsWritable="false" />

      </FrameworkLabel>
      <FrameworkLabel Id="Aliases_ActualRPM" Type="FloatVariable" UnitId="NO_UNIT">

    <Metadata IsWritable="false" />

      </FrameworkLabel>

      <FrameworkLabel Id="Aliases_EnginePower" Type="FloatVariable" UnitId="NO_UNIT">

    <Metadata />

      </FrameworkLabel>

      <FrameworkLabel Id="Aliases_DesiredRPM" Type="FloatVariable" UnitId="NO_UNIT">

    <Metadata />

      </FrameworkLabel>

    </FrameworkLabelList>

    <TestbenchLabelList PortId="MaPort">

      <TestbenchLabel Id="Aliases/EngineTemp" UnitId="NO_UNIT">

    <TestbenchSimpleType Type="FloatValue">

       <Metadata IsWritable="false" />

    </TestbenchSimpleType>

      </TestbenchLabel>

      <TestbenchLabel Id="Aliases/ActualRPM" UnitId="NO_UNIT">

    <TestbenchSimpleType Type="FloatValue">

      <Metadata IsWritable="false" />

    </TestbenchSimpleType>

      </TestbenchLabel>

      <TestbenchLabel Id="Aliases/EnginePower" UnitId="NO_UNIT">

    <TestbenchSimpleType Type="FloatValue">

       <Metadata />

    </TestbenchSimpleType>

      </TestbenchLabel>

      <TestbenchLabel Id="Aliases/DesiredRPM" UnitId="NO_UNIT">

    <TestbenchSimpleType Type="FloatValue">

       <Metadata />

    </TestbenchSimpleType>

      </TestbenchLabel>

    </TestbenchLabelList>
    <MappingTable>

       <LabelMappingList>

       <LabelMapping>
          <TestbenchLabelReference LabelId="Aliases/EngineTemp" PortId="MaPort">

          <FromSimple>

             <OneToOne />

          </FromSimple>

          </TestbenchLabelReference>

          <FrameworkLabelReference LabelId="Aliases_EngineTemp" />

       </LabelMapping>

       <LabelMapping>

          <TestbenchLabelReference LabelId="Aliases/ActualRPM" PortId="MaPort">

          <FromSimple>

             <OneToOne />

          </FromSimple>

          </TestbenchLabelReference>
          <FrameworkLabelReference LabelId="Aliases_ActualRPM" />

       </LabelMapping>

       <LabelMapping>

          <TestbenchLabelReference LabelId="Aliases/EnginePower" PortId="MaPort">

          <FromSimple>

             <OneToOne />

          </FromSimple>

          </TestbenchLabelReference>

          <FrameworkLabelReference LabelId="Aliases_EnginePower" />

       </LabelMapping>
      <LabelMapping>

          <TestbenchLabelReference LabelId="Aliases/DesiredRPM" PortId="MaPort">

          <FromSimple>

             <OneToOne />

          </FromSimple>

          </TestbenchLabelReference>

          <FrameworkLabelReference LabelId="Aliases_DesiredRPM" />

       </LabelMapping>

       </LabelMappingList>

    </MappingTable>

</Mapping>

Related Links

Example ASAM Port Configuration XML File.

C# Walkthrough: Using the ASAM Framework to Stimulate Variables and Measure Results.

WAS THIS ARTICLE HELPFUL?

Not Helpful