<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!-- Copyright (C) JMRI 2004 All rights reserved -->
<!-- $Id: Lenz_51.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="Michael Greene mgreene@cedarlane.com" version="2" lastUpdated="20040716"/>
<!-- These are the version 5.1 decoders -->
<!-- The defaults in this file match the values found in decoders from the factory but not the documentation -->
<!-- Note that these Lenz decoders only support a 15 position speed table CV67-CV81 -->
<!-- This file was built using the Lenz 5.4 XML file as a basis -->
  <decoder>
    <family name="Lenz 4th gen BEMF decoders" mfg="Lenz" lowVersionID="51">
      <model model="LE030" maxInputVolts="16V" maxMotorCurrent="0.7A" maxTotalCurrent="0.7A" numOuts="2" formFactor="N">
        <output name="1" label="A - White"/>
        <output name="2" label="B - Yellow"/>
        <size length="0.1.4" width="0.45" height="0.13" units="inches"/>
      </model>
      <model model="LE040" maxInputVolts="16V" maxMotorCurrent="0.7A" maxTotalCurrent="0.7A" numOuts="2" formFactor="N">
        <output name="1" label="A - White"/>
        <output name="2" label="B - Yellow"/>
        <size length="0.63" width="0.57" height="0.18" units="inches"/>
      </model>
      <model model="LE130" maxInputVolts="16V" maxMotorCurrent="1.0A" maxTotalCurrent="1.2A" numOuts="4" formFactor="HO">
        <output name="1" label="A - White"/>
        <output name="2" label="B - Yellow"/>
        <output name="3" label="C - Green"/>
        <output name="4" label="D - Violet"/>
        <size length="1.04" width="0.67" height="0.26" units="inches"/>
      </model>
      <model model="LE135" maxInputVolts="16V" maxMotorCurrent="1.3A" maxTotalCurrent="1.5A" numOuts="3" formFactor="HO">
        <output name="1" label="A - White"/>
        <output name="2" label="B - Yellow"/>
        <output name="3" label="C - Green"/>
        <size length="1.12" width="0.83" height="0.22" units="inches"/>
      </model>
      <model model="LE230" maxInputVolts="26V" maxMotorCurrent="2.5A" nmraWarrant="yes" nmraWarrantStart="200506" maxTotalCurrent="2.5A" numOuts="8" formFactor="Large Scale">
        <output name="1" label="A - Terminal L1"/>
        <output name="2" label="B - Terminal L2"/>
        <output name="3" label="C - S1: Yellow"/>
        <output name="4" label="D - S2: White"/>
        <output name="5" label="E - S3: Black"/>
        <output name="6" label="F - S4: Red"/>
        <output name="7" label="G - S5: Gray"/>
        <output name="8" label="H - S6: Orange"/>
        <size length="2.75" width="1.18" height="0.50" units="inches"/>
      </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="Range 1-15" default="4">
        <decVal max="15"/>
        <label>Start Volts</label>
        <comment>Range 1-15</comment>
      </variable>
      <variable label="Accel" CV="3" comment="Range 1-31" default="4">
        <decVal max="31"/>
        <label>Accel</label>
        <comment>Range 1-31</comment>
      </variable>
      <variable label="Decel" CV="4" comment="Range 1-31" default="1">
        <decVal max="31"/>
        <label>Decel</label>
        <comment>Range 1-31</comment>
      </variable>
      <variable label="Vhigh" CV="5" default="255">
        <decVal max="10"/>
        <label>Vhigh</label>
      </variable>
      <variable label="Version ID" CV="7" readOnly="yes" item="Decoder Version" default="51">
        <decVal/>
        <label>Version ID</label>
      </variable>
      <variable label="Manufacturer ID" CV="8" readOnly="yes" item="Manufacturer" default="99">
        <decVal/>
        <label>Manufacturer ID</label>
      </variable>
      <variable label="EMF frequency" CV="9" comment="Range 0-15" item="Total PWM Period" default="4">
        <decVal/>
        <label>EMF frequency</label>
        <comment>Range 0-15</comment>
      </variable>
      <variable label="Long Address" CV="17" item="Extended Address" comment="4 digit address (Range 0001-9999)">
        <longAddressVal/>
        <label>Long Address</label>
        <comment>4 digit address (Range 0001-9999)</comment>
      </variable>
      <variable label="Consist Address" CV="19" mask="XVVVVVVV" item="Consist Address">
        <decVal/>
        <label>Consist Address</label>
      </variable>
      <variable label="Consist Direction" CV="19" mask="VXXXXXXX">
        <enumVal>
          <enumChoice choice="Normal">
            <choice>Normal</choice>
          </enumChoice>
          <enumChoice choice="Reversed">
            <choice>Reversed</choice>
          </enumChoice>
        </enumVal>
        <label>Consist Direction</label>
      </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="0">
        <enumVal>
          <enumChoice choice="14">
            <choice>14</choice>
          </enumChoice>
          <enumChoice choice="28">
            <choice>28</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="Don't use Speed Table">
            <choice>Don't use Speed Table</choice>
          </enumChoice>
          <enumChoice choice="Use Speed Table">
            <choice>Use Speed 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="Back EMF control" CV="60" mask="XXXXXXXV" default="1">
        <enumVal>
          <enumChoice choice="Back EMF control inactive">
            <choice>Back EMF control inactive</choice>
          </enumChoice>
          <enumChoice choice="Back EMF control active">
            <choice>Back EMF control active</choice>
          </enumChoice>
        </enumVal>
        <label>Back EMF control</label>
      </variable>
      <variable label="Brake Momentum on DC" CV="60" item="DC Brake Momentum" mask="XXXXXVXX" default="0" comment="Governs how loco acts in DC track block">
        <enumVal>
          <enumChoice choice="Loco runs under DC analog voltage control">
            <choice>Loco runs under DC analog voltage control</choice>
          </enumChoice>
          <enumChoice choice="Loco brakes to a stop using momentum set in CV4">
            <choice>Loco brakes to a stop using momentum set in CV4</choice>
          </enumChoice>
        </enumVal>
        <label>Brake Momentum on DC</label>
        <comment>Governs how loco acts in DC track block</comment>
      </variable>
      <variable label="Speed Table" CV="67">
        <speedTableVal entries="15" max="63"/>
        <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" default="1"/>
      <constant label="F2 controls output 4" minOut="4" default="1"/>
      <constant label="F3 controls output 5" minOut="5" default="1"/>
      <constant label="F4 controls output 6" minOut="6" default="1"/>
      <constant label="F5 controls output 7" minOut="7" default="1"/>
      <constant label="F6 controls output 8" minOut="8" default="1"/>
    </variables>
  </decoder>
  <pane name="Lenz">
    <column>
      <display item="Back EMF control"/>
      <display item="Brake Momentum on DC"/>
    </column>
    <name>Lenz</name>
  </pane>
</decoder-config>

