2008 NMRA Convention - Anaheim. California logo
national train show

RP-9.2.2 Configuration Variables

Active Topics under current investigation that potentially effect this RP in the future

This Recommended Practice provides a map and descriptions for Digital Decoder Configuration Variables.  Configuration Variables allow the decoder to be customized for each locomotive, or other mobile or stationary devices.  Unless otherwise specified, configuration Variables shall be stored in non-volatile memory and must not change when power is removed from the decoder over very extended periods of time. 

General Definitions

Tables 1 and 2 identify each of the Configuration Variables (CVs), along with additional information about each one. Following Table 1 is a written description of each of the CVs. In Tables 1 and 2 each Configuration Variable(CV) is identified by name and number, along with the following information:

Table 1   Configuration Variables

CV Name CV # Required Default Value Read Only Uniform
Spec
Dynamic (Volatile) Additional Comments

Multi-function Decoders:

 

 

 

 

 

 

 

Primary Address

1

M

3

 

Y

 

The default value for this Configuration Variable is 3, if the decoder is not installed in a locomotive or other unit when shipped from the manufacturer.

Vstart

2

R

 

 

 

 

 

Acceleration Rate

3

R

 

 

 

 

 

Deceleration Rate

4

R

 

 

 

 

 

Vhigh

5

O

 

 

 

 

 

Vmid

6

O

 

 

 

 

 

Manufacturer Version No.

7

M

 

 

 

 

Manufacturer defined version info

Manufactured ID

8

M

 

Y

Y

 

Values assigned by NMRA

Total PWM Period

9

O

 

 

 

 

 

EMF Feedback Cutout

10

O

 

 

 

 

 

Packet Time-Out Value

11

R

 

 

 

 

 

Power Source Conversion

12

O

 

 

Y

 

Values assigned by NMRA

Alternate Mode Function Status F1-F8

13

O

 

 

Y

 

 

Alternate Mode Fnc. Status FL,F9-F12

14

O

 

 

Y

 

 

Decoder Lock

15-16

O

 

 

 Y

 

Extended Address

17-18

O

 

 

Y

 

 

Consist Address

19

O

 

 

Y

 

 

 

20

-

 

 

 

 

Reserved by NMRA for future use

Consist Addr Active for F1-F8

21

O

 

 

Y

 

 

Consist Addr Active for FL-F9-F12

22

O

 

 

Y

 

 

Acceleration Adjustment

23

O

 

 

Y

 

 

Deceleration Adjustment

24

O

 

 

Y

 

 

Speed Table/Mid-range Cab Speed Step

25

O

 

 

Y

 

 

 

26

 

 

 

 

 

Reserved by NMRA for future use

Decoder Automatic Stopping Configuration

27

O

 

 

Y

 

Under re-evaluation - see details

Bi-Directional Communication Configuration

28

O

 

 

Y

 

Under re-evaluation - see details

Configuration Data #1

29

M[1]

 

 

Y

 

 

Error Information

30

O

 

 

Y

 

 

Index High Byte

31

O

 

 

Y

 

Primary index for CV 257-512 00000000 - 00001111 reserved by NMRA for future use

Index Low Byte

32

O

 

 

Y

 

Secondary index for CV257-512

Output Loc. FL(f), FL(r),  F1-F12

33-46

O

 

 

Y

 

 

 

 

 

 

 

 

 

 

Manufacturer Unique

47-64

O

 

 

 

 

Reserved for manufacturer use

Kick Start

65

O

 

 

 

 

 

Forward Trim

66

O

 

 

 

 

 

Speed Table

67-94

O

 

 

 

 

 

Reverse Trim

95

O

 

 

 

 

 

 

96-104

-

 

 

 

 

Reserved by NMRA for future use

User Identifier #1

105

O

 

 

 

 

Reserved for customer use

User Identifier #2

106

O

 

 

 

 

Reserved for customer use

 

107-111

-

 

 

 

 

Reserved by NMRA for future use

Manufacturer Unique

112-256

O

 

 

 

 

Reserved for manufacturer use

Indexed area

257-512

         

Indexed area - see CV#31, 32 Index values of 0-4095 reserved by NMRA

 

513-879

         

Reserved by NMRA for future use

 

880-891

 

 

 

 

Y

Reserved by NMRA for future use

Decoder Load

892

0

 

 

Y

Y

 

Dynamic Flags

893

0

 

 

Y

Y

 

Fuel/Coal

894

0

 

 

Y

Y

 

Water

895

0

 

 

Y

Y

 

SUSI Sound and Function Modules

896-1024

0

 

 

