What are CVs & Functions in DCC?

Category : Articles

The DCC standard in model trains was established in the early 1990’s by the NMRA as basic standards for controlling model trains. Because this standard was established prior to major innovations in computers, the internet and wireless technologies, some aspects of DCC seem dated to the modern observer (particularly the method of communication between the loco and the controller). The aspects we are focusing on in this article (Functions and CVs) are as relevant and useful today as they were 25 years ago. This article is intended to serve as a primer to a basic understanding of what Functions and CVs are (and why they may confuse some users). We hope the article sheds a little light on the mystery.

FUNCTIONS

FUNCTONS (“Fcn” or “F”): Functions are features that your decoder is capable of which can be triggered by the press of a button. Simple examples of features are blowing the airhorn, ringing the bell, or turning the headlight on and off. Most modern decoders support 28 functions (although some support more).

SOURCE OF CONFUSION 1: The NMRA DCC standard is “loose” and “flexible” in that it allows different decoder companies to use Functions and CVs differently. So although almost all decoders agree that F(0) is the headlight, F(1) is the bell, F(2) is the long airhorn and F(3) is the short airhorn, the remaining 25 functions may vary from manufacturer to manufacturer. This “feature” of “flexibility” has allowed decoder manufacturers to innovate, but it has also muddied the perception among users about understanding functions.

Here are the standard FUNCTION defaults for some popular decoders:

SOURCE OF CONFUSION 2: Another thing that can be confusing about functions is that most decoders allow you to “Remap” function buttons. Although F(1) is usually the function for triggering the bell, your decoder may allow you to “Remap” F(1) and associate F(1) with playing the airhorn (or muting the sound in your decoder altogether). This feature can be beneficial for many things, but it also introduces a bit of confusion that functions “can be anything you want them to be”.

Because the DCC standard of functions are “flexible” and can be “remapped”, the typical handheld cab controller for DCC looks more like a calculator that a train controller.

SOURCE OF CONFUSION 3: Most decoders have additional colored wires that can be used to power additional lights (or other functionality). These wires are often called “FX”. FX1 is the headlight, FX2 is the backup light. If your decoder has more than 2 of the wires, the are referred to as FX3, FX4, FX5, FX6 etc. You may use Functions to trigger these lights. On SoundTraxx decoders, by default you can use Function(23) to trigger FX3. You can see the possible confusion in having F(23) trigger FX3: too many capital F’s. (Also many people use the abbreviation FXN for the word “function” – an unfortunate obfuscation).

Functions in DCC have 2 states: “on” and “off”. The first time you press the “Bell” button on a DCC cab controller, the controller sends and F(1)-ON command to the train (and the bell starts ringing). The next time you press the “Bell” button, the controller sends on F(1)-OFF command to the decoder (and the bell sound turns off). So the function buttons alternate the command being sent (on/off) and the function can be toggled on and off. This is how most functions operate in DCC. This takes us to…

SOURCE OF CONFUSION 4: The long airhorn (which is typically associated with F2 ) turns “on” the moment you press it and “off” the moment you release it. The short airhorn (F3) plays a short airhorn blast every time you press the button (so there is no concept of “toggling” the short airhorn on and off).

So although functions in general can be toggled on and off, our 3 favorite sounds (bell, long airhorn, short airhorn) each behave slightly differently.

This can be taken a step further with more complicated features. Many modern decoders offer “Dynamic Brakes” as a function. Dynamic brakes (in the real world) are applied in several steps. On some modern decoders you will press F4 (or F5) to trigger the Dynamic Brakes, and each time you press F4 you will get a different phase of Dynamic Brakes (1,2,3,4) before finally cycling back to Dynamic Brakes being “off”.

As you can see, functions in DCC can be a very simple concept (like triggering your horn or turning the bell sound on and off), but some aspects are confusing.

Functions in BlueRailDCC

In BlueRailDCC you trigger functions in your train by sliding out the function panel. This panel has 28 function buttons in 2 rows: 1-14 and 15-28. When you first connect to a train, the app will ask you to choose which decoder type you are using (SoundTraxx, TCS, ESU etc). If you have selected one of these popular decoders, the default function names will be listed on the buttons. The Function 1 button will say “Bell” on it. If you are using a decoder not listed, you can choose the default “128 CVs”, in which case the buttons will be labeled F1 – F28. If you slide the function panel further out, you can rename any function button and choose whether you want the button to “toggle” or “press-release”.

If you are using the BlueRailDCC without a decoder, the function panel will be empty (as there are no sound features to trigger).

CVs

Confusion about Functions pales in comparison to confusion about CVs. CVs are “configuration variables” which are a table of settings to customize features of your decoder. The CV table in your decoder resembles a 2 column spreadsheet with the CV number in the left column and the CV value in the right column. The “value” of the CV can generally be any value between 0 and 255 (although some CVs use a more limited range). The CV table contains 1024 rows.

As a typical example CV3 is used to control the acceleration rate of your loco. If you set CV3 to “0” your loco will take off as quickly as it can. If you set CV3 to a higher number (255 or below) then the train will behave as if it is pulling a heavy load and take off slowly.

Your decoder manufacturer will offer a userguide containing the CV table for your decoder. Some examples of typical things you may want to adjust in your loco using CVs include:

  • acceleration/deceleration
  • master volume level
  • select preferred horn, bell, engine sounds
  • control volume level and reverb of individual sounds

