<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!-- Copyright (C) JMRI 2002, 2005, 2007 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="Bob Jacobsen" version="2" lastUpdated="20190727"/> <!-- xinclude for CV19 -->
  <version author="Dale A Tripp" version="1" lastUpdated="20090625"/>
  <version author="Marc Fournier" version="1.1" lastUpdated="20091018"/>
  <version author="Michael Mosher" version="3" lastUpdated="20200109"/>
  <!-- Created from Digitrax_01x3 file -->
  <!-- Correct variables statement error, file name corrected put K in caps, sort issue -->
  <!-- Version 3 - change mfg to match name in NMRA.xml -->
  <decoder>
    <family name="EM13, silent, readback" mfg="KATO Precision Models" lowVersionID="49" highVersionID="51">
      <model model="EM13" numOuts="1" numFns="0" maxMotorCurrent="1.0A (peak=1.5A)" formFactor="N" connector="unspecified">
        <output name="4" label="Violet" connection="unspecified"/>
        <size length=".55" width=".36" height=".13" units="inches"/>
      </model>
    </family>
    <programming direct="yes" paged="yes" register="yes" ops="yes" transpRead="yes"/>
    <variables>
      <xi:include href="http://jmri.org/xml/decoders/nmra/shortAndLongAddress.xml"/>
      <variable CV="2" item="Vstart" comment="A value of 255 corresponds to 100%">
        <decVal/>
        <label>Start Volts</label>
        <label xml:lang="it">Volt Partenza</label>
        <label xml:lang="fr">V démarr.v</label>
        <label xml:lang="de">Startspannung</label>
        <comment>A value of 255 corresponds to 100%</comment>
      </variable>
      <!-- CV 3-4 -->
     <xi:include href="http://jmri.org/xml/decoders/nmra/accelDecel.xml"/>
      <variable CV="5" item="Vhigh">
        <decVal/>
        <label>Max Volts</label>
        <label xml:lang="it">Volt Massimi (0-255):</label>
        <label xml:lang="de">Höchstgeschwindigkeit</label>
      </variable>
      <variable CV="6" item="Vmid">
        <decVal/>
        <label>Mid Volts</label>
        <label xml:lang="it">Volts intermedi (0-255)</label>
        <label xml:lang="de">Vmittel (0-255)</label>
      </variable>
      <xi:include href="http://jmri.org/xml/decoders/nmra/mfgVersionId.xml"/>
      <variable item="Total PWM Period" CV="9">
        <decVal/>
        <label>Total PWM Period (Motor Drive Frequency)</label>
        <label xml:lang="fr">Total PWM Period(fr)</label>
        <label xml:lang="it">Periodo PWM (Frequenza pilotaggio Motore)</label>
      </variable>
          <!-- CV=29 : Consist seems not managed at all from Kato manual
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-FwdRev.xml"/>
        <label>Advanced Consist direction</label>
      </variable>
       -->
      <!-- 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="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 item="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 item="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 CV="61" mask="XXXXXXVX" tooltip="Activates Digitrax Transponding" item="Advanced Ack">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-OffOn.xml"/>
        <label>Digitrax Transponding</label>
      </variable>
      <variable item="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 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>
      </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>
        <comment>Undocumented feature, occasionally requested by Digitrax tech support</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>
        <comment>0 is no keep-alive, use with LEDs</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>
        <comment>0 is fast, 15 is slow, 4 is recommended for start</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>
        <comment>0 is none, 40 is realistic 5 seconds, 255 is about 20 seconds</comment>
      </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/userId.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/nmra/cv67speedTableBasic.xml"/>
    </variables>
    <resets>
      <factReset label="Reset All CVs" CV="8" default="8">
        <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 xml:lang="it">Reset delle CV salvo Tabella Velocità ai valori di fabbrica</label>
      </factReset>
    </resets>
  </decoder>
  <pane>
    <column>
      <!--<display item="Advanced consist droop compensation for speed stabilization"/>-->
      <display item="Speed Compensation Control"/>
      <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" tooltip="Activates Decoder Locking feature"/>
      <display item="Decoder Lock ID number" tooltip="Set this decoder's unique locking ID number"/>
    </column>
    <name>Digitrax</name>
  </pane>
</decoder-config>
