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.

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
Selected
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 multiofunction 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

Configuration Register Bit Switches, Multifunction Decoder

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.

Using the NDOT to rectify an incorrectly wired motor is considered bad practice. NDOT is often used with consisting.

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), then bit 4 of the speed instruction controls the state of FL. This provides 14 discrete speed steps. If Bit 1 is set to a value of 1 (default value), the multifunction decoder will operate in 28/128 speed step mode. Read the Speed Steps article for more information.

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.

Also see Mode Change in Speed Steps article.

Alternate Power Source (Bit 2)

This defines an alternate power source. Very few decoders will support anything other than analog or NMRA Digital. When enabled, the multifunction decoder will only respond to a DCC signal.

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

Acknowledge (Bit 3)

This bit is used to activate Bidirectional Communications, such as RailCom. Normally this bit would not be used, and some online calculators for CV29 may not allow this bit to be set. If the decoder lacks this capability the bit would default to OFF and cannot be changed.

Speed Table Enable (Bit 4)

Enables the speed table in CV25

Extended Address Mode (Bit 5)

When set the Extended Address Mode is available.

Quick Reference Chart

Multifunction Decoder CV 29 Quick Reference DCCWiki.com
Function
Bit 7 Multifunction decoder, always reads "0". Accessory Decoders will have this bit set to "1".
Bit 6 Reserved for future use
Bit 5 EAM, Extended Address Mode enable, 0 = Primary Address in CV 1, 1 = Extended Address in CV 17/18.
Bit 4 STE, Speed Table Enable, 0 = values in CVs 2, 4 and 6, 1 = Custom table selected by CV 25 [1]
Bit 3 ACK, Advanced Acknowledge mode enabled if 1, disabled if 0 (Railcom)
Bit 2 APS, Alternate Power Source Enable, 0 = NMRA Digital only, 1 = Alternate power source set by CV12
Bit 1 FL (Forward Lamp) location: 0 = FL controlled by bit 4 of speed direction instruction (14 speed steps). 1 = FL controlled by bit 4 of function group 1 (28 and 128 speed step modes). If this switch is set to 1, the 28/128 speed step mode is active, 0 = 14 steps. [2]
Bit 0 DIR: 0 = normal, if set to 1 the direction bit in speed/direction instruction is inverted. 0 = NDOT Forward [3]

Share this page

Notes

  1. To use extended addresses (14 bit), 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. When the DIR bit is set, Locomotive and headlight (FL, Forward Lamp) will run in opposite direction, useful for long hood forward operation. This bit controls the NDOT (Normal Direction of Travel)
  3. With APS bit set, CV 12 must also be set to 1.

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).

CV29-AccDcdr.png


Accessory Decoder, CV29
Bit Purpose Description
0 Reserved for Future Use
1
2
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" [4]

Further Reading

NMRA/NMRA_Standards

Main article: NMRA/NMRA_Standards

Specifically S-9.2.1 and S-9.2.2

External Sites

Videos Regarding Programming

References

  1. "0" = speed table set by configuration variables #2, #5, and #6, "1" = Speed Table set by configuration variables #66-#95
  2. FL location: "0" = bit 4 in Speed and Direction instructions control FL, "1" = bit 4 in function group one instruction controls FL. See S-9.2.1 for more information
  3. This bit controls the locomotive's forward and backward direction in digital mode only. Directional sensitive functions, such as headlights (FL and FR), will also be reversed so that they line up with the locomotive’s new forward direction. See S–9.1.1 for more information.
  4. 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.