<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!-- Copyright (C) JMRI 2002, 2005, 2007, 2008 All rights reserved -->
<!--                                                                        -->
<!-- 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="Christopher Zurek" version="5" lastUpdated="20090519"/>
  <version author="Christopher Zurek" version="4" lastUpdated="20080309"/>
  <version author="Bob Jacobsen" version="3" lastUpdated="20070422"/>
  <version author="Michael Mosher mjmx@comcast.net" version="2" lastUpdated="20050112"/>
  <!-- Created from version 10 of the 1x3 file -->
  <!-- Version 1.1 - changed spelling of "behavior" (Jack Shall) -->
  <!-- Version 2 - fixed mask for "Vstart/Vmid/Vfull in 128 step mode" -->
  <!-- Version 3 - added reset entries - Bob Jacobsen -->
  <!-- Version 4 - removed "Rear Headlight to F4" and fixed function mapping (Christopher Zurek) -->
  <!-- Version 5 - added F1 and F2 for later made decoders (Christopher Zurek) -->
  <decoder>
    <family name="Economy Series 3 with FX3, silent" mfg="Digitrax" lowVersionID="35" highVersionID="36">
      <model model="DH123" numOuts="2" numFns="5" connector="9pin" lowVersionID="35" highVersionID="36">
        <output name="1" label="White" connection="wire"/>
        <output name="2" label="Yellow" connection="wire"/>
      </model>
      <model model="DH123 Four Function" numOuts="4" numFns="8" connector="9pin" lowVersionID="36" highVersionID="36">
        <output name="1" label="White" connection="wire"/>
        <output name="2" label="Yellow" connection="wire"/>
        <output name="3" label="Green" connection="wire"/>
        <output name="4" label="Violet" connection="wire"/>
        <size length="1.2" width=".66" height="0.25" units="inches"/>
      </model>
    </family>
    <programming direct="byteOnly" paged="yes" register="yes" ops="yes"/>
    <variables>
      <xi:include href="http://jmri.org/xml/decoders/nmra/shortAndLongAddress.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/digitrax/vStartHighMid.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/nmra/accelDecel_31.xml"/>
      <!-- CV 7-8 -->
     <xi:include href="http://jmri.org/xml/decoders/nmra/mfgVersionId.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/digitrax/motorDriveFreq.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/nmra/consistAddrDirection.xml"/>
      <!-- CV=29 -->
     <xi:include href="http://jmri.org/xml/decoders/nmra/cv29direction.xml"/>
     <xi:include href="http://jmri.org/xml/decoders/nmra/cv29speedSteps.xml"/>
     <xi:include href="http://jmri.org/xml/decoders/nmra/cv29analog.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/nmra/cv29table3-28.xml"/>
      <variable 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>
        <label xml:lang="it">Luci di Testa F0F effetto generato</label>
      </variable>
      <variable CV="49" mask="VVVVXXXX" item="Function F0F behavior">
        <xi:include href="http://jmri.org/xml/decoders/digitrax/functionbehavior.xml"/>
        <label>Forward light F0F behavior</label>
        <label xml:lang="it">Luci di Testa F0F comportamento</label>
      </variable>
      <variable 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>
        <label xml:lang="it">Luci di coda F0F effetto generato</label>
      </variable>
      <variable CV="50" mask="VVVVXXXX" item="Function F0R behavior">
        <xi:include href="http://jmri.org/xml/decoders/digitrax/functionbehavior.xml"/>
        <label>Reverse light F0R behavior</label>
        <label xml:lang="it">Luci di Coda F0F comportamento</label>
      </variable>
      <variable item="Function 1 effect generated" CV="51" mask="XXXXVVVV" minOut="3">
        <xi:include href="http://jmri.org/xml/decoders/digitrax/effectgen.xml"/>
        <label>Function 1 effect generated</label>
        <label xml:lang="it">Funzione 1 effetto generato</label>
      </variable>
      <variable item="Function 1 behavior" CV="51" mask="VVVVXXXX" minOut="3">
        <xi:include href="http://jmri.org/xml/decoders/digitrax/functionbehavior.xml"/>
        <label>Function 1 behavior</label>
        <label xml:lang="it">Funzione 1 comportamento</label>
      </variable>
      <variable item="Function 2 effect generated" CV="52" mask="XXXXVVVV" minOut="4">
        <xi:include href="http://jmri.org/xml/decoders/digitrax/effectgen.xml"/>
        <label>Function 2 effect generated</label>
        <label xml:lang="it">Funzione 2 effetto generato</label>
      </variable>
      <variable item="Function 2 behavior" CV="52" mask="VVVVXXXX" minOut="4">
        <xi:include href="http://jmri.org/xml/decoders/digitrax/functionbehavior.xml"/>
        <label>Function 2 behavior</label>
        <label xml:lang="it">Funzione 1 comportamento</label>
      </variable>
      <variable CV="61" mask="XXXXXXVX" item="Advanced Ack">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-OffOn.xml"/>
        <label>Digitrax Transponding</label>
        <label xml:lang="it">Transponding Digitrax</label>
      </variable>
      <variable item="Split field motor" CV="61" mask="XXXXXVXX">
        <enumVal>
          <enumChoice choice="Normal DC motor">
            <choice>Normal DC motor</choice>
            <choice xml:lang="it">Motore DC Normale</choice>
          </enumChoice>
          <enumChoice choice="Split field/AC motor">
            <choice>Split field/AC motor</choice>
            <choice xml:lang="it">Motore AC</choice>
          </enumChoice>
        </enumVal>
        <label>Split field motor</label>
        <label xml:lang="it">Motore AC</label>
      </variable>
      <variable item="Vstart/Vmid/Vfull in 128 step mode" CV="61" mask="XXVXXXXX">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-enabledDisabled.xml"/>
        <label>Vstart/Vmid/Vfull in 128 step mode</label>
        <label xml:lang="it">Vstart/Vmid/Vfull in modo 128 step</label>
      </variable>
      <variable item="Short-circuit protection" CV="61" mask="XVXXXXXX" comment="Undocumented feature, occasionally requested by Digitrax tech support">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-enabledDisabled.xml"/>
        <label>Short-circuit protection</label>
        <label xml:lang="it">Protezione Corto-Circuito</label>
        <comment>Undocumented feature, occasionally requested by Digitrax tech support</comment>
        <comment xml:lang="it">Funzione non documentata,ocaasionalmente richiesta dal servizio assistenza Digitrax</comment>
      </variable>
      <variable 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>
        <label xml:lang="it">tensione mantenimento Lampade</label>
        <comment>0 is no keep-alive, use with LEDs</comment>
        <comment xml:lang="it">0=nessuna, usare con LED</comment>
      </variable>
      <variable 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>
        <label xml:lang="it">Tasso Aggiustamento FX</label>
        <comment>0 is fast, 15 is slow, 4 is recommended for start</comment>
        <comment xml:lang="it">0=veloce, 15= lento, 4 raccomandato all'inizio</comment>
      </variable>
      <variable 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>
        <label xml:lang="it">Tempo smorzamento luci Ditch</label>
        <comment>0 is none, 40 is realistic 5 seconds, 255 is about 20 seconds</comment>
        <comment xml:lang="it">0= nessuno, 40 realistico (5 sec), 255= circa 20 sec.</comment>
      </variable>
      <variable item="Switching speed enabled by F6" CV="54" mask="XXXXXXXV">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-disabledEnabled.xml"/>
        <label>Switching speed enabled by F6</label>
        <label xml:lang="it">Velocità da manovra con F6</label>
      </variable>
      <variable item="Torque compensation" CV="54" mask="XXXVXXXX">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-enabledDisabled.xml"/>
        <label>Torque compensation</label>
        <label xml:lang="it">Compensazione Coppia</label>
      </variable>
      <variable item="Decoder Lock Feature" CV="54" mask="XVXXXXXX" default="0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-enabledDisabled.xml"/>
        <label>Decoder Lock Feature</label>
        <label xml:lang="it">Funzione Blocco decoder</label>
      </variable>
      <xi:include href="http://jmri.org/xml/decoders/nmra/decoderLockId16.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/nmra/kickStart.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/nmra/fwdTrim.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/nmra/revTrim.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/nmra/userId.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/nmra/cv67speedTableBasic.xml"/>
      <!-- Define the Function-Output mapping based on NMRA definitions -->
      <variable item="FL(f) controls output 1" CV="33" mask="XXXXXXXV" minOut="1" default="1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>FL(f) controls output 1</label>
        <label xml:lang="it">FL (avanti) Uscita 1</label>
      </variable>
      <variable item="FL(f) controls output 2" CV="33" mask="XXXXXXVX" minOut="2">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>FL(f) controls output 2</label>
        <label xml:lang="it">FL (avanti) Uscita 2</label>
      </variable>
      <variable item="FL(f) controls output 3" CV="33" mask="XXXXXVXX" minOut="3">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>FL(f) controls output 3</label>
        <label xml:lang="it">FL (avanti) Uscita 3</label>
      </variable>
      <variable item="FL(f) controls output 4" CV="33" mask="XXXXVXXX" minOut="4">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>FL(f) controls output 4</label>
        <label xml:lang="it">FL (avanti) Uscita 4</label>
      </variable>
      <variable item="FL(r) controls output 1" CV="34" mask="XXXXXXXV" minOut="1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>FL(r) controls output 1</label>
        <label xml:lang="it">FL (indietro) Uscita 1</label>
      </variable>
      <variable item="FL(r) controls output 2" CV="34" mask="XXXXXXVX" minOut="2" default="1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>FL(r) controls output 2</label>
        <label xml:lang="it">FL (indietro) Uscita 2</label>
      </variable>
      <variable item="FL(r) controls output 3" CV="34" mask="XXXXXVXX" minOut="3">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>FL(r) controls output 3</label>
        <label xml:lang="it">FL (indietro) Uscita 3</label>
      </variable>
      <variable item="FL(r) controls output 4" CV="34" mask="XXXXVXXX" minOut="4">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>FL(r) controls output 4</label>
        <label xml:lang="it">FL (indietro) Uscita 4</label>
      </variable>
      <variable item="F1 controls output 1" CV="35" mask="XXXXXXXV" minOut="1" minFn="1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F1 controls output 1</label>
        <label xml:lang="it">F1 Uscita 1</label>
      </variable>
      <variable item="F1 controls output 2" CV="35" mask="XXXXXXVX" minOut="2" minFn="1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F1 controls output 2</label>
        <label xml:lang="it">F1 Uscita 2</label>
      </variable>
      <variable item="F1 controls output 3" CV="35" mask="XXXXXVXX" minOut="3" minFn="1" default="1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F1 controls output 3</label>
        <label xml:lang="it">F1 Uscita 3</label>
      </variable>
      <variable item="F1 controls output 4" CV="35" mask="XXXXVXXX" minOut="4" minFn="1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F1 controls output 4</label>
        <label xml:lang="it">F1 Uscita 4</label>
      </variable>
      <variable item="F2 controls output 1" CV="36" mask="XXXXXXXV" minOut="1" minFn="2">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F2 controls output 1</label>
        <label xml:lang="it">F2 Uscita 1</label>
      </variable>
      <variable item="F2 controls output 2" CV="36" mask="XXXXXXVX" minOut="2" minFn="2">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F2 controls output 2</label>
        <label xml:lang="it">F2 Uscita 2</label>
      </variable>
      <variable item="F2 controls output 3" CV="36" mask="XXXXXVXX" minOut="3" minFn="2">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F2 controls output 3</label>
        <label xml:lang="it">F2 Uscita 3</label>
      </variable>
      <variable item="F2 controls output 4" CV="36" mask="XXXXVXXX" minOut="4" minFn="2" default="1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F2 controls output 4</label>
        <label xml:lang="it">F2 Uscita 4</label>
      </variable>
      <variable item="F3 controls output 1" CV="37" mask="XXXXXXXV" minOut="1" minFn="3">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F3 controls output 1</label>
        <label xml:lang="it">F3 Uscita 1</label>
      </variable>
      <variable item="F3 controls output 2" CV="37" mask="XXXXXXVX" minOut="2" minFn="3">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F3 controls output 2</label>
        <label xml:lang="it">F3 Uscita 2</label>
      </variable>
      <variable item="F3 controls output 3" CV="37" mask="XXXXXVXX" minOut="3" minFn="3">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F3 controls output 3</label>
        <label xml:lang="it">F3 Uscita 3</label>
      </variable>
      <variable item="F3 controls output 4" CV="37" mask="XXXXVXXX" minOut="4" minFn="3">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F3 controls output 4</label>
        <label xml:lang="it">F3 Uscita 4</label>
      </variable>
      <variable item="F4 controls output 4" CV="38" mask="XXXXXXXV" minOut="4" minFn="4">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F4 controls output 4</label>
        <label xml:lang="it">F4 Uscita 4</label>
      </variable>
      <variable item="F5 controls output 4" CV="39" mask="XXXXXXXV" minOut="4" minFn="5">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F5 controls output 4</label>
        <label xml:lang="it">F5 Uscita 4</label>
      </variable>
      <variable item="F6 controls output 4" CV="40" mask="XXXXXXXV" minOut="4" minFn="6">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F6 controls output 4</label>
        <label xml:lang="it">F6 Uscita 4</label>
      </variable>
    </variables>
    <resets>
      <factReset label="Reset All CVs" CV="8" default="8">
        <label>Reset All CVs</label>
        <label xml:lang="it">Reset delle CV ai valori di fabbrica</label>
      </factReset>
      <factReset label="Reset All CVs except speed table" CV="8" default="9">
        <label>Reset All CVs except speed table</label>
        <label xml:lang="it">Reset delle CV salvo Tabella Velocità ai valori di fabbrica</label>
      </factReset>
    </resets>
  </decoder>
  <pane>
    <column>
      <display item="Transponding"/>
      <display item="Split field motor"/>
      <display item="Vstart/Vmid/Vfull in 128 step mode"/>
      <display item="Short-circuit protection"/>
      <display item="Switching speed enabled by F6"/>
      <display item="Torque compensation"/>
      <display item="Decoder Lock Feature"/>
      <display item="Decoder Lock ID number"/>
    </column>
    <name>Digitrax</name>
  </pane>
</decoder-config>
