<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!-- Copyright (C) JMRI 2003, 2005, 2007 All rights reserved -->
<!-- $Id: Digitrax_1x2.xml 17977 2011-07-18 17:23:46Z zoo $ -->
<!--                                                                        -->
<!-- JMRI is free software; you can redistribute it and/or modify it under  -->
<!-- the terms of version 2 of the GNU General Public License as published  -->
<!-- by the Free Software Foundation. See the "COPYING" file for a copy     -->
<!-- of this license.                                                       -->
<!--                                                                        -->
<!-- JMRI is distributed in the hope that it will be useful, but WITHOUT    -->
<!-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or  -->
<!-- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License  -->
<!-- for more details.                                                      -->
<decoder-config xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://jmri.org/xml/schema/decoder.xsd">
  <version author="jake@physics.berkeley.edu" version="10" lastUpdated="20050112"/>
  <version author="Walter Thompson wsthompson@earthlink.net" version="11" lastUpdated="20080412"/>
<!-- Version 4 - added wire colors -->
<!-- Version 5 - added some specific models, extended CV7 range to 249 -->
<!-- Version 6 - renamed family, added models -->
<!-- version 7 - adjusted top range of versionID -->
<!-- version 8 - default BEMF value corrected -->
<!-- Version 9 - fix "rule 17" typos -->
<!-- Version 9.1 - changed spelling of "behavior" (Jack Shall) -->
<!-- Version 10 - fixed mask for "Vstart/Vmid/Vfull in 128 step mode" - Bob Jacobsen -->
<!-- Version 11 - add factory reset -->
  <decoder>
    <family name="Premium FX with BEMF" mfg="Digitrax" lowVersionID="240" highVersionID="250">
      <model model="DH142" numOuts="4" numFns="2">
        <output name="4" label="Violet"/>
      </model>
      <model model="DN141" numOuts="4" numFns="2">
        <output name="4" label="Violet"/>
      </model>
      <model model="DN142" numOuts="4" numFns="2">
        <output name="4" label="Violet"/>
      </model>
      <model model="DN141K2" numOuts="4" numFns="2">
        <output name="4" label="Violet"/>
      </model>
      <model model="DN141E2" numOuts="4" numFns="2">
        <output name="4" label="Violet"/>
      </model>
      <model model="DN149K2" numOuts="4" numFns="2">
        <output name="4" label="Violet"/>
      </model>
    </family>
    <programming direct="byteOnly" paged="yes" register="yes" ops="yes"/>
    <variables>
      <variable label="Primary Address" CV="1" comment="Short address" item="Short Address" default="03">
        <shortAddressVal/>
        <label>Primary Address</label>
        <comment>Short address</comment>
      </variable>
      <variable label="Start Volts" CV="2" item="Vstart" comment="A value of 255 corresponds to 100%">
        <decVal/>
        <label>Start Volts</label>
        <comment>A value of 255 corresponds to 100%</comment>
      </variable>
      <variable label="Acceleration Rate" CV="3" item="Accel">
        <decVal max="31"/>
        <label>Acceleration Rate</label>
      </variable>
      <variable label="Deceleration Rate" CV="4" item="Decel">
        <decVal max="31"/>
        <label>Deceleration Rate</label>
      </variable>
      <variable label="Max Volts" CV="5" item="Vhigh">
        <decVal/>
        <label>Max Volts</label>
      </variable>
      <variable label="Mid Volts" CV="6" item="Vmid">
        <decVal/>
        <label>Mid Volts</label>
      </variable>
      <variable label="Version ID" CV="7" readOnly="yes" item="Decoder Version">
        <decVal/>
        <label>Version ID</label>
      </variable>
      <variable label="Manufacturer ID" CV="8" readOnly="yes" item="Manufacturer">
        <decVal/>
        <label>Manufacturer ID</label>
      </variable>
      <variable label="F1 during DC operation" CV="13" mask="XXXXXXXV" minFn="1" item="Analog Mode Function Status - F1">
        <enumVal>
          <enumChoice choice="Off">
            <choice>Off</choice>
          </enumChoice>
          <enumChoice choice="On">
            <choice>On</choice>
          </enumChoice>
        </enumVal>
        <label>F1 during DC operation</label>
      </variable>
      <variable label="F2 during DC operation" CV="13" mask="XXXXXXVX" minFn="2" item="Analog Mode Function Status - F2">
        <enumVal>
          <enumChoice choice="Off">
            <choice>Off</choice>
          </enumChoice>
          <enumChoice choice="On">
            <choice>On</choice>
          </enumChoice>
        </enumVal>
        <label>F2 during DC operation</label>
      </variable>
      <variable label="F3 during DC operation" CV="13" mask="XXXXXVXX" minFn="3" item="Analog Mode Function Status - F3">
        <enumVal>
          <enumChoice choice="Off">
            <choice>Off</choice>
          </enumChoice>
          <enumChoice choice="On">
            <choice>On</choice>
          </enumChoice>
        </enumVal>
        <label>F3 during DC operation</label>
      </variable>
      <variable label="F4 during DC operation" CV="13" mask="XXXXVXXX" minFn="4" item="Analog Mode Function Status - F4">
        <enumVal>
          <enumChoice choice="Off">
            <choice>Off</choice>
          </enumChoice>
          <enumChoice choice="On">
            <choice>On</choice>
          </enumChoice>
        </enumVal>
        <label>F4 during DC operation</label>
      </variable>
      <variable label="F5 during DC operation" CV="13" mask="XXXVXXXX" minFn="5" item="Analog Mode Function Status - F5">
        <enumVal>
          <enumChoice choice="Off">
            <choice>Off</choice>
          </enumChoice>
          <enumChoice choice="On">
            <choice>On</choice>
          </enumChoice>
        </enumVal>
        <label>F5 during DC operation</label>
      </variable>
      <variable label="F6 during DC operation" CV="13" mask="XXVXXXXX" minFn="6" item="Analog Mode Function Status - F6">
        <enumVal>
          <enumChoice choice="Off">
            <choice>Off</choice>
          </enumChoice>
          <enumChoice choice="On">
            <choice>On</choice>
          </enumChoice>
        </enumVal>
        <label>F6 during DC operation</label>
      </variable>
      <variable label="F0 Forward during DC operation" CV="13" mask="XVXXXXXX" item="Analog Mode Function Status - FL(f)">
        <enumVal>
          <enumChoice choice="Off">
            <choice>Off</choice>
          </enumChoice>
          <enumChoice choice="On">
            <choice>On</choice>
          </enumChoice>
        </enumVal>
        <label>F0 Forward during DC operation</label>
      </variable>
      <variable label="F0 Reverse during DC operation" CV="13" mask="VXXXXXXX" item="Analog Mode Function Status - FL(r)">
        <enumVal>
          <enumChoice choice="Off">
            <choice>Off</choice>
          </enumChoice>
          <enumChoice choice="On">
            <choice>On</choice>
          </enumChoice>
        </enumVal>
        <label>F0 Reverse during DC operation</label>
      </variable>
      <variable label="Long Address" CV="17" item="Extended Address">
        <longAddressVal/>
        <label>Long Address</label>
      </variable>
      <variable label="Advanced Consist address" CV="19" item="Consist Address" mask="XVVVVVVV" default="0">
        <decVal max="127"/>
        <label>Advanced Consist address</label>
      </variable>
      <variable label="Advanced Consist direction" CV="19" item="Consist Direction" mask="VXXXXXXX" default="0">
        <enumVal>
          <enumChoice choice="forward">
            <choice>forward</choice>
          </enumChoice>
          <enumChoice choice="reverse">
            <choice>reverse</choice>
          </enumChoice>
        </enumVal>
        <label>Advanced Consist direction</label>
      </variable>
