<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!DOCTYPE decoder-config SYSTEM "../DTD/decoder-config.dtd">

<!-- Copyright (C) JMRI 2008 All rights reserved -->
<!-- $Id: Lenz_Standard.xml,v 1.1 2008/07/14 04:09:11 jacobsen Exp $ -->
<!--                                                                        -->
<!-- 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>
	<version author="Ian Birchenough ian.birchenough@talktalk.net"
				version="1" lastUpdated="20081107" />
				<!-- Version 1 - created  "20081107"-->

<decoder>
	<family name="Lenz Standard" mfg="Lenz" highVersionID="81" lowVersionID="80"
		comment="No comment" >
		<model model="Standard" numOuts="3" numFns="9" lowVersionID="80"
 			maxMotorCurrent="1A " formFactor="N">
			<output name="1" label="A - White" />
			<output name="2" label="B - Yellow" />
			<output name="3" label="C - Green" />
		</model>
	</family>

	<programming
		direct="yes" paged="yes" register="yes" ops="yes"/>

	<variables>
		<variable label="Primary Address (1-127)" CV="1"
			item="Short Address" default="03"
			comment="Range 1-127">
			<shortAddressVal/>
		</variable>

		<variable label="Start Volts (0-255)" CV="2"
			item="Vstart" default="0"
			comment="Range 0-255">
			<decVal min="0" max="255"/>
			</variable>
	
		<variable label="Acceleration Momentum (0-255)" CV="3"
			item="Accel" default="6"
			comment="Range 0-255">
			<decVal min="0" max="255"/>
		</variable>

		<variable label="Deceleration (Brake) Momentum (0-255)" CV="4"
			item="Decel" default="5"
			comment="Range 0-255">
			<decVal min="0" max="255"/>
		</variable>
		
		<variable label="Max Volts (0-255)" CV="5"
			item="Vhigh" default="255"
			comment="Sets the maximum voltage at full throttle">
			<decVal min="0" max="255"/>
		</variable>

		<variable label="Vmid (0-255)" CV="6"
			item="Vmid" default="48"
			comment ="Range 0-255">
			<decVal min="0" max="255"/>
		</variable>

		<variable label="Decoder Version No: " CV="7" readOnly="yes"
			item="Decoder Version" default="81">
			<decVal/>
		</variable>

		
		<variable label="Manufacturer ID: " CV="8" readOnly="yes"
			item="Manufacturer" default="99">
			<decVal/>
		</variable>

		<variable label="Manufacturer ID - Reset" CV="8"
			item="Reset"
			comment="Writing a value of 8 or 33 will reset decoder to factory defaults" >
			<decVal/>
		</variable>

		<variable label="Back EMF Repetition Rate (0-63)" CV="9"
			item="Total PWM Period" default="15"
			comment ="Range 0-63">
			<decVal min="0" max="63"/>
		</variable>

		<variable label="Extended Address (0-9999)" CV="17"
			item="Long Address" default="100"
			comment="4 digit address (Range 0-9999)">
			<longAddressVal/>
		</variable>

		<variable label="Consist Address (0-127)" CV="19" mask="XVVVVVVV"
			item="Consist Address" default="0"
			comment="Stores consist address. Range 0-127 (direction set in bit 7)">
			<decVal min="0" max="127"/>
		</variable>
		
		<variable label="Consist Direction" CV="19" mask="VXXXXXXX"
			comment="A consist address over 127 will also set this bit" >
			<enumVal>
				<enumChoice choice="Forward"></enumChoice>
				<enumChoice choice="Reversed"></enumChoice>
			</enumVal>
		</variable>
	
		<variable label="Locomotive Direction in Forward" CV="29" mask="XXXXXXXV"
			item="Locomotive Direction" default="0">
			<enumVal>
				<enumChoice choice="Normal"/>
				<enumChoice choice="Reversed"/>
			</enumVal>
		</variable>

		<variable label="Speed Steps (Headlight Mode)" CV="29" mask="XXXXXXVX"
			item="Speed Step Mode" default="1">
			<enumVal>
				<enumChoice choice="14"/>
				<enumChoice choice="28/128"/>
			</enumVal>
		</variable>

		<variable label="Loco can operate on conventional DC" CV="29" mask="XXXXXVXX" 
			item="Analog (DC) Operation" default="1">
			<enumVal>
				<enumChoice choice="No"/>
				<enumChoice choice="Yes"/>
			</enumVal>
		</variable>


		<variable label="Speed Table Selection" CV="29" mask="XXXVXXXX"
			item="Speed Table Definition">
			<enumVal>
				<enumChoice choice="Use Vstart, Vmid, Vhigh"/>
				<enumChoice choice="Use the Speed Table"/>
			</enumVal>
		</variable>

		<variable label="Addressing Mode" CV="29" mask="XXVXXXXX"
			item="Address Format">
			<enumVal>
				<enumChoice choice="2 digit addressing"/>
				<enumChoice choice="4 digit addressing"/>
			</enumVal>
		</variable>

		<variable label="Light short-circuit" CV="30" mask="XXXXXXXV" 
			item="Light Short" >
			<enumVal>
				<enumChoice choice="Okay"/>
				<enumChoice choice="Fault"/>
			</enumVal>
		</variable>

		<variable label="Overheating" CV="30" mask="XXXXXXVX" 
			item="Overheating" default="0">
			<enumVal>
				<enumChoice choice="Okay"/>
				<enumChoice choice="Fault"/>
			</enumVal>
		</variable>

		<variable label="Motor short-circuit" CV="30" mask="XXXXXVXX" 
			item="Motor Short" default="0">
			<enumVal>
				<enumChoice choice="Okay"/>
				<enumChoice choice="Fault"/>
			</enumVal>
		</variable>

		<variable label="F0(f) controls output A" CV="33" mask="XXXXVXXX"
			item="FL(f) controls output 1" default="1" minOut="1" minFn="0">
			<enumVal> <enumChoice choice="No"/>	<enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F0(r) controls output A" CV="34" mask="XXXXVXXX"
			item="FL(r) controls output 1" minOut="1" minFn="0">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F1 controls output A" CV="35" mask="XXXXVXXX"
			item="F1 controls output 1" minOut="1" minFn="1">
			<enumVal> <enumChoice choice="No"/>	<enumChoice choice="Yes"/>  </enumVal>
		</variable>
		<variable label="F2 controls output A" CV="36" mask="XXXXVXXX"
			item="F2 controls output 1" minOut="1" minFn="2">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F3 controls output A" CV="37" mask="XXXXVXXX"
			item="F3 controls output 1" minOut="1" minFn="3">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F4 controls output A" CV="38" mask="XXXXXXXV"
			item="F4 controls output 1" minOut="1" minFn="4">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F5 controls output A" CV="39" mask="XXXXXXXV"
			item="F5 controls output 1" minOut="1" minFn="5">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F6 controls output A" CV="40" mask="XXXXXXXV"
			item="F6 controls output 1" minOut="1" minFn="6">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F7 controls output A" CV="41" mask="XXXXXXXV"
			item="F7 controls output 1" minOut="1" minFn="7">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F8 controls output A" CV="42" mask="XXXXXXXV"
			item="F8 controls output 1" minOut="1" minFn="8">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>

		<variable label="F0(f) controls output B" CV="33" mask="XXXVXXXX"
			item="FL(f) controls output 2" minOut="2" minFn="0">
			<enumVal> <enumChoice choice="No"/>	<enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F0(r) controls output B" CV="34" mask="XXXVXXXX"
			item="FL(r) controls output 2" default="1" minOut="2" minFn="0">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F1 controls output B" CV="35" mask="XXXVXXXX"
			item="F1 controls output 2" minOut="2" minFn="1">
			<enumVal> <enumChoice choice="No"/>	<enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F2 controls output B" CV="36" mask="XXXVXXXX"
			item="F2 controls output 2" minOut="2" minFn="2">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F3 controls output B" CV="37" mask="XXXVXXXX"
			item="F3 controls output 2" minOut="2" minFn="3">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F4 controls output B" CV="38" mask="XXXXXXVX"
			item="F4 controls output 2" minOut="2" minFn="4">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F5 controls output B" CV="39" mask="XXXXXXVX"
			item="F5 controls output 2" minOut="2" minFn="5">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F6 controls output B" CV="40" mask="XXXXXXVX"
			item="F6 controls output 2" minOut="2" minFn="6">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F7 controls output B" CV="41" mask="XXXXXXVX"
			item="F7 controls output 2" minOut="2" minFn="7">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F8 controls output B" CV="42" mask="XXXXXXVX"
			item="F8 controls output 2" minOut="2" minFn="8">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>


		<variable label="F0(f) controls output C" CV="33" mask="XXVXXXXX"
			item="FL(f) controls output 3" minOut="3" minFn="0">
			<enumVal> <enumChoice choice="No"/>	<enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F0(r) controls output C" CV="34" mask="XXVXXXXX"
			item="FL(r) controls output 3" minOut="3" minFn="0">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F1 controls output C" CV="35" mask="XXVXXXXX"
			item="F1 controls output 3" default="1" minOut="3" minFn="1">
			<enumVal> <enumChoice choice="No"/>	<enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F2 controls output C" CV="36" mask="XXVXXXXX"
			item="F2 controls output 3" minOut="3" minFn="2">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F3 controls output C" CV="37" mask="XXVXXXXX"
			item="F3 controls output 3" minOut="3" minFn="3">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F4 controls output C" CV="38" mask="XXXXXVXX"
			item="F4 controls output 3" minOut="3" minFn="4">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F5 controls output C" CV="39" mask="XXXXXVXX"
			item="F5 controls output 3" minOut="3" minFn="5">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F6 controls output C" CV="40" mask="XXXXXVXX"
			item="F6 controls output 3" minOut="3" minFn="6">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F7 controls output C" CV="41" mask="XXXXXVXX"
			item="F7 controls output 3" minOut="3" minFn="7">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F8 controls output C" CV="42" mask="XXXXXVXX"
			item="F8 controls output 3" minOut="3" minFn="8">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>

		<variable label="F0(f) controls output D" CV="33" mask="XVXXXXXX"
			item="FL(f) controls output 4" minOut="4" minFn="0">
			<enumVal> <enumChoice choice="No"/>	<enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F0(r) controls output D" CV="34" mask="XVXXXXXX"
			item="FL(r) controls output 4" minOut="4" minFn="0">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F1 controls output D" CV="35" mask="XVXXXXXX"
			item="F1 controls output 4" minOut="4" minFn="1">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F2 controls output D" CV="36" mask="XVXXXXXX"
			item="F2 controls output 4" default="1" minOut="4" minFn="2">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F3 controls output D" CV="37" mask="XVXXXXXX"
			item="F3 controls output 4" minOut="4" minFn="3">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F4 controls output D" CV="38" mask="XXXXVXXX"
			item="F4 controls output 4" minOut="4" minFn="4">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F5 controls output D" CV="39" mask="XXXXVXXX"
			item="F5 controls output 4" minOut="4" minFn="5">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F6 controls output D" CV="40" mask="XXXXVXXX"
			item="F6 controls output 4" minOut="4" minFn="6">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F7 controls output D" CV="41" mask="XXXXVXXX"
			item="F7 controls output 4" minOut="4" minFn="7">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F8 controls output D" CV="42" mask="XXXXVXXX"
			item="F8 controls output 4" minOut="4" minFn="8">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F9 controls output D" CV="43" mask="XXXXXXXV"
			item="F9 controls output 4" minOut="4" minFn="9">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F10 controls output D" CV="44" mask="XXXXXXXV"
			item="F10 controls output 4" minOut="4" minFn="10">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F11 controls output D" CV="45" mask="XXXXXXXV"
			item="F11 controls output 4" minOut="4" minFn="11">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="F12 controls output D" CV="46" mask="XXXXXXXV"
			item="F12 controls output 4" minOut="4" minFn="12">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>

		<variable label="Motor Type(0-5)" CV="50" mask="XXXXVVVV"
			item="Motor type" default="0"
			comment="Range 0-5">
			<enumVal>
				<enumChoice choice="0 "/>
				<enumChoice choice="1 "/>
				<enumChoice choice="2 "/>
				<enumChoice choice="3 "/>
				<enumChoice choice="4 "/>
				<enumChoice choice="5 "/>
			</enumVal>
			</variable>
		
		<variable label="EMF Switch" CV="50" mask="XXVXXXXX" 
			item="EMF Switch" default="0">
			<enumVal>
				<enumChoice choice="Inactive"/>
				<enumChoice choice="Active"/>
			</enumVal>
		</variable>

		<variable label="BEMF Control" CV="50" mask="XVXXXXXX" 
			item="BEMF Control" default="0">
			<enumVal>
				<enumChoice choice="On "/>
				<enumChoice choice="Off"/>
			</enumVal>
		</variable>

		<variable label="Motor Drive Frequency" CV="50" mask="VXXXXXXX" 
			item="Motor Frequency" default="0">
			<enumVal>
				<enumChoice choice="High "/>
				<enumChoice choice="Low "/>
			</enumVal>
		</variable>

		<variable label="Constant Braking Distance" CV="51" mask="XXXXXXXV"
			item="Constant Braking" default="0">
  			<enumVal>
				<enumChoice choice="Disabled"/>
				<enumChoice choice="Enabled"/>
			</enumVal>
		</variable>

		<variable label="Stop on DC (RailCom off only)" CV="51" mask="XXVXXXXX"
			item="Stop on DC" default="0">
  			<enumVal>
				<enumChoice choice="Disabled"/>
				<enumChoice choice="Enabled"/>
			</enumVal>
		</variable>

		<variable label="Braking Distance in Constant Mode (0-255)" CV="52"
			item="Braking Distance" default="50"
			comment ="Range 0-255">
			<decVal min="0" max="255"/>
		</variable>

		<variable label="Dimming Intensity, Outputs A and C (0-255)" CV="55"
			item="Global lighting option 1" default="255"
			tooltip="Sets intensity of dimmed headlight (larger number = brighter light)">
			<decVal min="0" max="255"/>
		</variable>
	
		<variable label="Dimming Intensity, Outputs B and D (0-255)" CV="56"
			item="Global lighting option 2" default="255"
			tooltip="Sets intensity of dimmed headlight (larger number = brighter light)">
			<decVal min="0" max="255"/>
		</variable>

		<variable label="Enable dimming with F1" CV="57" mask="XXXXXXXV"
			tooltip="Toggle light dimming 'on' using F1">
			<enumVal> <enumChoice choice="No"/>	<enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Enable dimming with F2" CV="57" mask="XXXXXXVX"
			tooltip="Toggle light dimming 'on' using F2">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Enable dimming with F3" CV="57" mask="XXXXXVXX"
			tooltip="Toggle light dimming 'on' using F3">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Enable dimming with F4" CV="57" mask="XXXXVXXX"
			tooltip="Toggle light dimming 'on' using F4">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Enable dimming with F5" CV="57" mask="XXXVXXXX"
			tooltip="Toggle light dimming 'on' using F5">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Enable dimming with F6" CV="57" mask="XXVXXXXX"
			tooltip="Toggle light dimming 'on' using F6">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Enable dimming with F7" CV="57" mask="XVXXXXXX"
			tooltip="Toggle light dimming 'on' using F7">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Enable dimming with F8" CV="57" mask="VXXXXXXX"
			tooltip="Toggle light dimming 'on' using F8">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>

		<variable label="Enable Low Speed with F1" CV="58" mask="XXXXXXXV"
			tooltip="Toggle low speed switching gear 'on' using F1">
			<enumVal> <enumChoice choice="No"/>	<enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Enable Low Speed with F2" CV="58" mask="XXXXXXVX"
			tooltip="Toggle low speed switching gear 'on' using F2">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Enable Low Speed with F3" CV="58" mask="XXXXXVXX"
			default="1" tooltip="Toggle low speed switching gear 'on' using F3">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Enable Low Speed with F4" CV="58" mask="XXXXVXXX"
			tooltip="Toggle low speed switching gear 'on' using F4">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Enable Low Speed with F5" CV="58" mask="XXXVXXXX"
			tooltip="Toggle low speed switching gear 'on' using F5">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Enable Low Speed with F6" CV="58" mask="XXVXXXXX"
			tooltip="Toggle low speed switching gear 'on' using F6">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Enable Low Speed with F7" CV="58" mask="XVXXXXXX"
			tooltip="Toggle low speed switching gear 'on' using F7">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Enable Low Speed with F8" CV="58" mask="VXXXXXXX"
			tooltip="Toggle low speed switching gear 'on' using F8">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>

		<variable label="Disable momentum with F1" CV="59" mask="XXXXXXXV"
			tooltip="Toggle acceleration and deceleration delays 'off' using F1">
			<enumVal> <enumChoice choice="No"/>	<enumChoice choice="Yes"/>	</enumVal>
		</variable>
		<variable label="Disable momentum with F2" CV="59" mask="XXXXXXVX"
			tooltip="Toggle acceleration and deceleration delays 'off' using F2">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Disable momentum with F3" CV="59" mask="XXXXXVXX"
			tooltip="Toggle acceleration and deceleration delays 'off' using F3">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Disable momentum with F4" CV="59" mask="XXXXVXXX"
			default="1" tooltip="Toggle acceleration and deceleration delays 'off' using F4">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Disable momentum with F5" CV="59" mask="XXXVXXXX"
			tooltip="Toggle acceleration and deceleration delays 'off' using F5">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Disable momentum with F6" CV="59" mask="XXVXXXXX"
			tooltip="Toggle acceleration and deceleration delays 'off' using F6">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Disable momentum with F7" CV="59" mask="XVXXXXXX"
			tooltip="Toggle acceleration and deceleration delays 'off' using F7">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Disable momentum with F8" CV="59" mask="VXXXXXXX"
			tooltip="Toggle acceleration and deceleration delays 'off' using F8">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>

		<variable label="Enter the value corresponding to the desired lighting effect for B/A outputs (0-44) " CV="60"
			item="Lighting effects A/B" default="0"
			comment ="Range 0-44">
			<decVal min="0" max="44"/>
		</variable>

		<variable label="Toggle effect (outputs A/B) with F1" CV="61" mask="XXXXXXXV"
			tooltip="Toggle Lighting Effect for outputs A and B 'off' using F1">
			<enumVal> <enumChoice choice="No"/>	<enumChoice choice="Yes"/>	</enumVal>
		</variable>
		<variable label="Toggle effect (outputs A/B) with F2" CV="61" mask="XXXXXXVX"
			tooltip="Toggle Lighting Effect for outputs A and B 'off' using F2">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Toggle effect (outputs A/B) with F3" CV="61" mask="XXXXXVXX"
			tooltip="Toggle Lighting Effect for outputs A and B 'off' using F3">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Toggle effect (outputs A/B) with F4" CV="61" mask="XXXXVXXX"
			tooltip="Toggle Lighting Effect for outputs A and B 'off' using F4">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Toggle effect (outputs A/B) with F5" CV="61" mask="XXXVXXXX"
			tooltip="Toggle Lighting Effect for outputs A and B 'off' using F5">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Toggle effect (outputs A/B) with F6" CV="61" mask="XXVXXXXX"
			tooltip="Toggle Lighting Effect for outputs A and B 'off' using F6">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Toggle effect (outputs A/B) with F7" CV="61" mask="XVXXXXXX"
			tooltip="Toggle Lighting Effect for outputs A and B 'off' using F7">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Toggle effect (outputs A/B) with F8" CV="61" mask="VXXXXXXX"
			tooltip="Toggle Lighting Effect for outputs A and B 'off' using F8">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>

		<variable label="Enter the value corresponding to the desired lighting effect for D/C outputs (0-53) " CV="62"
			minOut="4" 
			item="Lighting effects C/D" default="0"
			comment ="Range 0-53">
			<decVal min="0" max="53"/>
		</variable>

		<variable label="Flashing frequency for outputs C and D (255 = .13 Hz, 32 = 1 Hz, 15 = 2 Hz, 0 = 33 Hz)" CV="63"
			minOut="4" 
			tooltip="Flashing rate, default = 1 sec, f= 1/(.03* 1 + value))"
			item="Function 3 options" default="32"
			comment ="Range 0-255">
			<decVal min="0" max="255"/>
		</variable>

		<variable label="Toggle effect (outputs C/D) with F1" CV="64" mask="XXXXXXXV" 
			minOut="4" 
			tooltip="Toggle Lighting Effect for outputs C and D 'off' using F1">
			<enumVal> <enumChoice choice="No"/>	<enumChoice choice="Yes"/>	</enumVal>
		</variable>
		<variable label="Toggle effect (outputs C/D) with F2" CV="64" mask="XXXXXXVX"
			minOut="4"  
			tooltip="Toggle Lighting Effect for outputs C and D 'off' using F2">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Toggle effect (outputs C/D) with F3" CV="64" mask="XXXXXVXX"
			minOut="4" 
			tooltip="Toggle Lighting Effect for outputs C and D 'off' using F3">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Toggle effect (outputs C/D) with F4" CV="64" mask="XXXXVXXX"
			minOut="4" 
			tooltip="Toggle Lighting Effect for outputs C and D 'off' using F4">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Toggle effect (outputs C/D) with F5" CV="64" mask="XXXVXXXX"
			minOut="4" 
			tooltip="Toggle Lighting Effect for outputs C and D 'off' using F5">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Toggle effect (outputs C/D) with F6" CV="64" mask="XXVXXXXX"
			minOut="4" 
			tooltip="Toggle Lighting Effect for outputs C and D 'off' using F6">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Toggle effect (outputs C/D) with F7" CV="64" mask="XVXXXXXX"
			minOut="4" 
			tooltip="Toggle Lighting Effect for outputs C and D 'off' using F7">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>
		<variable label="Toggle effect (outputs C/D) with F8" CV="64" mask="VXXXXXXX"
			minOut="4" 
			tooltip="Toggle Lighting Effect for outputs C and D 'off' using F8">
			<enumVal> <enumChoice choice="No"/> <enumChoice choice="Yes"/> </enumVal>
		</variable>

		<variable label="Speed Table" CV="67">
			<speedTableVal/>
		</variable>

		<variable label="Minimum PWM (Types 4, 5 only)" CV="113"
			item="Minimum PWM Value" default="40"
			comment="Range 0-255">
			<decVal min="0" max="255"/>
		</variable>

		<variable label="Duty Cycle (Types 4, 5 only)" CV="114"
			item="Motor Duty Cycle" default="10"
			comment="Range 0-255">
			<decVal min="0" max="255"/>
		</variable>

		<variable label="Decoder Software Version (read only): " CV="128" readOnly="yes"
			item="Decoder Software Version" default="5">
			<decVal/>
		</variable>
		
	</variables>

        <resets>
           <factReset label="Reset All CVs" CV="8" default="33"/>
        </resets>



