Configuration Variable/Indexed Configuration Variables

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

The NMRA DCC Packet standard allows for more CVs than the 1-1024 limit specified. While many of those CVs are reserved, the standard anticipated the need for additional CVs beyond those specified in the standard.

NMRA Standard S9.2.2 defined the ranges 1-256 and 512-1024 as normal CVs. CVs between 257 to 511 are treated as Paged Index CVs, with the page numbers being stored in CVs 31 and 32, the index registers, or Master CV. This allows up to 65,536 additional pages in that range. NMRA Standard S9.2.2 defined the ranges 1-256 and 512-1024 as normal CVs. CVs between 257 to 511 are treated as Paged Index CVs, with the page numbers being stored in CVs 31 and 32, the index registers, or Master CV. This allows up to 65,536 additional pages in that range.

Main article: Configuration Variable/Indexed Configuration Variables

The NMRA Standard regarding Configuration Variables says:

  • Configuration Variable 31 Index High Byte
    • This is the page address
  • Configuration Variable 32 Index Low Byte
    • This is the secondary page address

The Indexed Address is the address of the indexed CV page when the decoder is set up for indexed CV operation. CV#31 contains the most significant bits of the two byte address and may have any value between 00010000 ($10) and 11111111 ($FF) inclusive. Values of 00000000 thru 00001111 ($0 to $F) are reserved by the NMRA for future use. (4096 indexed pages)

When writing Indexed CVs, CV31 only needs to be changed when the high byte changes. CV32 can be used repeatedly to write CVs to their appropriate page location. Think of it like a book where pages are numbered in the form of Chapter - Page, i.e.: Page 6-4

CV#32 contains the least significant bits of the index address and may contain any value. This gives a total of 61,440 indexed pages, each with 256 bytes of CV data available to manufacturers.

Note: If the decoder does not support a feature contained in this table, it shall not allow the corresponding bit to be set improperly (i.e. the bit should always contain its default value).

Manufacturer Notes

ESU was the first to correctly implement the Indexed CV in their decoders. Zimo soon followed.

SoundTraxx implemented a S9.2.2 style Indexed CVs method in the Econami and Tsunami 2 ranges. Their decoders use a fixed value of 16 in CV31. QSI created a non-standard indexing system with CV49 only, or CV49 and 50 as subindexes to CVs less than 257. TCS adopted a more complicated addressing scheme with CVs 201, 202, 203 & 204.

Indexed Configuration Variables


An Indexed Configuration Variable is a special version of the CV. They are used to group a number of functions together, simplifying access when additional related functions have been added over time to the decoder software. Often they are employed to configure sound effects, lighting or motor operation variables.

Indexed CVs allow the programmer to organize related programming functions under a Master CV. Access to the Master CV is only available through its Indexes. A Master CV can have two Indexes.

Identified as Primary and Secondary indexes, they are expressed as decimal places in the formula used to set them. They will appear as CV100.150.140, which means the Master CV is 100, the Primary Index is value is 150, and the Secondary Index is set to 140.

The rules are confusing. They are as follows:

  1. The Master CV holds broadly related functions, such as lighting effects or horn/whistle parameters.
  2. Only the Master CV is programmed to control a given function when using indexed CVs.
  3. The same Primary and Secondary indexes control access to the Master CV, regardless of which Master CV is being accessed.
  4. Values entered into the Primary and Secondary Indexes determine the function to be set in the Master CV.

The confusing part is that the Index values are entered in reverse order:

The Secondary Index Value, Primary Index Value, Master CV. So, as per the above example, it is entered as 140.150, then you can set the Master CV whatever value you wish. (The low byte is set to 140, the high byte to 150, then the master CV value is entered.)

Not all Indexed CVs will require a Secondary Index value.

In many cases, you don't need to re-enter the Primary and Secondary Index values if you want to alter the Master CV.

ESU uses a similar technique to allow systems which are not able to access CVs greater than 255 to set CVs above that limit. See Programming_ESU_Decoders for more.

Indexed CV Programming Issues

There may be some problems with programming when using Indexed CVs.

Command station software may have issues with CVs over 255, such as:

  • NCE's Power Pro firmware has a bug which causes the wrong CV to be written in Program Track mode for any CV above 256. Attempting to do so may corrupt the decoder's memory.
  • Both ESU and ZIMO provide decoder firmware based workaround solutions for this problem. See Programming_ESU_Decoders for details related to programming an ESU decoder.
  • Certain decoder brands may have problems processing indexed CV calculations inside the decoder within the timing specifications of the NMRA standards. This can potentially lead to issues with some brands of DCC systems.

Issues with Indexed CVs and NCE

According to the NCE Zendesk, CVs over 255 shall not be programmed using a 5 or 10A Power Pro, PH-Pro or CS02 system with the Pro Cab.

  1. Use the built-in serial interface and JMRI
  2. Program on the Main: Set CV 31 and 32 first
    1. Accessing a CV greater than 255 may require a different approach, depending on the actual decoder and the NCE DCC system you have. A software issue in the 5A PH-Pro prevents access to indexed CV using the program track. Programming on the Main has no issues.
      1. This does not apply to the Power Cab. There is more information on NCE's Zendesk.

Video about Indexed CVs

Indexed CVs were developed by the NMRA to make DCC systems comparable with the increasing number of CVs that manufacturers were using in their products