Speed Steps

Speed steps can be thought of as how many notches there are between idle (stopped) and full speed. That is, as one turns the knob on a DCC throttle, how much control can one achieve. For example, with four speed steps (stopped, slow, medium, and full), there would not be any fine control. In this example, turn the knob and the train would lurch to its slowest speed. The next step up, it again lurches to its medium speed, then to full speed. This is unrealistic and does not allow fine control. Think of a lawnmower's throttle compared to a car. 
Most diesel locomotives have eight notches on their throttle. There may not be an increase in RPM when the throttle is moved from the idle stop to the first notch, but the locomotive can begin to move. 
Steam locomtives are different, the engineer controls not only the throttle valve in the boiler, but also the valve action at the cylinders. It would be the same as being able to control the valve lift and duration in a car's engine, to optimize the engine's operation under different loads and conditions. Opening the throttle admits steam into the steam chest, adjusting the cutoff (value action) controls the amount and duration of steam admission into the cylinder. Adjustments are continuously made to maintain speed or power while economizing on steam (and fuel) consumption by maximizing utilization of the energy released by the expanding steam. Even when the engine is drifting downhill, some steam is still admitted to the cylinders to cool them and provide lubrication. The reverser, which controls the valve motion, can also shift the valves to provide forward or reverse operation.
While steam and diesels have different approaches to the same issue, the number of speed steps determines the level of control afforded, just as the engineer has various controls available to him which determine how the locomotive will react. The engineer does not want to melt the traction motors when starting a heavy train.
=== Speed Step Choices ===
With DCC, there are three speed step choices: 14, 28, and 128. Lenz also had 27 and 55 speed steps that were a simulation of some kind - it is not covered in the NMRA Standards and RPs. It's unclear if they still offer these odd speed steps now that they offer 128 speed steps. 
The command station will calculate a value which is transmitted to the multifunction decoder within a vehicle. With the 14-step mode in use, each increment of the throttle is equal to 1/14th, or approximately 7% of full throttle.
Some multifunction decoders may internally use 1024, 2048 or even 4096 speed steps, using the CVs which control acceleration/deceleration to calculate the rate at which the internal steps are incremented/decremented for smoother motor control.
==== Available Modes ====
 The use of 14 or 28 speed step mode is determined by the setting of Bit 1 in CV29. The default is 28/128 speed step mode. The use of 128 speed steps is determined by the command station. 
===== Fourteen Speed Steps =====
 The 14-speed step mode has been deprecated and is now optional. 
The 14-speed step mode has been retained for backward compatibility with older multifunction decoders. It requires one byte to transmit, within that byte is the status of the lights and direction of travel. It shares the same space with the 28-speed step mode. If a decoder which supports 14 speed step mode is controlled using 28 speed step packets, the headlight will toggle on and off for each throttle change. In this scenario, the bit that controls the headlight is now the Least Significant Bit of the speed value. 
If CV29 Bit 1 is set to 0, Bit 4 controls FL. In this mode there are 14 speed steps defined. When CV 29 Bit 1 is set to 0, bit 4 is used as an intermediate speed step.
See the table below. Bit 5 is defined as C.
===== Twenty-Eight Speed Steps (Mandatory) =====
The 28 speed steps also fit within one byte. This mode is required by the NMRA DCC Standards. This is controlled by CV29, Bit 2, FL Location, which defaults to a value of 1. If that bit is set to Zero the 14 Speed Step mode is enabled, the headlight controlled by bit 5 of the speed instruction. In this instance, the 14 speed step mode data occupies the same instruction space as the 28-step mode.
 When a multifunction decoder which supports 28–step mode only receives a 128–step speed command, loss of control occurs. The command station must be set for the correct speed step mode for that decoder. See the DCC System's instruction manual for setting the correct speed step parameters. 