</decoder>

<pane name="Lenz Function Map">
	<column>
		<row>
			<column>
				<label label=" "/>
				<label label=" "/>
				<label label="Select which function"/>
				<label label="disables momentum:"/>
				<label label=" "/>

				<display item="Disable momentum with F1" format="checkbox"/>
				<display item="Disable momentum with F2" format="checkbox"/>
				<display item="Disable momentum with F3" format="checkbox"/>
				<display item="Disable momentum with F4" format="checkbox"/>
				<display item="Disable momentum with F5" format="checkbox"/>
				<display item="Disable momentum with F6" format="checkbox"/>
				<display item="Disable momentum with F7" format="checkbox"/>
				<display item="Disable momentum with F8" format="checkbox"/>				
			</column>

			<column>
				<label label="        "/>
			</column>

			<column>
				<label label=" "/>
				<label label=" "/>
				<label label="Select which function"/>
				<label label="enables switching gear:"/>
				<label label=" "/>
				<display item="Enable Low Speed with F1" format="checkbox"/>
				<display item="Enable Low Speed with F2" format="checkbox"/>
				<display item="Enable Low Speed with F3" format="checkbox"/>
				<display item="Enable Low Speed with F4" format="checkbox"/>
				<display item="Enable Low Speed with F5" format="checkbox"/>
				<display item="Enable Low Speed with F6" format="checkbox"/>
				<display item="Enable Low Speed with F7" format="checkbox"/>
				<display item="Enable Low Speed with F8" format="checkbox"/>							
			</column>
		
			<column>
				<label label="        "/>
			</column>

			<column>
				<label label=" "/>
				<label label=" "/>
				<label label="Select which function enables"/>
				<label label="light dimming for A and B outputs:"/>
				<label label=" "/>
				<display item="Enable dimming with F1" format="checkbox"/>
				<display item="Enable dimming with F2" format="checkbox"/>
				<display item="Enable dimming with F3" format="checkbox"/>
				<display item="Enable dimming with F4" format="checkbox"/>
				<display item="Enable dimming with F5" format="checkbox"/>
				<display item="Enable dimming with F6" format="checkbox"/>
				<display item="Enable dimming with F7" format="checkbox"/>
				<display item="Enable dimming with F8" format="checkbox"/>							
			</column>
		</row>

		<row>				
			<column>				
				<label label=" "/>
				<label label=" "/>
				<label label="Select which function toggles"/>
				<label label="lighting effects on/off for outputs A and B:"/>
				<label label=" "/>

				<display item="Toggle effect (outputs A/B) with F1" format="checkbox"/>
				<display item="Toggle effect (outputs A/B) with F2" format="checkbox"/>
				<display item="Toggle effect (outputs A/B) with F3" format="checkbox"/>
				<display item="Toggle effect (outputs A/B) with F4" format="checkbox"/>
				<display item="Toggle effect (outputs A/B) with F5" format="checkbox"/>
				<display item="Toggle effect (outputs A/B) with F6" format="checkbox"/>
				<display item="Toggle effect (outputs A/B) with F7" format="checkbox"/>
				<display item="Toggle effect (outputs A/B) with F8" format="checkbox"/>
				<label label=" "/>				
			</column>

			<column>
				<label label="        "/>
			</column>

			<column>
				<label label=" "/>
				<label label=" "/>
				<label label="Select which function toggles" />
				<label label="lighting effects on/off for outputs C and D:"/>
				<label label=" "/>
				<display item="Toggle effect (outputs C/D) with F1" format="checkbox"/>
				<display item="Toggle effect (outputs C/D) with F2" format="checkbox"/>
				<display item="Toggle effect (outputs C/D) with F3" format="checkbox"/>
				<display item="Toggle effect (outputs C/D) with F4" format="checkbox"/>
				<display item="Toggle effect (outputs C/D) with F5" format="checkbox"/>
				<display item="Toggle effect (outputs C/D) with F6" format="checkbox"/>
				<display item="Toggle effect (outputs C/D) with F7" format="checkbox"/>
				<display item="Toggle effect (outputs C/D) with F8" format="checkbox"/>
				<label label=" "/>							
			</column>
		</row>
	</column>