<!--
		<variable label="Advanced Consist Function 1 Override" CV="21" mask="XXXXXXXV" item="Consist Address Active For F1" default="0">
			<enumVal>
				<enumChoice choice="No"/>
				<enumChoice choice="Yes"/>
				</enumVal>
			</variable>
		<variable label="Advanced Consist Function 2 Override" CV="21" mask="XXXXXXVX" item="Consist Address Active For F2" default="0">
			<enumVal>
				<enumChoice choice="No"/>
				<enumChoice choice="Yes"/>
				</enumVal>
			</variable>
		<variable label="Advanced Consist Function 0 Override" CV="22" mask="XXXXXXXV" item="Consist Address Active For F0" default="0">
			<enumVal>
				<enumChoice choice="No"/>
				<enumChoice choice="Yes"/>
				</enumVal>
			</variable>
-->
      <variable label="Normal direction of motion" CV="29" mask="XXXXXXXV" item="Locomotive Direction">
        <enumVal>
          <enumChoice choice="forward">
            <choice>forward</choice>
          </enumChoice>
          <enumChoice choice="reverse">
            <choice>reverse</choice>
          </enumChoice>
        </enumVal>
        <label>Normal direction of motion</label>
      </variable>
      <variable label="Speed steps" CV="29" mask="XXXXXXVX" item="Speed Step Mode" default="1">
        <enumVal>
          <enumChoice choice="14">
            <choice>14</choice>
          </enumChoice>
          <enumChoice choice="28/128">
            <choice>28/128</choice>
          </enumChoice>
        </enumVal>
        <label>Speed steps</label>
      </variable>
      <variable label="Analog conversion mode" CV="29" mask="XXXXXVXX" default="1" item="Analog (DC) Operation">
        <enumVal>
          <enumChoice choice="Off">
            <choice>Off</choice>
          </enumChoice>
          <enumChoice choice="On">
            <choice>On</choice>
          </enumChoice>
        </enumVal>
        <label>Analog conversion mode</label>
      </variable>
      <variable label="Use Speed Table" CV="29" mask="XXXVXXXX" item="Speed Table Definition">
        <enumVal>
          <enumChoice choice="Use Vstart, Vmid, Vhigh">
            <choice>Use Vstart, Vmid, Vhigh</choice>
          </enumChoice>
          <enumChoice choice="Use Table">
            <choice>Use Table</choice>
          </enumChoice>
        </enumVal>
        <label>Use Speed Table</label>
      </variable>
      <variable label="Addressing Mode" CV="29" mask="XXVXXXXX" item="Address Format">
        <enumVal>
          <enumChoice choice="2 digit addressing">
            <choice>2 digit addressing</choice>
          </enumChoice>
          <enumChoice choice="4 digit addressing">
            <choice>4 digit addressing</choice>
          </enumChoice>
        </enumVal>
        <label>Addressing Mode</label>
      </variable>
      <variable label="Forward light F0F effect generated" CV="49" mask="XXXXVVVV" item="Function F0F effect generated">
        <xi:include href="http://jmri.org/xml/decoders/digitrax/effectgen.xml"/>
        <label>Forward light F0F effect generated</label>
      </variable>
      <variable label="Forward light F0F behavior" CV="49" mask="VVVVXXXX" item="Function F0F behavior">
        <enumVal>
          <enumChoice choice="Forward direction, ON with function ON, phase A">
            <choice>Forward direction, ON with function ON, phase A</choice>
          </enumChoice>
          <enumChoice choice="Reverse direction, ON with function ON, phase B">
            <choice>Reverse direction, ON with function ON, phase B</choice>
          </enumChoice>
          <enumChoice choice="Non directional, ON with function ON, effect phase A">
            <choice>Non directional, ON with function ON, effect phase A</choice>
          </enumChoice>
          <enumChoice choice="Non directional, ON with function ON, effect phase B">
            <choice>Non directional, ON with function ON, effect phase B</choice>
          </enumChoice>
          <enumChoice choice="Forward direction, ON with F0 on &amp; function ON, phase A">
            <choice>Forward direction, ON with F0 on &amp; function ON, phase A</choice>
          </enumChoice>
          <enumChoice choice="Reverse direction, ON with F0 on &amp; function ON, phase B">
            <choice>Reverse direction, ON with F0 on &amp; function ON, phase B</choice>
          </enumChoice>
          <enumChoice choice="Special logic for Fwd Ditch Light or Rule 17 dimming">
            <choice>Special logic for Fwd Ditch Light or Rule 17 dimming</choice>
          </enumChoice>
          <enumChoice choice="Special logic for Rev Ditch Light or Rule 17 dimming">
            <choice>Special logic for Rev Ditch Light or Rule 17 dimming</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0x8)">
            <choice>Reserved (0x8)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0x9)">
            <choice>Reserved (0x9)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xA)">
            <choice>Reserved (0xA)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xB)">
            <choice>Reserved (0xB)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xC)">
            <choice>Reserved (0xC)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xD)">
            <choice>Reserved (0xD)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xE)">
            <choice>Reserved (0xE)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xF)">
            <choice>Reserved (0xF)</choice>
          </enumChoice>
        </enumVal>
        <label>Forward light F0F behavior</label>
      </variable>
      <variable label="Reverse light F0R effect generated" CV="50" mask="XXXXVVVV" item="Function F0R effect generated">
        <xi:include href="http://jmri.org/xml/decoders/digitrax/effectgen.xml"/>
        <label>Reverse light F0R effect generated</label>
      </variable>
      <variable label="Reverse light F0R behavior" CV="50" mask="VVVVXXXX" item="Function F0R behavior">
        <enumVal>
          <enumChoice choice="Forward direction, ON with function ON, phase A">
            <choice>Forward direction, ON with function ON, phase A</choice>
          </enumChoice>
          <enumChoice choice="Reverse direction, ON with function ON, phase B">
            <choice>Reverse direction, ON with function ON, phase B</choice>
          </enumChoice>
          <enumChoice choice="Non directional, ON with function ON, effect phase A">
            <choice>Non directional, ON with function ON, effect phase A</choice>
          </enumChoice>
          <enumChoice choice="Non directional, ON with function ON, effect phase B">
            <choice>Non directional, ON with function ON, effect phase B</choice>
          </enumChoice>
          <enumChoice choice="Forward direction, ON with F0 on &amp; function ON, phase A">
            <choice>Forward direction, ON with F0 on &amp; function ON, phase A</choice>
          </enumChoice>
          <enumChoice choice="Reverse direction, ON with F0 on &amp; function ON, phase B">
            <choice>Reverse direction, ON with F0 on &amp; function ON, phase B</choice>
          </enumChoice>
          <enumChoice choice="Special logic for Fwd Ditch Light or Rule 17 dimming">
            <choice>Special logic for Fwd Ditch Light or Rule 17 dimming</choice>
          </enumChoice>
          <enumChoice choice="Special logic for Rev Ditch Light or Rule 17 dimming">
            <choice>Special logic for Rev Ditch Light or Rule 17 dimming</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0x8)">
            <choice>Reserved (0x8)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0x9)">
            <choice>Reserved (0x9)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xA)">
            <choice>Reserved (0xA)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xB)">
            <choice>Reserved (0xB)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xC)">
            <choice>Reserved (0xC)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xD)">
            <choice>Reserved (0xD)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xE)">
            <choice>Reserved (0xE)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xF)">
            <choice>Reserved (0xF)</choice>
          </enumChoice>
        </enumVal>
        <label>Reverse light F0R behavior</label>
      </variable>
      <variable label="Function 1 effect generated" CV="51" mask="XXXXVVVV" minFn="1">
        <xi:include href="http://jmri.org/xml/decoders/digitrax/effectgen.xml"/>
        <label>Function 1 effect generated</label>
      </variable>
      <variable label="Function 1 behavior" CV="51" mask="VVVVXXXX" minFn="1">
        <enumVal>
          <enumChoice choice="Forward direction, ON with function ON, phase A">
            <choice>Forward direction, ON with function ON, phase A</choice>
          </enumChoice>
          <enumChoice choice="Reverse direction, ON with function ON, phase B">
            <choice>Reverse direction, ON with function ON, phase B</choice>
          </enumChoice>
          <enumChoice choice="Non directional, ON with function ON, effect phase A">
            <choice>Non directional, ON with function ON, effect phase A</choice>
          </enumChoice>
          <enumChoice choice="Non directional, ON with function ON, effect phase B">
            <choice>Non directional, ON with function ON, effect phase B</choice>
          </enumChoice>
          <enumChoice choice="Forward direction, ON with F0 on &amp; function ON, phase A">
            <choice>Forward direction, ON with F0 on &amp; function ON, phase A</choice>
          </enumChoice>
          <enumChoice choice="Reverse direction, ON with F0 on &amp; function ON, phase B">
            <choice>Reverse direction, ON with F0 on &amp; function ON, phase B</choice>
          </enumChoice>
          <enumChoice choice="Special logic for Fwd Ditch Light or Rule 17 dimming">
            <choice>Special logic for Fwd Ditch Light or Rule 17 dimming</choice>
          </enumChoice>
          <enumChoice choice="Special logic for Rev Ditch Light or Rule 17 dimming">
            <choice>Special logic for Rev Ditch Light or Rule 17 dimming</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0x8)">
            <choice>Reserved (0x8)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0x9)">
            <choice>Reserved (0x9)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xA)">
            <choice>Reserved (0xA)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xB)">
            <choice>Reserved (0xB)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xC)">
            <choice>Reserved (0xC)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xD)">
            <choice>Reserved (0xD)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xE)">
            <choice>Reserved (0xE)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xF)">
            <choice>Reserved (0xF)</choice>
          </enumChoice>
        </enumVal>
        <label>Function 1 behavior</label>
      </variable>
      <variable label="Function 2 effect generated" CV="52" mask="XXXXVVVV" minFn="2">
        <xi:include href="http://jmri.org/xml/decoders/digitrax/effectgen.xml"/>
        <label>Function 2 effect generated</label>
      </variable>
      <variable label="Function 2 behavior" CV="52" mask="VVVVXXXX" minFn="2">
        <enumVal>
          <enumChoice choice="Forward direction, ON with function ON, phase A">
            <choice>Forward direction, ON with function ON, phase A</choice>
          </enumChoice>
          <enumChoice choice="Reverse direction, ON with function ON, phase B">
            <choice>Reverse direction, ON with function ON, phase B</choice>
          </enumChoice>
          <enumChoice choice="Non directional, ON with function ON, effect phase A">
            <choice>Non directional, ON with function ON, effect phase A</choice>
          </enumChoice>
          <enumChoice choice="Non directional, ON with function ON, effect phase B">
            <choice>Non directional, ON with function ON, effect phase B</choice>
          </enumChoice>
          <enumChoice choice="Forward direction, ON with F0 on &amp; function ON, phase A">
            <choice>Forward direction, ON with F0 on &amp; function ON, phase A</choice>
          </enumChoice>
          <enumChoice choice="Reverse direction, ON with F0 on &amp; function ON, phase B">
            <choice>Reverse direction, ON with F0 on &amp; function ON, phase B</choice>
          </enumChoice>
          <enumChoice choice="Special logic for Fwd Ditch Light or Rule 17 dimming">
            <choice>Special logic for Fwd Ditch Light or Rule 17 dimming</choice>
          </enumChoice>
          <enumChoice choice="Special logic for Rev Ditch Light or Rule 17 dimming">
            <choice>Special logic for Rev Ditch Light or Rule 17 dimming</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0x8)">
            <choice>Reserved (0x8)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0x9)">
            <choice>Reserved (0x9)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xA)">
            <choice>Reserved (0xA)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xB)">
            <choice>Reserved (0xB)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xC)">
            <choice>Reserved (0xC)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xD)">
            <choice>Reserved (0xD)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xE)">
            <choice>Reserved (0xE)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xF)">
            <choice>Reserved (0xF)</choice>
          </enumChoice>
        </enumVal>
        <label>Function 2 behavior</label>
      </variable>
      <variable label="Function 3 effect generated" CV="53" mask="XXXXVVVV" minFn="3">
        <xi:include href="http://jmri.org/xml/decoders/digitrax/effectgen.xml"/>
        <label>Function 3 effect generated</label>
      </variable>
      <variable label="Function 3 behavior" CV="53" mask="VVVVXXXX" minFn="3">
        <enumVal>
          <enumChoice choice="Forward direction, ON with function ON, phase A">
            <choice>Forward direction, ON with function ON, phase A</choice>
          </enumChoice>
          <enumChoice choice="Reverse direction, ON with function ON, phase B">
            <choice>Reverse direction, ON with function ON, phase B</choice>
          </enumChoice>
          <enumChoice choice="Non directional, ON with function ON, effect phase A">
            <choice>Non directional, ON with function ON, effect phase A</choice>
          </enumChoice>
          <enumChoice choice="Non directional, ON with function ON, effect phase B">
            <choice>Non directional, ON with function ON, effect phase B</choice>
          </enumChoice>
          <enumChoice choice="Forward direction, ON with F0 on &amp; function ON, phase A">
            <choice>Forward direction, ON with F0 on &amp; function ON, phase A</choice>
          </enumChoice>
          <enumChoice choice="Reverse direction, ON with F0 on &amp; function ON, phase B">
            <choice>Reverse direction, ON with F0 on &amp; function ON, phase B</choice>
          </enumChoice>
          <enumChoice choice="Special logic for Fwd Ditch Light or Rule 17 dimming">
            <choice>Special logic for Fwd Ditch Light or Rule 17 dimming</choice>
          </enumChoice>
          <enumChoice choice="Special logic for Rev Ditch Light or Rule 17 dimming">
            <choice>Special logic for Rev Ditch Light or Rule 17 dimming</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0x8)">
            <choice>Reserved (0x8)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0x9)">
            <choice>Reserved (0x9)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xA)">
            <choice>Reserved (0xA)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xB)">
            <choice>Reserved (0xB)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xC)">
            <choice>Reserved (0xC)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xD)">
            <choice>Reserved (0xD)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xE)">
            <choice>Reserved (0xE)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xF)">
            <choice>Reserved (0xF)</choice>
          </enumChoice>
        </enumVal>
        <label>Function 3 behavior</label>
      </variable>
      <variable label="Function 4 effect generated" CV="54" mask="XXXXVVVV" minFn="4">
        <xi:include href="http://jmri.org/xml/decoders/digitrax/effectgen.xml"/>
        <label>Function 4 effect generated</label>
      </variable>
      <variable label="Function 4 behavior" CV="54" mask="VVVVXXXX" minFn="4">
        <enumVal>
          <enumChoice choice="Forward direction, ON with function ON, phase A">
            <choice>Forward direction, ON with function ON, phase A</choice>
          </enumChoice>
          <enumChoice choice="Reverse direction, ON with function ON, phase B">
            <choice>Reverse direction, ON with function ON, phase B</choice>
          </enumChoice>
          <enumChoice choice="Non directional, ON with function ON, effect phase A">
            <choice>Non directional, ON with function ON, effect phase A</choice>
          </enumChoice>
          <enumChoice choice="Non directional, ON with function ON, effect phase B">
            <choice>Non directional, ON with function ON, effect phase B</choice>
          </enumChoice>
          <enumChoice choice="Forward direction, ON with F0 on &amp; function ON, phase A">
            <choice>Forward direction, ON with F0 on &amp; function ON, phase A</choice>
          </enumChoice>
          <enumChoice choice="Reverse direction, ON with F0 on &amp; function ON, phase B">
            <choice>Reverse direction, ON with F0 on &amp; function ON, phase B</choice>
          </enumChoice>
          <enumChoice choice="Special logic for Fwd Ditch Light or Rule 17 dimming">
            <choice>Special logic for Fwd Ditch Light or Rule 17 dimming</choice>
          </enumChoice>
          <enumChoice choice="Special logic for Rev Ditch Light or Rule 17 dimming">
            <choice>Special logic for Rev Ditch Light or Rule 17 dimming</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0x8)">
            <choice>Reserved (0x8)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0x9)">
            <choice>Reserved (0x9)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xA)">
            <choice>Reserved (0xA)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xB)">
            <choice>Reserved (0xB)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xC)">
            <choice>Reserved (0xC)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xD)">
            <choice>Reserved (0xD)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xE)">
            <choice>Reserved (0xE)</choice>
          </enumChoice>
          <enumChoice choice="Reserved (0xF)">
            <choice>Reserved (0xF)</choice>
          </enumChoice>
        </enumVal>
        <label>Function 4 behavior</label>
      </variable>
      <variable label="Static compensation for speed stabilization" CV="55" default="128" item="EMF Static Config" comment="Factory default is 128, no effect until droop (CV57) set">
        <decVal/>
        <label>Static compensation for speed stabilization</label>
        <comment>Factory default is 128, no effect until droop (CV57) set</comment>
      </variable>
      <variable label="Dynamic compensation for speed stabilization" CV="56" default="48" item="EMF Dynamic Config" comment="Factory default is 48, no effect until droop (CV57) set">
        <decVal/>
        <label>Dynamic compensation for speed stabilization</label>
        <comment>Factory default is 48, no effect until droop (CV57) set</comment>
      </variable>
      <variable label="Solo operation droop compensation for speed stabilization" CV="57" mask="XXXXVVVV" default="6" item="EMF Droop Config" comment="0 is compenstation off, 15 is full on, typical value is 5">
        <decVal max="15"/>
        <label>Solo operation droop compensation for speed stabilization</label>
        <comment>0 is compenstation off, 15 is full on, typical value is 5</comment>
      </variable>
      <variable label="Advanced consist droop compensation for speed stabilization" CV="57" mask="VVVVXXXX" default="0" comment="0 is compenstation off, 15 is full on, typical value is 5">
        <decVal max="15"/>
        <label>Advanced consist droop compensation for speed stabilization</label>
        <comment>0 is compenstation off, 15 is full on, typical value is 5</comment>
      </variable>
      <variable label="Speed Compensation Control" CV="61" mask="XXXVXXXX">
        <enumVal>
          <enumChoice choice="F5 has no effect on speed compensation">
            <choice>F5 has no effect on speed compensation</choice>
          </enumChoice>
          <enumChoice choice="F5 On disables speed compensation">
            <choice>F5 On disables speed compensation</choice>
          </enumChoice>
        </enumVal>
        <label>Speed Compensation Control</label>
      </variable>
      <variable label="Digitrax Transponding" CV="61" mask="XXXXXXVX" item="Advanced Ack">
        <enumVal>
          <enumChoice choice="Off">
            <choice>Off</choice>
          </enumChoice>
          <enumChoice choice="On">
            <choice>On</choice>
          </enumChoice>
        </enumVal>
        <label>Digitrax Transponding</label>
      </variable>
      <variable label="Split field motor" CV="61" mask="XXXXXVXX">
        <enumVal>
          <enumChoice choice="Normal DC motor">
            <choice>Normal DC motor</choice>
          </enumChoice>
          <enumChoice choice="Split field/AC motor">
            <choice>Split field/AC motor</choice>
          </enumChoice>
        </enumVal>
        <label>Split field motor</label>
      </variable>
      <variable label="Directional Headlights" CV="61" mask="XXXXXXXV">
        <enumVal>
          <enumChoice choice="Normal headlight operation">
            <choice>Normal headlight operation</choice>
          </enumChoice>
          <enumChoice choice="Reverse light lead controlled by F4">
            <choice>Reverse light lead controlled by F4</choice>
          </enumChoice>
        </enumVal>
        <label>Directional Headlights</label>
      </variable>
      <variable label="Vstart/Vmid/Vfull in 128 step mode" CV="61" mask="XXVXXXXX">
        <enumVal>
          <enumChoice choice="Enabled">
            <choice>Enabled</choice>
          </enumChoice>
          <enumChoice choice="Disabled">
            <choice>Disabled</choice>
          </enumChoice>
        </enumVal>
        <label>Vstart/Vmid/Vfull in 128 step mode</label>
      </variable>
      <variable label="Short-circuit protection" CV="61" mask="XVXXXXXX" comment="Undocumented feature, occasionally requested by Digitrax tech support">
        <enumVal>
          <enumChoice choice="Enabled">
            <choice>Enabled</choice>
          </enumChoice>
          <enumChoice choice="Disabled">
            <choice>Disabled</choice>
          </enumChoice>
        </enumVal>
        <label>Short-circuit protection</label>
        <comment>Undocumented feature, occasionally requested by Digitrax tech support</comment>
      </variable>
      <variable label="Lamp keep-alive voltage" CV="62" mask="VVVVXXXX" item="Global lighting option 1" comment="0 is no keep-alive, use with LEDs">
        <decVal max="15"/>
        <label>Lamp keep-alive voltage</label>
        <comment>0 is no keep-alive, use with LEDs</comment>
      </variable>
      <variable label="FX rate adjust" CV="62" mask="XXXXVVVV" item="Global lighting option 2" comment="0 is fast, 15 is slow, 4 is recommended for start">
        <decVal max="15"/>
        <label>FX rate adjust</label>
        <comment>0 is fast, 15 is slow, 4 is recommended for start</comment>
      </variable>
      <variable label="Ditch light hold-over time" CV="63" item="Global lighting option 3" comment="0 is none, 40 is realistic 5 seconds, 255 is about 20 seconds">
        <decVal/>
        <label>Ditch light hold-over time</label>
        <comment>0 is none, 40 is realistic 5 seconds, 255 is about 20 seconds</comment>
      </variable>
      <variable label="Kick Start" CV="65">
        <decVal/>
        <label>Kick Start</label>
      </variable>
      <variable label="Forward Trim" CV="66">
        <decVal/>
        <label>Forward Trim</label>
      </variable>
      <variable label="Reverse Trim" CV="95">
        <decVal/>
        <label>Reverse Trim</label>
      </variable>
      <variable label="User Private ID #1" CV="105" item="User Id #1">
        <decVal/>
        <label>User Private ID #1</label>
      </variable>
      <variable label="User Private ID #2" CV="106" item="User Id #2">
        <decVal/>
        <label>User Private ID #2</label>
      </variable>
      <variable label="Speed Table" CV="67">
        <speedTableVal/>
        <label>Speed Table</label>
      </variable>