Runaways caused by the mismatch between a multifunction decoder which only supports 28 speed steps and a DCC Packet with a 128 speed step instruction is explained by the data structure for the 128-speed step mode. That mode uses an Extended Format Packet. The sub instruction which activates the 128–speed step mode occupies the same data space used for speed values in 28-step mode.
====== Speed Step Structure for 28 Speed Steps ======
This table shows the structure for 28 step mode. Note how Bit C alternates between On and Off. This causes the headlight to switch state every time a change in throttle position is made when the command station is transmitting 28 steps to a 14-step decoder.
28 SPEED STEPS 	28 SPEED STEPS	28 SPEED STEPS	28 SPEED STEPS	28 SPEED STEPS	28 SPEED STEPS	28 SPEED STEPS	28 SPEED STEPS
DCCWIKI.COM 	DCCWIKI.COM 	DCCWIKI.COM 	DCCWIKI.COM 	DCCWIKI.COM 	DCCWIKI.COM 	DCCWIKI.COM 	DCCWIKI.COM
SPEED 	C S3 S2 S1 S0 	SPEED 	C S3 S2 S1 S0 	SPEED 	C S3 S2 S1 S0 	SPEED 	C S3 S2 S1 S0
STOPWith five bits, the maximum value is 31. Subtracting the four stop modes leaves 27 speed steps. Adding the Stop position gives 28 Speed Steps. Each discrete step represents 3.7% of full throttle.	00000 	5 	00100 	13 	01000 	21 	01100
STOP 	10000 	6 	10100 	14 	11000 	22 	11100
E-STOP 	00001 	7 	00101 	15 	01001 	23 	01101
E-STOP 	10001 	8 	10101 	16 	11001 	24 	11101
1 	00010 	9 	00110 	17 	01010 	25 	01110
2 	10010 	10 	10110 	18 	11010 	26 	11110
3 	00011 	11 	00111 	19 	01011 	27 	01111
4 	10011 	12 	10111 	20 	11011 	28 	11111
Table adapted from NMRA Standard S-9.2. Also refer to S-9.2.1.
===== One Hundred and Twenty-Eight Speed Steps (Optional) =====
This mode requires two bytes of data, unlike the other modes which use one byte. The first byte contains the Advanced Operation Command and the sub instruction for 128 step mode, the other contains the direction and speed value. S-9.2.1, section 2.3.2.1 
The optional NMRA 128 speed step mode is available for both multifunction decoders and command stations which support it. Both the decoder and the command station controlling it must support this feature. 
A compatible multifunction decoder switches to 128 speed step mode automatically at the track level when it receives a 128-speed step command from the command station. The decoder will revert to 28 speed step mode when it receives a command in that speed step format. Unlike 14 and 28 speed step commands, it does not need to pre-programmed to enable 128 speed step mode operation. It is always on, ready to be used at any time.
====== One Hundred and Twenty-Eight Steps is Really One Hundred and Twenty-Six Steps ======
The term "128 speed steps" is a bit of a misnomer. It should be called 126 speed step mode for consistency, much like the 14 and 28 speed steps are accurately called.
One would expect the maximum to be 127 since that is the largest value that can be encoded in the 7-bit binary field transmitted in a 128-step speed control packet. The lowest speed step (step 0) is Stop. The missing speed step (Step 1) is Emergency Stop (i.e. Stop NOW and ignore deceleration settings). So, your command station's speed steps 1 to 126 actually correspond to 2 to 127 as encoded in the DCC packet.Each speed step represents a 0.8% increase. There are 254 valid steps available, half in either direction. Bit 7 controls direction.
=== Comparison of Speed Step Modes ===
CV29 determines which mode is in use. Bit 1, FL, is by default set to 1, activating the 28/128 speed steep modes. To use 14 speed steps, the status of this bit must be changed.
Speed Step Comparison	Speed Step Comparison	Speed Step Comparison
Mode 	Instruction Byte One 	Instruction Byte Two
14 Speed Steps 	UUDCS3S2S1S0 	
28 Speed Steps 	01DCS3S2S1S0 	
128 Speed Steps 	CCCGGGGG 	D7D6D5D4D3D2D1D0
14 Step Mode:
# D = Direction, 0 = Reverse, 1= Forward 
# C = FL on/off
# S0 is the Least Significant Bit
# U indicates the purpose of this bit is Undefined, therefore it is present but not used.
28 Step Mode 
# Bits 6 and 7 are 01, indicating this data packet contains speed and direction. These replace the U bits in the 14-step mode. 
# D = Direction, 0 = Reverse, 1= Forward 
# C = Bit 5 is an additional intermediate speed bit.This causes the headlight flashing when decoder is in 14-step mode.
# S0 is the Least Significant Bit
## Take note of C and S3 – S0, which occupy the same space as the 128 Speed Step Control (GGGGG) below. 
## These bits are the reason for a runaway when a 128 step command is received by a multifunction decoder which only supports 28 steps.
128 Step Mode 
# CCC= 001, Advanced Operation Instruction
# GGGGG = 11111, 128 Speed Step Control
# D = Data Byte, D7 controls direction, D0 – 6 are the speed value
* 28/128 Speed Step Modes are active by default, see CV29.
=== Packet Structure ===
==== Baseline Packet ====
The NMRA DCC Standard structures the baseline packet as follows:
Speed and Direction Packet	Speed and Direction Packet	Speed and Direction Packet	Speed and Direction Packet
111111111111 0 	0AAAAAAA 0 	UUDCSSSS 0 	EEEEEEEE 1
Preamble 	Byte One 	Byte Two 	Error Correction
* Byte One is the Address Byte. Byte Two is the Instruction Byte.
* Byte Two can contain speed and direction instructions. Bits 0 – 3 (SSSS) are 4 bits for speed, bit 0 being the least significant bit. These provide 14 speed steps. 
* Bit 4, C, shall contain one additional speed bit, which may also be used to control the headlight for reasons of backwards compatibility. This bit is used to create 28 speed steps. 
* Bit 5 controls Direction. Bits 6 and 7 are 01, indicating the byte contains speed and direction instructions.
* U = Undefined
==== Packet Format for 28 Speed Steps ====
The 28-speed step mode uses one Instruction byte:
 01 D C SSS 