</pane>

<pane name="Lenz">
	<column>
		<row>
			<column>
				<label label="Fault Indication"/>
				<display item="Light Short" />
				<display item="Overheating" />
				<display item="Motor Short" />
				<label label=" "/>
				<label label="Motor Configuration"/>
				<display item="Motor type" />
				<display item="EMF Switch" />
				<display item="BEMF Control" />
				<display item="Motor Frequency" />
				<display item="Minimum PWM Value" />
				<display item="Motor Duty Cycle" />
				<display item="Motor Timeout" />
				<label label=" "/>								
			</column>

			<column>
				<label label="           "/>
			</column>

			<column>
				<label label="Braking Configuration"/>
				<display item="Constant Braking" />
				<display item="Stop on DC" />
				<display item="Braking Distance" />
				<label label=" "/>
				<label label=" "/>
				<label label=" "/>
				<label label=" "/>
				<label label=" "/>
				<label label=" "/>
				<label label=" "/>
				<label label=" "/>
				<label label=" "/>
				<label label=" "/>
				<label label=" "/>											
			</column>
		</row>

		<row>	
			<column>
				<label label=" "/>
				<label label="Tip: Constant Braking only works when momementum is enabled, and when not in switching gear"/>
				<label label=" "/>
				<separator/>
				<label label=" "/>
		   		<display item="Decoder Software Version" />
			</column>
 		</row>
	</column>
