Configuration Variable/Indexed Configuration Variables

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

See the Video.

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

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. The result is a memeory space which can accomdate more than a million additional 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).
Refer to the decoder manufacturer's instructions when programming Indexed CVs as there can be differences in their implementation. The easiest method of programming is by using software such as JMRI DecoderPro or ESU's LokProgrammer.

Manufacturer Notes

  • QSI offered their own version of indexed CVs prior to their standardisation by the NMRA.
  • ESU's implementation followed the NMRA's S9.2.2 specifications;
  • Zimo also followed the NMRA specification.
  • Soundtraxx has implemented NMRA S9.2.2 for their Econami and Tsunami2 multifunction decoders, with a slight variation. They only publish the value for CV32, with CV31 having a fixed value of 16. In their manuals they denote an indexed CV in the form of 1.155, for example.
  • Multifunction decoders by Train Control Systems have implemented them in a more complex way, using CVs 201 – 204.

ESU was the first to correctly implement the Indexed CV in their decoders. Zimo soon followed. ESU uses a value of 16 in CV31, and CV32 can have a number of possible values, depending on the decoder. CV31 and 32 are the Index Registers.

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 within their decoder software to permit systems which are unable to access CVs greater than 255 to set CVs above that limit. See Programming_ESU_Decoders for more.

Soundtraxx multifunction decoders do not offer a similar workaround for this programming issue.

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:

Some multifunction decoders may exceed specified time allotments when processing indexed CV calculations. This could result in complications in the course of decoder programming with specific brands or models 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 NCE DCC System.

  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.

Further Reading

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