Y

 

See TN-9.2.3

General Definitions

Binary numerical quantities are stored such that the rightmost bit is the least significant, and the leftmost is the most significant.

 Configuration Variable   MSB |d07|d06|d05|d04|d03|d02|d01|d00|  LSB

Descriptions of Configuration Variables for Multi-Function Decoders

Configuration Variable 1                  Primary Address

Bits 0-6 contain an address with a value between 1 and 127.  Bit seven must have a value of "0". If the value of Configuration Variable #1 is "00000000" then the decoder will go out of NMRA digital mode and convert to the alternate power source as defined by Configuration Variable #12.  This setting will not effect the Digital Decoder's ability to respond to service mode packets (see RP 9.2.3).  The default value for this Configuration Variable is 3, if the decoder is not installed in a locomotive or other unit when shipped from the manufacturer.

 

Configuration Variable 2                  Vstart

Vstart is used to define the voltage drive level used as the start voltage on the motor.  The voltage drive levels shall correspond linearly to the voltage applied to the motor at speed step one, as a fraction of available rectified supply voltage. When the voltage drive level is equal to zero, there shall be zero voltage applied to the motor. When it is at maximum "11111111", the full available rectified voltage shall be applied.

 

Configuration Variable 3                  Acceleration Rate

Determines the decoder's acceleration rate.  The formula for the acceleration rate shall be equal to (the contents of CV#3*.896)/(number of speed steps in use).  For example, if the contents of CV#3 =2, then the acceleration is 0.064 sec/step for a decoder currently using 28 speed steps.  If the contents of this parameter equals "0" then there is no programmed momentum during acceleration.

Configuration Variable 4                  Deceleration Rate