</pane>

<pane name="Lenz Lighting">
	<column>
		<row>
			<column>
				<label label=" "/>
				<label label="The CV values on this page are unique in that each CV represents the lighting selection for two different outputs."/>
				<label label="The tens digit of the value corresponds to one output, and the ones digit corresponds to the other output."/>
				<label label=" "/>
				<separator/>
				<label label=" "/>
				<label label="Example:  A value of 23 below results in a Gyra light at output B and a strobe at output A."/>
				<label label=" "/>
				<separator/>
			</column>
		</row>

		<row>
			<column>
				<label label=" "/>
				<label label="The following lighting effects are"/>
				<label label="available for outputs A and B"/>
				<label label=" "/>
				<label label="No effect    "/>
				<label label="Mars light   "/>
				<label label="Gyra light   "/>
				<label label="Strobe       "/>
				<label label="Double Strobe"/>
				<label label=" "/>				
			</column>

			<column>
				<label label="        "/>
			</column>

			<column>
				<label label=" "/>
				<label label="Output B"/>
				<label label=" (Tens)"/>
				<label label=" "/>
				<label label="   0"/>
				<label label="   1"/>
				<label label="   2"/>
				<label label="   3"/>
				<label label="   4"/>
				<label label=" "/>					
			</column>
		
			<column>
				<label label="        "/>
			</column>

			<column>
				<label label=" "/>
				<label label="Output A"/>
				<label label=" (Ones)"/>
				<label label=" "/>
				<label label="   0"/>
				<label label="   1"/>
				<label label="   2"/>
				<label label="   3"/>
				<label label="   4"/>
				<label label=" "/>							
			</column>

			<column>
				<label label="                                                          "/>
			</column>
		</row>

		<row>	
			<column>
				<display item="Lighting effects A/B" />
				<label label=" "/>
				<separator/>
			</column>
		</row>

		<row>				
			<column>				
				<label label=" "/>
				<label label="The following lighting effects are"/>
				<label label="available for output D"/>
				<label label=" "/>
				<label label="No effect                      "/>
				<label label="Flashing with output C         "/>
				<label label="Flashing alternate to output C "/>
				<label label="Flickering type 2 (less smooth)"/>
				<label label="Flickering type 3 (excitedly)  "/>
				<label label="Dimming enabled                "/>
				<label label=" "/>
			</column>

			<column>
				<label label="        "/>
			</column>

			<column>
				<label label=" "/>
				<label label="Output D"/>
				<label label=" (Tens)"/>
				<label label=" "/>
				<label label="   0"/>
				<label label="   1"/>
				<label label="   2"/>
				<label label="   3"/>
				<label label="   4"/>
				<label label="   5"/>
				<label label=" "/>
			</column>
		
			<column>
				<label label="        "/>
			</column>

			<column>
				<label label=" "/>
				<label label="Output C"/>
				<label label=" (Ones)"/>
				<label label=" "/>
				<label label="   0"/>
				<label label="   1"/>
				<label label="   2"/>
				<label label="   3"/>
				<label label=" "/>
				<label label=" "/>
				<label label=" "/>
			</column>

			<column>
				<label label="        "/>
			</column>

			<column>				
				<label label=" "/>
				<label label="The following lighting effects are"/>
				<label label="available for output C"/>
				<label label=" "/>
				<label label="No effect                 "/>
				<label label="Flashing                  "/>
				<label label="Flickering type 1 (smooth)"/>
				<label label="Dimming enabled           "/>
				<label label=" "/>
				<label label=" "/>
				<label label=" "/>
			</column>
		</row>
	
		<row>	
			<column>
				<display item="Lighting effects C/D" />
				<label label=" "/>
			</column>
		</row>
	</column>
</pane>


</decoder-config>



