Decoder Programming

DCCWiki, a community DCC encyclopedia.
(Redirected from Programming Modes)
Jump to: navigation, search

Summary: In order for decoders to know what to do, you have to configure them. This applies to Multifunction, Function and Accessory Decoders. Decoder configuration is the action of entering suitable values into the configuration variables (CVs) in a DCC decoder to set their address, and other parameters so they operate with the characteristics you choose. You should check your owner's manual for complete descriptions on the configuration options available, and which programming methods it is compatible with.

Decoder Features

Movement & speed
Back EMF
Decoder-Assisted Consisting
High Frequency
Kick Start
Loco Momentum
Trim Adjust
Loco Momentum
MU Consisting
Speed Steps
Speed Table
Switching Speed
Three Step Speed Table

Forward/Reverse Trim


Decoder Reset
Programming Lock
User Identifier

Lighting & Effects
Directional Lights
Func Remap
FX Lighting
Master Switch

Thermal Protection

DCC Core components

Command Station
Power Supply

Track work components

Track wiring
Track work

Decoder Programming Overview

There are two primary Programming Modes: Service Mode and Operations Mode.

  • Service Mode = Global
    • Service Mode Programming requires a programming track which is isolated electrically from the rest of the layout.
    • Service Mode does not use a decoder's address, therefore its instructions are acted on globally by all decoders on the track. Service mode can be used accidentally, programming every decoder on the layout.
    • If the booster lacks a separate pair of connections for a programming track, both modes are present on the track. Boosters equipped with a programming track output should not transmit service mode packets to the track, this mode should activate the program track connections.
    • Service Mode is also known as Broadcast Programming Mode
  • Operations Mode (OPS Mode) = Addressed
    • OPS Mode can occur anywhere on the layout since the programming instructions are directed to a specific decoder's address. This method is sometimes referred to as Programming on the Main or POM.

As can be expected, all new vehicles equipped with a decoder must be programmed using Service Mode on the programming track. They don't have an address yet (other than their default address)[1], which makes programming on the layout dangerous. (See the section on Service Mode.)

MTC21 Multifunction Decoder

Before programming, read the Address Range page for explanations about multifunction and accessory decoder address partitions.

Operations Mode may be used while a vehicle is in motion, allowing for adjustments to motor and sound parameters. While you may change the Primary Address in this mode, altering the Extended Address is not possible.

Most DCC systems support all methods of programming, some multifunction decoders do not support all methods due to limited resources (number of memory/features) available to the microcontroller.

A command station's software may limit access to CVs below 255. There may be additional steps required to program a CV greater than 255. Many multifunction decoders will not have this issue, but more advanced multifunction decoders may.

Service Mode Programming

Main article: Service Mode Programming

Service Mode Programming, also known as Broadcast Programming, occurs on a Programming Track that must be electrically isolated from your running track.


  1. Po: Operations Mode
  2. Program Track Modes
    1. Pd: Direct mode
    2. Pg: Paged mode
    3. Ph: Physical mode

Operations Mode

Operations Mode may be referred to as:

  1. Program on Main (POM)
  2. Ops Mode

This mode of programming is useful if you cannot program the locomotive's decoder on a programming track. Or adjusting CVs while the locomotive is in motion, such as tweaking sound operation or speed matching. It is also used when creating a Decoder Based Consist.

  1. For Ops Mode programming to work, the decoder must support this feature. Operations mode is based on the Direct Mode to provide quick programming capability.
  2. It is not possible to read the CVs in this mode.[2]

Operations Mode has two forms of instructions: The short and long form.

  • Short: This method is suited to set values which often change during train operation, such as acceleration/deceleration rates. This mode allows frequent and quick programming changes.
  • Long: Instructions allow almost any CV to be altered on the mainline. To accomplish this, the decoder must receive two of these commands without any intervening commands. As the long form takes more time to transmit, and two identical commands must be received by the decoder before any changes will occur, this mode is best suited to making permanent CV changes.[3]

Caution Regarding Operations Mode