Determines a decoders braking rate, in the same fashion as acceleration above (CV #3).

Configuration Variable 5                  Vhigh

Vhigh is used to specify the motor voltage drive levels at the maximum speed step.  This value shall be specified as a fraction of available rectified supply voltage.  When the contents of CV#5 equal "11111111", the full available rectified voltage shall be applied.  Values of "00000000" or "00000001" shall indicate that Vhigh is not used in the calculation of the speed table.

 

Configuration Variable  6                 Vmid

Vmid specifies the voltage drive level at the middle speed step.  Vmid is used to generate a performance curve in the decoder that translate speed step values into motor voltage drive levels and is specified as a fraction of available rectified supply voltage. Values of 00000000 or 00000001 shall indicate that Vmid is not used in the calculation of the speed table.

 

Configuration Variable 7                  Manufacturer Version Number

This is reserved for the manufacturer to store information regarding the version of the decoder.

 

Configuration Variable 8                  Manufacturer ID

CV8 shall contain the NMRA assigned id number of the manufacturer of this decoder. The currently assigned manufacturer ID codes are listed in Appendix A of this Recommended Practice. The use of a value not assigned by the NMRA shall immediately cause the decoder to not be in conformance to this RP.  The CV shall be implemented as a read-only value, which cannot be modified.

 

Configuration Variable 9                Total PWM Period

The value of CV#9 sets the nominal PWM period at the decoder output and therefore the frequency is proportional to the reciprocal of the value. The recommend formula for PWM period should be: PWM period (uS) =  (131 + MANTISSA x 4)x 2 EXP ,Where MANTISSA is in bits 0-4 bits of CV#9 (low order) and EXP is bits 5-7 for CV#9.  If the value programmed into CV-9 falls outside a decoder's capability, it is suggested (but not required) that the decoder "adjust" the value to the appropriate highest or lowest setting supported by the decoder.

Configuration Variable 10                EMF Feedback Cutout

Contains a value between 1 and 128 that indicates the speed step above which the back EMF motor control cuts off.  When 14 or 28 speed steps are used the LSB's of the value are truncated appropriately.

Configuration Variable 11                Packet time-out Value

Contains the maximum time period that the decoder will maintain its speed without receiving a valid packet addressed to it.  See RP 9.2.4 Section C for further information.

Configuration Variable 12                Power Source Conversion[2]

Contains the identity of the alternate power source to be converted to should CV #1 contain all zeros.  This is also the primary alternative power source selected should the decoder perform power source conversion. The currently assigned Power Source Conversion codes are listed in Appendix B of this Recommended Practice.

 

Configuration Variable 13                Alternate Mode Function Status

Indicates the status of each function (F1 through F8) when the unit is operating in alternate power mode, which cannot control the functions. If a function can be controlled, then the corresponding bit is ignored.  A value of  "0" indicates the function is off, while a value of "1" indicates the function is on. Bit 0 corresponds to F1, while Bit 7 corresponds to F8.

 

Configuration Variable 14                Alternate Mode Function 2 Status

Indicates the status of each function (F9 through F12, & FL) when the unit is operating in alternate power mode, which cannot control the functions. If a function can be controlled, then the corresponding bit is ignored.  A value of  "0" indicates the function is off, while a value of "1" indicates the function is on. FL in the forward direction is controlled by bit 0, FL in the reverse direction is controlled by bit 1.  Bit 2 corresponds to F9, while Bit 5 corresponds to F12.

Configuration Variables 15,16:       Decoder Lock  

The decoder lock is used to change CV's in only one of several decoders with the same short address (CV1) or long address (CV17 and CV18) that are installed in the same locomotive. Assign a number to CV16 in each decoder (i.e. 1 to motor decoder, 2 to sound decoder, 3 or higher to other decoders) before the decoders are installed in the locomotive. To change a value in another CVof one of the installed decoders, first write the number 1 (motor), 2 (sound) 3 or higher (other) into CV15, then send the new value to the CV to be changed. The decoders will compare CV15 to CV16 and, if the values are equal, the CV to be changed will be changed. If the values in CV15 and CV16 are different, the update will be ignored.

Configuration Variables 17,18:       Extended Address  

The Extended Address is the locomotives address when the decoder is set up for extended addressing (indicated by a value of "1" in bit location 5 of CV#29).  CV#17 contains the most significant bits of the two byte address and must have a value between 11000000 and 11100111, inclusive, in order for this two byte address to be valid. CV 18 contains the least significant bits of the address and may contain any value.

 

Configuration Variable 19                Consist Address

Contains a seven bit address in bit positions 0-6. Bit 7 indicates the relative direction of this unit within a consist, with a value of "0" indicating normal direction, and a value of "1" indicating a direction opposite the unit's normal direction. If the seven bit address in bits 0-6 is "0000000" the unit is not in a consist.

 

Configuration Variable 21                Consist Address Active for F1-F8 

Defines for functions F1-F8 whether the function is controlled by the consist address. For each Bit a value of "1" indicates that the function will respond to instructions addressed to the consist address.  A value of "0" indicates that the function will only respond to instructions addressed to the locomotive address.  F1 is indicated by bit 0.  F8 by bit 7. 

 

Configuration Variable 22                Consist Address Active for FL and F9-F12

Defines for function FL whether the function is controlled by the consist address.  For each Bit a value of "1" indicates that the function will respond to instructions addressed to the consist address.  A value of "0" indicates that the function will only respond to instructions addressed to the locomotive address.  FL in the forward direction is indicated by bit 0, FL in the reverse direction is controlled by bit 1.  Bit 2 corresponds to F9, while Bit 5 corresponds to F12.

 

Configuration Variable 23                 Acceleration Adjustment

This Configuration Variable contains additional  acceleration rate information that is to be added to or subtracted from the base value contained in Configuration Variable #3 using the formula  (the contents of CV#23*.896)/(number of speed steps in use).  This is a 7 bit value (bits 0-6) with bit 7 being reserved for a sign bit (0-add,1-subtract). In case of overflow the maximum acceleration rate shall be used. In case of underflow no acceleration shall be used. The expected use is for changing momentum to simulate differing train lengths/loads, most often when operating in a consist.

 

Configuration Variable 24                  Deceleration Adjustment

This Configuration Variable contains additional braking rate information that is to be added to or subtracted from the base value contained in Configuration Variable #4 using the formula (the contents of CV#24*.896)/(number of speed steps in use). This is a 7 bit value (bits 0-6) with bit 7 being reserved for a sign bit (0-add,1-subtract). In case of overflow the maximum deceleration rate shall be used. In case of underflow no deceleration shall be used. The expected use is for changing momentum to simulate differing train lengths/loads, most often when operating in a consist.

 

Configuration Variable 25                Speed Table/Mid Range Cab Speed Step

A value between 2 and 127 shall be used to indicate 1 of 126 factory preset speed tables.  A value of "00000010" indicates that the curve shall be linear. A value between 128 and 154 defines the 28-speed step  position (1-26) which will define where the mid range decoder speed value will be applied.  In 14-speed mode the decoder will utilize this value divided by two  If the value in this variable is outside the range, the default mid cab speed of 14 (for 28 speed mode or 7 for 14 speed mode) shall be used as the mid speed value.  Values of "00000000" or "00000001" shall indicate that this CV is not used in the calculation of the speed table.

Configuration Variable 27                Decoder Automatic Stopping Configuration

               Used to configure which actions will cause the decoder to automatically stop.

      Bit 0 = Enable/Disable Auto Stop in the presence of an asymmetrical DCC signal which is more positive on the right rail.

               "0" = Disabled   "1" = Enabled.

      Bit 1 =  Enable/Disable Auto Stop in the presence of an asymmetrical DCC signal which is more positive on the left rail.

              "0" = Disabled   "1" = Enabled.

      Bit 2 =  Enable/Disable Auto Stop in the presence of an Signal Controlled Influence cutout signal

.             "0" = Disabled   "1" = Enabled.

      Bit 3 = Reserved for Future Use

Bit 4 =  Enable/Disable Auto Stop in the presence of reverse polarity DC

              "0" = Disabled   "1" = Enabled.

      Bit 5 =  Enable/Disable Auto Stop in the presence forward polarity DC

.             "0" = Disabled   "1" = Enabled.

      Bits 6-7 = Reserved for future use.

 

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

 

Configuration Variable 28                Bi-Directional Communication Configuration

      Used to Configure decoder's Bi-Directional communication characteristics when CV29-Bit 3 is set

      Bit 0 = Enable/Disable Unsolicited Decoder Initiated Transmission

              "0" = Disabled   "1" = Enabled.

      Bit 1 = Enable/Disable Initiated Broadcast Transmission using Asymmetrical DCC Signal

              "0" = Disabled   "1" = Enabled.

Bit 2 = Enable/Disable Initiated Broadcast Transmission using Signal Controlled Influence Signal

          "0" = Disabled  "1" = Enabled

    Bits 3-5 = Reserved for future use.

Bits 6-7 =  Flag Bits, Reserved for future use

 

*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 it's default value).

 

Configuration Variable 29                Configurations Supported

Bit 0 = Locomotive Direction: "0" = normal, "1" = reversed.  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 RP-9.1.1 for more information.

Bit 1 = FL location:  "0" = bit 4 in Speed and Direction instructions control FL, "1" = bit 4 in function group one instruction controls FL. See RP-9.2.1 for more information.

Bit 2 = Power Source Conversion:  "0" = NMRA Digital Only, "1" = Power Source Conversion Enabled, See CV#12 for more information,

Bit 3 = Bi-Directional Communications:  "0" = Bi-Directional Communications disabled, "1" = Bi-Directional Communications enabled.  See RP-9.3.2 for more information.`

Bit 4 = Speed Table:  "0" = speed table set by configuration variables #2,#5, and #6,  "1" = Speed Table set by configuration variables #66-#95

Bit 5 = "0" = one byte addressing, "1" = two byte addressing (also known as extended addressing)  See RP 9.2.1 for more information.

Bit 6 = Reserved for future use

Bit 7 = Accessory Decoder: "0" = Multifunction Decoder, "1" = Accessory Decoder (see CV #541 for a description of assignments for bits 0-6)

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

Configuration Variable 30                ERROR Information

In the case where the decoder has an error condition this Configuration Variable shall contain the error condition as specified by the manufacturer. A value of "0" indicates that no error has occurred.

Configuration Variable 31                Index High Byte

Configuration Variable 32                Index Low Byte

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 and 11111111 inclusive. Values 00000000 thru 00001111 are reserved by the NMRA for future use (4096 indexed pages). 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 it's default value).
 

Configuration Variables 33-46        Output  Locations 1-14 for Functions FL(f), FL(r), and F1-F12

Contains a matrix indication of which function inputs control which Digital Decoder outputs.  This allows the user to customize which outputs are controlled by which input commands.  The outputs that Function FL(f)  controls are indicated in CV #33, FL(r) in CV#34, F1 in CV #35, to F12 in CV#46. A value of "1" in each bit location indicates that the function controls that output. This allows a single function to control multiple outputs, or the same output to be controlled by multiple functions. CVs 33-37 control outputs 1-8. CVs 38-42 control outputs 4-11 CVs 43-46 control outputs 7-14. The defaults is that FL(f) controls output 1, FL(r) controls output 2, F1 controls output 3 to F12 controls output 14. The lowest numbered output is in the LSB of the CV, as shown in the table below.

 

Table 2: Output Positions vs. CV (a "d" indicates the dafault position)

Output

CV

Description

msb

lsb

14

13

12

11

10

9

8

7

6

5

4

3

2

1

33

Forward Headlight FL(f)

d

34

Reverse Headlight FL(r)

d

35

Function 1

d

36

Function 2

d

37

Function 3

d

38

Function 4

d

39

Function 5

d

40

Function 6