Tuner XML Details

Introduction

tuner.xml defines tuning layout, available tuners, and test signals for the Tuner tool.

Getters and Setters

To read parameters from the hardware, the tuner tool uses a getter command. In order to write a value to the hardware, a setter is used. For example, the getter for the derivative constant is "MG_KD%m". The symbol %m is replaced by GDK with the axis being set. The setter for this command is "KD%m=%n". The symbol %n is replaced by GDK with the value to be set.

The following is a list of symbols replaced by GDK. Only symbols used by the Tuner tool are shown here.

SymbolMeaningExampleExample after Substitution
%mAxis Indicator"MG_KD%m?"MG_KDA
%nValue to set"KD%m=%n"KDA=64.0

To provide flexibility in how parameters are read and written, the Tuner tool uses a JavaScript engine. Elements in tuner.xml are passed through the script engine providing more powerful capabilities. Most elements used by the Tuner do not require the full capabilities of the JavaScript engine. However, all elements are passed through the engine. It is important to quote string literals for tags <n>, <d>, <s>, and <g>.

The Element Tags


<tuner>

<tuner version="2.0">

This is the XML root element. The mandatory attribute version contains the version of the tuner syntax.


<filter>

<filter name="Basic Filter">

<filter> is a is a sub-element of <tuner>. Defines a filter toolbox grouping.

The mandatory attribute name is used in the toolbox item tab to group all items in this grouping.


<algorithm>

<algorithm name="Auto-Crossover" path="res:/tuners/autocrossover.dmc">

<algorithm> is a is a sub-element of <tuner>. Defines a tuning algorithm toolbox grouping.

The mandatory attribute name is used in the toolbox item tab to group all items in this grouping.

The mandatory attribute path provides GDK with the path to the tuning algorithm code.


<test>

<test name="Step Input" path="res:/tests/step.dmc">  

<test> is a is a sub-element of <tuner>. Defines a test signal toolbox grouping.

The mandatory attribute name is used in the toolbox item tab to group all items in this grouping.

The mandatory attribute path provides GDK with the path to the test signal code.


<p>

<p>

<p> is a sub-element of <filter>, <algorithm> or <test>. Defines a controller parameter or a value used in an algorithm or test signal.

The optional attribute ui defines the user interface type for editing the value. Valid ui values follow.

ui valueDescription
spinboxA numerical chooser allowing keyboard entry that moves from min to max in increments of step.
sliderA spinbox and graphical slider that moves from min to max in increments of step.
constantA constant that cannot be edited and is not displayed.

Omitting the ui attribute implies a slider type.


<n>

<n>"KP%m"</n>

<n> is a sub-element of <p>. Defines the name of the item.

String literals should be quoted.


<d>

<d>"Axis %m Proportional Constant"</d>

<d> is a sub-element of <p>. Defines a description for the item.

String literals should be quoted.


<g>

<g>"MG_KP%m"</g>

<g> is a sub-element of <p>. The getter for the parameter.

String literals should be quoted.


<s>

<s>"KP%m=%n"</s>

<s> is a sub-element of <p>. The setter for the parameter.

String literals should be quoted.


<min>

<min>0.0</min>

<min> is a sub-element of <p>. Defines the minimum value for the item.


<max>

<max>4095.875</max>

<max> is a sub-element of <p>. Defines the maximum value for the item.


<step>

<step>0.125</step>

<step> is a sub-element of <p>. Defines the step value for the item.


<default>

<default>1.0</default>

<default> is a sub-element of <p>. Defines the default value for the item.


<units>

<units>counts</units>

<units> is a sub-element of <p>. Defines the units for the item.