Configuration Variable/Configuration Register CV29

DCCWiki, a community DCC encyclopedia.
Jump to: navigation, search

Summary: Configuration Register 29, also known as Mode Control, enables or disables a number of multifunction or accessory decoder features using bitswitches.

Configuration Register 29

Referred to as CV 29 Share this page

CV29 controls a number of features on both Accessory and Multifunction Decoders. It does so using Bit Switches to activate features by setting a specified bit on or off.

For the purposes of this article, the term Enable means the bit has been set to a value of 1, or ON. To Disable a feature, the bit is set to 0 (zero, OFF).

Bit Switches

CV29 Default for Multifunction Decoders
Bit Position Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Value 27 26 25 24 23 22 21 20
Decimal Value 128 64 32 16 8 4 2 1
Default Binary Value 0 0 0 0 0 1 1 0
Result (Decimal) 0 0 0 0 0 4 2 0
Sum 6

Example: Extended Address Mode Enabled (Multifunction Decoder

CV29 Extended Address Mode Enabled, Multifunction Decoder
Bit Position Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Value 27 26 25 24 23 22 21 20
Decimal Value 128 64 32 16 8 4 2 1
Binary Value 0 0 1 0 0 1 1 0
Result (Decimal) 0 0 32 0 0 4 2 0
Sum 38
Sum, Hex $26

The Multifunction Decoder's default value for CV29 is 6 (Bits 1 and 2 are set to One/On), in both decimal and hexadecimal numbers. As shown in the examples, adding a value of $20 to the default value in CV29 by selecting bit 5 allows extended addresses. Subtracting $20 from the value in CV29 by deselecting bit 5 turns it off. In many cases this will be unneeded, as the command station software will set CV29 for a Primary or Extended address automatically.

Setting the Configuration Register

This is a more advanced subject, and is for information only. Other bits may need to be set manually.

Your DCC system may automatically set some bits, such as enabling the Extended Address Mode, when programming a multifunction decoder. Other bits may need to be set manually. For example, subtracting 4 from the default value will set the multifunction decoder for NMRA DCC operation only.

As CV29 has a large impact on multifunction decoder operation, it is not advisable to blindly write values to it. Many will tell you to "Write this value to CV29 and all will be well!" If you wish to alter this CV, first read the value in it, determine the changes needed, calculate the required value, then write that value. Making changes without regard for the current state of CV29 may lead to more problems than solutions.

Hint: Software such as JMRI can set CV29 to the correct values without any user calculations.

Multifunction Decoder

CV-29 Graphical Illustration of the Bit Switch Actions

Bit 7

This bit determines if the decoder is an Accessory Decoder when enabled, or a Multifunction Decoder when equal to 0.

Bit 6

Bit 6 is not used, as such it cannot contain any value. It is reserved for future applications

Extended Address Mode (Bit 5)

When enabled the Extended Address Mode is available.[1]

Speed Table Enable (Bit 4)

Enables the speed table in CV25, otherwise three point speed curve is used.[2]

Acknowledge (Bit 3)

This bit enables Bidirectional Communications, such as RailCom. Normally, this bit would not be used.[3] If the decoder lacks this capability the bit would default to OFF and cannot be changed.

Alternate Power Source (Bit 2)

When disabled, the multifunction decoder will only respond to a DCC signal. Few decoders support any modes other than analog or NMRA Digital (DCC).[4][5]

If the Primary Address is set to 0 (zero) the decoder will only respond to the mode selected in CV12. In most instances the result is a runaway locomotive.

FL Location (Bit 1)

This bit controls the location of the Forward Headlight instruction within the DCC Packet. If Bit 1 has a value of 0 (zero), bit 4 of the speed instruction controls the state of FL. This provides 14 discrete speed steps[6]. If Bit 1 is set to a value of 1 (its default value), the multifunction decoder will operate in 28/128 speed step mode. Read the Speed Steps article for more information.[7]

If the multifunction decoder is configured for 14 speed steps, and is operated using 28/128 speed steps, the headlight will toggle on or off with each throttle increment or decrement.

See Mode Change in Speed Steps article.

Normal Direction of Travel (Bit 0)

The Normal Direction of Travel establishes the forward direction of the locomotive. It also changes the behavior of FL. Use with caution. If the value in CV29 is an even value, NDOT has not be enabled. If odd, NDOT is enabled. To reverse the direction of the locomotive using NDOT, you just add or subtract 1, depending on the CV's value being even or odd.[8][9]

Accessory Decoders

Accessory decoders also use CV 29 for configuration purposes. As always, if the decoder does not support a feature contained in this table, it must not allow the corresponding bit to be set improperly (i.e. the bit should always contain its default value).


Accessory Decoder, CV29
Bit Purpose Description
0 Reserved for Future Use
3 Bi-Directional Communications If "0", Bi-Direction Communication is disabled. If "1", Enabled
4 Reserved for Future Use
5 Decoder Type "0" = Basic Accessory Decoder; "1" = Extended Accessory Decoder
6 Addressing Method "0" = Decoder Address; "1" = Output Address
7 Decoder Type Accessory Decoder = "1", Multifunction Decoder = "0" [10]

Further Reading


Main article: NMRA/NMRA_Standards

Specifically S-9.2.1 and S-9.2.2

External Sites

Videos Regarding Programming


  1. To Enable Extended addresses, Bit 5 is set to "1". When this bit is cleared (set to zero), the decoder reverts to the primary address in CV 1.
  2. Not all multifunction decoder support all three CVs.
  3. Some online calculators for CV29 may not allow this bit to be set.
  4. This bit is often used to disable DC/Analog operation, preventing runaways.
  5. With APS enabled, CV 12 determines the modes available.
  6. Fourteen Speed step mode is now obsolete, new multifunction decoders default to 28 speed step mode.
  7. A speed and direction instruction is used send information to motors connected to MultiFunction Digital Decoders. Instruction "010" indicates a Speed and Direction Instruction for reverse operation and instruction "011" indicates a Speed and Direction Instruction for forward operation. In these instructions the data is used to control speed with bits 0-3 being defined exactly as in S-9.2 Section B. If Bit 1 of CV 29 has a value of one (1), then bit 4 is used as an intermediate speed step, as defined in S-9.2, Section B. If Bit 1 of CV 29 has a value of zero (0), then bit 4 shall be used to control FL3. In this mode, Speed U0000 is stop, speed U0001 is emergency stop, speed U0010 is the first speed step and speed U1111 is full speed. This provides 14 discrete speed steps in each direction.
  8. Using the NDOT to rectify an incorrectly wired motor is considered bad practice. NDOT is often used with consisting.
  9. When the DIR bit is enabled Locomotive and headlight (FL, Forward Lamp) will run in the opposite direction, useful for long hood forward operation. This bit is the NDOT (Normal Direction of Travel)
  10. If bit 7 = 1, then the decoder may ignore the two most-significant bits of the CV number in Service Mode only. Using this feature CV513 becomes CV1, etc. Decoders which perform the translation must clearly document the feature in their manual.