Where:
* 01 indicates this is a data byte with speed and direction indication.
* Bit 5, D, is the direction bit, 1 = Forward
* C, Bit 4, is an additional speed bit, also the least significant bit.
* S, Bits 0 – 3, are speed bits
Bits 0 – 3 indicate the speed as per S–9.2, if CV29 Bit 1 is equal to 1, Bit 4 is used as an intermediate speed step. If CV29 Bit 1 is set for 14 speed steps, Bit 4 is FL status.
==== Extended Packet Format ====
The Extended Packet Format is used for 128 speed steps:
 {Address Byte} 0 {Error Byte} 1
In this example the instruction Bytes are formatted as follows:
 D7D6D5D4D3D2D1D0 
Where:
* CCC=001 (Advanced Operation Instruction) and 
* GGGGG (Sub-instructions) = 11111 which activates the 128-speed step mode, of which 126 steps are available.
* The Second Instruction byte (D7 – D0) uses D7 to determine direction (1 = Forward) with Bits 0 – 6 indicating speed (MSB is bit 6).
* The value of U0000000 is Stop, and U0000001 Emergency Stop.
** In this situation, D7 is Undefined as there is no direction associated with the emergency stop command.
=== Mode Changes ===
It is possible to accidentally alter the speed step parameter in the command station. It may be a global change, or specific to one locomotive address. Should that happen, consult the manual for your system on how to set the default number of speed steps. Digitrax uses the term Status Editing for parameters related to a specific slot in the command station. Other manufacturers may have similar terms. 
==== Digitrax ====
Digitrax Status Codes	Digitrax Status Codes	Digitrax Status Codes	Digitrax Status Codes	Digitrax Status Codes	Digitrax Status Codes
First Digit 	First Digit 	First Digit 	Second Digit 	Second Digit 	Second Digit
Status 	Locomotive 	In Consist 	 	 	
New 	0 	 	0 	28 Speed Steps 	
Common 	1 	5 	2 	14 Speed Steps 	
Idle 	2 	 	3 	128 Speed Steps 	
In Use 	3 	7 	4 	28 Speed Steps 	FX/LXDigitrax FX and LX decoders: FX – function support; LX – additional motor control parameters with Advanced Consisting Enabled
 	 	 	7 	128 Speed Steps 	FX/LXDigitrax FX and LX decoders: FX – function support; LX – additional motor control parameters with Advanced Consisting Enabled
 	 	 	F 	128 Speed Steps 	FX/LX with Advanced Consisting Enabled and Top Locomotive in Consist