Generally these are things you will tinker with once and never access again in your decoder. It is not uncommon for a modern decoder to have 200-300 controllable settings. This sounds pretty straight forward – so why do people consider CVs complicated? Does BlueRailDCC makes this easier? (yes)

SOURCE OF CONFUSION 1: The NMRA DCC standard is “loose” and “flexible” in that it allows different decoder companies to use CVs differently. A general list of the NMRA CV list can be found here:
https://www.nmra.org/sites/default/files/standards/sandrp/pdf/s-9.2.2_decoder_cvs_2012.07.pdf

CVs 1-46 and 65-112 are fairly uniform, but beyond that CV usage varies from decoder manufacturer to decoder manufacturer. Every decoder has a userguide which details the CV table for your decoder. To control the master volume on a SoundTraxx decoder you adjust CV128. On an ESU decoder master volume is CV63. Refer to your decoder userguide for specifics.

This is simplified in BlueRailDCC. Once you have selected your decoder type (SoundTraxx, ESU, TCS etc) the CV Settings page will display the appropriate table for your decoder. To access this from the train control screen (throttle) select the “settings cog” in the lower right. Then choose “CV settings” from the settings page.

With this much information, you should be able to use the BlueRailDCC app to run your train, trigger functions, and edit CVs. If you’d like to learn more about why CVs may be confusing and why BlueRailDCC makes life a little easier, read on…

SOURCE OF CONFUSION 2: The original DCC spec only allowed for 256 CVs, so adjustments needed to be made to accommodate more CVs. To allow for more CVs, DCC added the concept of “pages” (page1, page2, page3).

CVs 1-256 are reserved for the original CVs. This leaves CVs 257-1024 for each page of additional CVs. As an example, page1 CV257 is often written as 1.257. Page 1, 2 and 3 look like this:

  • page1 (257-1024) or 1.257-1.1024
  • page2 (257-1024) or 2.257-2.1024
  • page3 (257-1024) or 3.257-3.1024

Your decoder userguide will show these CV pages (if applicable) for your decoder.

As a bonus point of confusion, in order to change the values of a CV on any page (1,2,3, etc), DCC requires you to enter the page number into CV32 (1,2,3) as a first step. So to change the value of CV 1.257 to 99 you would set CV32 to “1” followed by setting CV257 to “99”.

When editing CVs 1-256 the “page number” will be ignored.

All issues regarding pages (and CV 32) is automatically handled in BlueRailDCC.

SOURCE OF CONFUSION 3: In the DCC standard, you are generally able to change (or “Write”) the value of any CV while the train is running on the rails, but if you want to “Read” the value of a CV, you need to remove the loco from the “main” and put it on a “programming track” where the decoder can be interrogated in “service mode”. This programming track operates on lower voltage, and you can only have one loco on the programming track at anytime. The decoder is not capable of explicitly telling you the value of any CV; instead the decoder can only make a single voltage pulse (known as an acknowledgment or “ack”) to answer “yes” to any question you ask it. As you know, CVs can have values up to 255 – which is 8 bits of information – like 10101010. It requires 8 “yes or no” questions (and 8 acknowledgments) to learn the value of any CV. This entire transaction can take 1-2 seconds to learn the value of 1 CV. As you can see, CV reads are relatively slow, and cannot be performed while the train is running.

BlueRailDCC simplifies this, in that the programming track is built into the board, so you don’t need to worry about having a programming track. The moment you try to read the value of any CV (in the CV settings page) your decoder will go into service mode, during which it cannot move or make sound – so you will probably want to have your train stopped when reading CVs.

You can “write” CVs while the train is moving – so you can change the master volume of the decoder by sliding the value of CV128 (Soundtraxx) or CV63 (ESU) while the train is running. But if you want to ask a decoder (ie “read”) the value of CV128 you will need to stop the train (or it will stop itself).

In BlueRailDCC you can read the value of any CV at anytime. The app also has a “Read All CVs” button. If you are using a modern recent decoder by SoundTraxx, TCS or ESU, we have pre-populated the CV pages with the common default values. So if your decoder is new (or has been factory reset) you may not need to read CVs at all – simply use the defaults in the “CV settings” page.

To “Read All CVs” in BlueRailDCC, open any CV section (ie CVs1-128) and press the “Read All CVs” button. The app will run through each CV in order and read each CV. This will take 1-2 seconds per CV, so this might be a 5 minute process in some cases.

Once the CV values have been loaded into the app (or if you are using the default values within the app) you generally won’t need to mess with “CV reads” any more.

NOTES ON TCS

Recent TCS decoders have a different approach to CVs. Instead of laying the CV settings out into Page1, Page2 and Page3 etc, TCS has 4 CVs which you edit in a particular order. So TCS does not have a master volume CV. All volume is managed using the 4 CV procedure. We have placed those 4 CVs at the top of the CV editing page for convenience within the BlueRail app (if you have selected TCS as your decoder type).

TCS also offers a “voice assistant” in recent decoders. To exit voice assistant you must press F(0). In BlueRailDCC use the headlight button for F(0) exit.

For more information on BlueRailDCC explore this website or consult the BlueRailDCC Userguide.