<!-- Define the fixed Function-Output mapping -->
      <constant label="FL(f) controls output 1" minOut="1" default="1"/>
      <constant label="FL(r) controls output 2" minOut="2" default="1"/>
      <constant label="F1 controls output 3" minOut="3" minFn="1" default="1"/>
      <constant label="F2 controls output 4" minOut="4" minFn="2" default="1"/>
      <constant label="F3 controls output 5" minOut="5" minFn="3" default="1"/>
      <constant label="F4 controls output 6" minOut="6" minFn="4" default="1"/>
      <constant label="F5 controls output 7" minOut="7" minFn="5" default="1"/>
      <constant label="F6 controls output 8" minOut="8" minFn="6" default="1"/>
      <constant label="F7 controls output 9" minOut="9" minFn="7" default="1"/>
      <constant label="F8 controls output 10" minOut="10" minFn="8" default="1"/>
    </variables>
    <resets>
      <factReset label="Reset All CVs" CV="8" default="8"/>
      <factReset label="Reset All CVs except speed table" CV="8" default="9"/>
    </resets>
  </decoder>
  <pane name="Digitrax">
    <column>
      <display item="Advanced consist droop compensation for speed stabilization"/>
      <display item="Speed Compensation Control"/>
      <display item="Transponding"/>
      <display item="Split field motor"/>
      <display item="Vstart/Vmid/Vfull in 128 step mode"/>
      <display item="Short-circuit protection"/>
    </column>
    <name>Digitrax</name>
  </pane>
</decoder-config>