==== NCE ====
===== Power Cab =====
NCE's defaults to 28 speed steps, pressing a button on the cab/throttle changes the mode to 128 for all locomotives. Boosters added later to a Power Cab may store the mode used and restore those settings during power up. 
To set the speed steps, the 28/128/F12 button is used. Pressing this button displays the mode in use, and allows toggling between modes.Page 20, Power Cab Manual
===== Power Pro =====
The stores the selected speed step mode in the command station's memory for each locomotive, for up to 512 locomotive addresses.
To set the speed steps, the 28/128/F12 button is used.Pressing this button displays the mode in use, and allows toggling between modes.Page 28, Power Pro Manual
=== Troubleshooting ===
==== ESU LokSound 5 Multifunction Decoders ====
ESU uses CV49 for additional configuration options. Of note is Bit 4, which enables/disables automatic detection of the speed step mode in use. This was done to eliminate issues with mismatches between the modes used by the command station and that of the decoder. If disabled, set CV 29 Bit 1 for the appropriate mode.
</I> This feature does not work with Lenz Digital Plus V3.0. Select 28/128 mode in this instance.
===== How Auto Detect Works =====
A LokSound 5 Multifunction Decoder attempts to establish the correct speed step setting whenever it receives power, such as when track power is applied and the lights are switched on. This process requires the operator switch on the lights and turn the throttle until the lights are continuously lit.
Changing the speed step setting during operation requires an interruption of the power to the decoder for a short period to activate auto-detection.
For more information, see the LokSound 5 manual.
==== Fourteen Step Vs. Twenty-Eight Step ====
;Fourteen Speed Step Mode is OPTIONAL for a multifunction decoder. Few decoders still support this now obsolete mode. Twenty-Eight steps are mandatory.
Sending 28 step commands to a decoder which can only accept 14 results in the following:
:The headlight may alternate between on and off as the throttle is changed. It may be on, yet turns off when the throttle is changed to the next step. A change to CV29's Forward Lamp Location (Bit 1) may be required. A value of "0" means 14 Speed Step operation.
If a 28-step decoder receives packets in 14 step mode, the maximum speed will be limited to half. Turning the headlight on or off may also have a definite effect on the speed. 
For compatibility reasons, some decoders may not use the address byte to control the headlight operation. The headlight is controlled by a bit in the instruction byte instead, which will change with the throttle settings. This bit will alternate between On and Off as the throttle changes. 
See NMRA Std. S-9.2 for more details.
===== Speed Step Mis-match Demonstration =====
===== Issues Involving 128 Speed Step Mode =====
The 128-speed step mode is OPTIONAL. Most decoders support it, and will seamlessly switch between 28 and 128 step modes.
If a multifunction decoder does not support the 128-step mode, loss of control results. The command station needs to change to 14 or 28 speed step mode for that decoder, to format the digital packets correctly. A packet with 128 speed steps will have extra data which causes control issues for a 28 step only decoder.
=== Which Systems? ===
Some command control systems (previous to NMRA DCC) advertised forward and reverse speed steps combined - 128 speed steps would be 64 forward and 64 backward. But with DCC, when you're using the 128-speed step mode, there are 126 speed steps forward and 126 speed steps in reverseOne step is lost to Stop, and another is lost to the Emergency Stop.. The 14 and 28 speed step modes work in the same manner.
Almost all systems today support 14, 28, and 128 speed steps - simultaneously. Don't assume, check the Starter Sets List for more information. Some systems are still limited to 14 or 28 speed steps, not both at the same time. A few manufacturers still make decoders that operate only in 28 speed step mode - for those, it is necessary to edit this vehicle's settings in the command station. (See the instructions for the system.)
=== Which Mode is Better? ===
There have been discussions over the years as to whether 128 speed steps are necessary or not. The nay-sayers always say, "The real ones don't have 128 speed steps". These are not real trains, these are models. Like everything that gets scaled, all things can't be scaled exactly the same and still appear correct. With model railroad control, the smaller the scale the more speed steps needed to have good control. They also lack an exact replica of the control systems found on the prototypes.
It could be argued that those who disagreed had systems lacking 128 speed step capability. Being loyal to their system, those with systems lacking 128 speed steps would argue that 128 speed steps were unnecessary. However, those that had systems capable of 128 speed steps argued that mode is the greatest thing since sl__ (you get the idea).
It is possible with a large number of vehicle addresses in use, such as an operating session on a large layout, that the extra overhead required for sending 128 speed step commands may result in a lag between the thottle and the train responding. Whether or not that effect can or would be noticed is unknown. 
===Scale Matters===
As a general rule, the smaller the scale, the finer the speed control needed to achieve realistic switching and other operations. While 28 speed steps may be OK for G scale, 128 is more realistic for HO and N scales. Of course, if all you want to do is turn your trains on and watch them go, any amount of speed steps is fine.
== Further Reading ==
* DCC Packets
* Speed Table
* Kick Start
* Momentum: Explains the disconnect between the throttle and prime mover
* KB929: Speed Steps Explained - 14, 28, 128, Digitrax Knowledge base 
* Speed Steps And Locomotive Speed Explained, NCE 
Category:Multifunction Decoder Features