While operations mode is safe to use, because the decoder is addressed and only that decoder will be altered, it is possible to make a mistake and alter the programming on all the decoders. When programming using Ops Mode, one must be very careful to always select the address. Failing to do so can result in the command station generating a Broadcast Packet (Address 0) instructing all decoders to perform a programming operation. This is sometimes referred to as Blast Mode.

Always select the address of the multifunction decoder you wish to program when using Operations Mode. Failure can result in all decoders on the layout being programmed. Never select 0 for the address as the result will be the same.

Operations Mode Programming occurs anywhere on the layout. With Operations Mode programming, the programmer directs programming commands only to the decoder address you selected. Some command stations may allow programming while the locomotive is in operation.

Operations Mode should not be used as an alternative to Service Mode programming for basic decoder setup. It can be useful for adjusting sound parameters while the vehicle is moving, or customizing the momentum characteristics of a switcher.

During Operations Mode, the following conditions apply:

  1. Full DCC Power is on the track.
    1. This mode should not be used to test a decoder installation as it will be damaged if incorrectly wired.
  2. CV read back is not possible.
  3. Two identical packets are required before the decoder will act. If one of the packets is corrupted nothing will happen.

You should not attempt to change the decoder to an Extended Address in this mode. (See Below). [4]

Blind Writes

Many DCC systems perform a blind write to the decoder in this mode. The system will respond indicating the write was successful, even if it failed.

Changing an Address in Operations Mode

Changing an address using Operations Mode is fraught with problems.[4]

While it is possible to set an extended address using Ops Mode, it is advisable not to attempt it.

If the current active address is an Extended (two byte) Address, any attempt to change the address will fail.

An Extended Address is stored across two CVs (CV17 and CV18) and that specific address directs Operations Mode commands to the correct locomotive. When the first CV (CV17) is altered, the extended address is now a new, unexpected result (until CV18 is changed) while the original address is employed to change the value in CV18. Therefore, the instruction fails.

This method relies on precise timing, and any interruptions/delays to the process will result in a corrupted address value. Some multifunction decoders will not allow setting or changing an address in Operations (Program on the Main) Mode. The best way to change addresses is your Program Track. Using Operations Mode, it can only change the non-active address safely.

JMRI Error Codes

Main article: JMRI/Error Codes

A basic list of error codes you may encounter when using JMRI


This is a device designed for NCE's Power Cab. It has one input from the Power Cab and two outputs, one to the track, the other to an isolated programming track. When the Power Cab is switched to programming mode, the service mode packets received by the Auto-SW cause it to change the output from the track to the programming track. When exiting programming mode it reverts to the default state of DCC power to track.

This device can be used with other manufacturer's boosters which lack a programming track output.

A new decoder install should never be tested on full DCC Power!

Address Programming

While it is possible to set the Primary Address using Operations Mode, some decoders may not allow this. Soundtraxx DSD decoders require use of Service Mode to set all addresses (Primary and Extended). If a decoder will not accept a change to its Primary address, verify the mode required by referring to the instructions for that decoder.

Older DCC System Notes

Main article: Decoder Programming/Legacy DCC Notes

Further Reading

  1. Programming Track - Suggestions on using part of your running track as a programming track.
  2. DCC Software - Ways to program your decoders using software.
  3. Configuration Variable or CV
  4. BLI-1020
  5. Decoder Reset
  6. Decoder Lock
  7. Decoders
  8. Manufacturer ID


Basic Decoder Configuration Using JMRI

  1. While the default address for a multifunction decoder is specified by the NMRA Standard as a primary address equalling 3 (three), this rule does not apply to a vehicle with a multifunction decoder installed at the factory. This exception allows the manufacturer to set the default address to any valid address they wish.
  2. If you are using a Digitrax system with transponding detectors, it's possible to read back CVs from multifunction decoders.
  3. If there is any other DCC Packet traffic, corrupting the extended address CVs is a very real possiblity.
  4. 4.0 4.1 Writing an Extended Address is timing dependant and there is the possibility the decoder will have an unknown address as a result. Some decoders may not allow address changes in this mode. Using a Program Track is the safest method to changing addresses.