DCC Programming tips

Online tools:

CV Calculators

Some help building up the decimal values from the bits in certain CV's

From Digitrax, a CV29 calculator, CV17 & 18 calculator, and some Digitrax specific CV's: http://www.digitrax.com/support/cv/calculators/

There is a general Hex <> Decimal callculator at the bottom of the page

 

Scale speed calculator:

A nice one from Stony Smith, works in all scales:  http://www.stonysmith.com/railroad/speedcalc.asp

First time setup

Here are some suggestions on setting up a loco:

Make sure your loco is broken in, and well lubricated. Run it for a while to stabilize it's operation.

First try to set up low speed response. Put the throttle in 128 speed step mode. Start the loco, then slow it down to the slowest speed it'll run at. This eliminates the effects of startup friction, and gives a good baseline speed.

Now DOUBLE the speed-step number that's on the cab, and put it in Vstart (CV2).

Now play with CV 2 to try to get the loco to just move at SS1, it may take some playing, but get it so that it moves at ss1, the slowest you can make it.

Some decoders have a "kickstart" setting, a little extra kick to get started, and sometimes it's 2 CV's, so if you have those you can play with them.

Go back to 28 ss moce, and set your loco on the track with one that's set up the way you like it. Consist them together, but leave them uncoupled a few feet apart. Run them up to full speed. Adjust CV5 (Vmax) in the new loco, then try again. Get them close.

If your decoders have CV6 (Vmid) try this at speed step 14. Adjust CV6 (Vmid) to get them close.

 

Programming locomotives with 2 decoders in them:

Some suggestions from Bruce Petrarca (Bruce, I hope you don't mind my quoting you from the NCE forum)


How to program a loco with 2 decoders in it:
Assume you are working with loco #1234.

Program the motor decoder for a 2 digit address of 34.
Program the sound decoder with a 2 digit address of 12.
Give both decoders 4 digit addresses of 1234, but set them to 2-digit mode (CV29 = 02, for example).

Then, program on the main with 34 as the top of the consist and 12 as the subordinate.

Adjust CVs for each decoder to fine tune the performance. When
happy with the performance, set each decoder CV29 = 34. Now the loco is on 4 digit addressing with both decoders.

If You want to fine tune later, use Ops mode (POM) program loco 1234 CV29 = 2. Now they are separate and you can repeat the fine
tuning, as above. When you are done, tell loco 12 to set CV29 = 34 and loco 34 to set CV29 = 34.

Basic lighting

I'll add some information about setting lighting modes here

Preventing runaways

A suggestion from many people is to set cv29 (DC mode) off, to prevent runaways.

I have found that newcomers might need this, but a runaway is often a result of DC on the rails or bad signal. I use the emergency stop button when needed.

Speed Matching

There are kind of 2 philosophies on speed matching:

  1. Pick the locos that will always run together and match them. Takes no special tools or setup, and just tweak them to work together.
  2. Calibrate locos to a standard.

 

The advantage of #1 is it takes less equipment and can be a little faster (sometimes)

The disadvantage of #1 is that you cannot mix and match locos whenever.

 

The advantage of #2 is you can consist ANY locos at any time

Another advantage is that you can calibrate them to a scale speed.

Another advantage is that it’s easy to add another loco to the fleet.

The disadvantage is that it takes a bit more equipment to set up and a bit more discipline to perform.

 

I use method #2 and I calibrate locos to run at scale speed, according to speed step, i.e. speed step 52 is 52 smph.

 

So, all locos will consist perfectly AND you always know the scale speed of the loco (on the flat of course, unloaded)

 

So, first you need to get a DCC meter and set your track voltage and make sure it stays the same. I use the RRAMPMETER from DCC specialties. If you do not do the speed calibration on the same voltage every time, then you won’t get them matched.

 

Next you need a speedometer to check the speed of the loco, I got mine from Dave Bodnar, in fact I have a wireless sending unit in a hopper car:

http://www.elmassian.com/index.php?option=com_content&view=article&id=136:speedometer-car&catid=15:rolling-stock&Itemid=155

 

The setup with the trackside sensors is fine, just have a small loop.

 

Now, set a loco to start at SS 1, CV2, to give about 1 smph… if you can’t do that, set CV2 for 2 smph at SS 2, etc.

 

Then set CV 5 to match what is probably the top speed of the loco, i.e. maybe 70 smph at SS 70, etc.

 

Normally this is good enough for all locos, remember that when they are connected and under load, they tend to equalize well, testing free running and not connected together is beyond what you need. This is a common misunderstanding, which seems logical, but it’s unnecessary to go that far.

 

In my case, sometimes I will use a custom speed curve for a loco, but it’s rare that it is needed.

 

Another reason for a custom speed curve is to “flatten” it above a certain setting. In Z scale, often locos can run 200 smph, and I make a curve that fixes that and stops at 100, i.e. SS 101 produces the same “voltage” as 100… I doubt you will run into this, the above steps are simple and work 99% of the time.

 

 

Misc notes

Some early notes on Tsunami programming, will update when I get mine! People are having some difficulty programming on the programming track. That is to be expected, will purchase the soundtraxx booster as they recommend.

All CVs can be adjusted using POM - Programming on the Main. Most DCC systems support POM.

"Out of the box" the Tsunami would come with short address "3". Run on this address and insert the values of CV 17 and 18 using POM that will have to be determined with a CV 17/18 calculator or other means. One such calculator is at: http://www.digitrax.com/support/cv/calculators/

Once CVs 17 and 18 have been programmed, adjust CV 29 so the decoder will respond to 4 digit addressing, example "34" (DC off, normal direction, internal speed table and 4 digit address).

Once "34" has been written to CV 29, the loco NOW will only respond to the long 4 digit address that was entered with CVs 17 and 18.

Chuff cams

SoundTraxx sells a chuff "disc" that goes on the backside of a steam loco driver and be stroked by a wiper. This allows you to synchronize steam chuffs to driver rotation

It's Soundtraxx part number 810038, MSRP $10, available from http://www.litchfieldstation.com/soundtraxx/html/dcc.html

Some people have had difficulties with installation and getting everything to work correctly.

An alternative are the cams and wipers made by Grizzly Mountain Engineering. http://www.grizzly-mountain.com/index.html
They can be purchased from Miniature Locomotive Backshop
http://members.aol.com/dccatmlb/intro.html

They are considerably more expensive than using the Soundtraxx discs, but much easier to install and get working properly.

The most common alternative is magnets and a reed switch, but with many G scale locos, there is a lot of side to side play in the drivers, so many people put the magnets on the tender wheels, which is a crummy solution in my opinion, since they are a different size than the drivers, and also will never exactly sync up with the travel extremes of the piston, where the chuff should occur. The BEMF chuff feature of the QSI shines here.

DCC testers

You can check the DCC waveform on the Power bus with the DCC Pocket Tester made by Pricom. http://www.pricom.com/Trains/DCCTester.html

(note: no longer available, but use the Internet Wayback machine for research in case you come across a used one)

This tester will analyze all your DCC packet information, It has a very handy page that shows at a glance the "health" of your layout with a PASS/FAIL result. Easy to understand.

One of the greatest features of this piece of test equipment is that it can be upgraded whenever the designer releases a firmware change, just by connecting the unit with the supplied cable to your computer and visit the Pricom site and follow the prompts to update your tester with the latest software.

Setting Sound Decoder levels

Here's a suggested method for setting up sound levels to make your loco sound more realistic, posted by Bruce Petrarca (Bruce, I hope you don't mind my posting this)

I set the loco to an idle and read the dB level. I activate the bell
and adjust its level until the reading is 3 dB more than the idle -
indicating that the idle and the bell are about the same level.

I turn off the bell and turn on the dynamic brakes. Again, I adjust
for 3 dB more than the idle.

I turn off the dynamic brakes and run the loco to top speed. I note
the sound level reading. The horn is adjusted to be 3 dB louder than
the prime mover at top speed. While this is less than the 10 dB or so I estimate reality to be, it gives a noticeable horn and fits within the dynamic range of the limited speakers we have available.

NCE - Programming on the main

Programming On the Main - POM allows all CVs to be adjusted while operating on the layout, i.e. while a loco is in operation, rather than putting on the program track. Remember though, you can only set CV's, you cannot read them. To read them back you need to use the programming track.

Adjusting CV2 to match locos in a consist and adjusting sound levels is another useful benefit.

POM address changes are easy. This is a benefit because many combination decoders cannot be programmed on the program track unless you have a booster. Remember, reading CVs is not necessary to program a decoder.

To change the address in POM does require you to alter CV29 so that the decoder responds to 4 digit address. Changing to operate on the long address can be done in a few ways.

Select POM and then select 1 - ADR. You are prompted to select 1 or 2 depending which address you want to change. Then just type the required address number. The C/S does the rest, programs the relevant values into CV 17 and 18 from the systems internal "converter" and adds the require BIT value change into CV 29. It is this easy.

On initial decoder installation/programming you are asked to enter your short and long addresses and the variables for CV 29 the CV for configuring the decoder - direction, DC on/off, speed tables and what address to respond to.

When on the main all you have to do to cycle between short and long address, is to POM, select 2 for CVs, type 29 and change the decimal value to 2 or 34. This will depend on how the decoder is set up in CV 29. Also see page 71 in old manual.

Easier still is selecting POM and selecting 3 - CFG. This will step you through the bits of CV 29 but in plain English requests, direction etc.

Remember if all locos on the layout have short address 3 and CV 29 is set up so that the decoder responds to the long address then when you run a loco out of the box that has 3 and is set up to respond to the short address, not all locos run, only the new one. This is the same for programming a loco with short address 3 with the required long address and then configuring CV 29.

Changing CVs 17 and 18 will require you to know the decimal values from a "calculator" if entering by option 2 - CVs with POM. There are other options that automatically provide the calculation - see above.


NCE - Consists and Momentum

This is not in the manual. If you want to give the consist momentum, then you must select the number of the lead engine, NOT the consist address. Then hitting the momentum button and selecting the momentum rate WILL work. Took 6 months of posting on the NCE forum to get this answer!

 

NMRA programming:

Section D covers how a decoder responds to a programming command - sending some sort of acknowledgment back to the programmer. There are two ways that this can happen: basic or advanced, and decoders are allowed to use either. We are most used to basic acknowledgment, which is the decoder raising its current draw by a load of at least 60ma for 6ms from the program track. Commonly, this is done by the decoder pulsing the motor, giving the traditional lurch seen when programming. These days, a few decoders on the market do it some other way and don't generate that familiar twitch, probably by turning on power to a resistance load on the decoder board rather than pulsing the motor. What isn't spelled out here, but is important, is that the basic acknowledgment is essentially "Yes" and is the only response the decoder can give. We'll reflect on that later. At the command station end, detecting the acknowledgment is essentially optional in the programmer.


Advanced acknowledgment is discussed in Standard S-9.3.2. Advanced acknowledgment is one of the functions of Bidirectional Communication, known by the commercial name Railcom, which that standard describes. At the time I write this article, S-9.3.2 is being revised.


Section D notes that the decoder should not acknowledge until it has successfully completed all its internal changes as requested by the command it was sent and that the programmer must wait for the acknowledgement for a specific amount of time, which is dependent on the command sent - even if the programmer then ignores the response.


Section E goes into the details of Service mode instructions, noting that there are four different methods - sub-modes, if you like - that may be supported. It also notes decoders must not  execute a service mode command unless and until it receives two consecutive identical packets, to ensure that rogue packets won't trigger unexpected CV changes.


Those four methods of programming are as follows:


• Address only. This is really a historical artifact these days - its only function is to update CV1, the decoder's short or primary address. It is noted here that this command has side effects, in that when used, the decoder should set CV19 (consist address) to zero and CV29 bit 5 also to zero, such that the new short address is then active.

• Physical Register mode. Again, this is a little-used historical artifact. Before the concept of Configuration Variables had really been invented, decoders had a small set of "registers'', and physical register programming was how these were manipulated. These registers correspond to the modern CVs 1, 2, 3, 4, 7, 8, and 29. Note that, like Address mode, long addresses have no support. Physical register mode fell out of favor as soon as more CVs than the origilnal seven were invented. There is one physical register reserved for Page mode.

 • Page mode. This is pretty much an extension of physical register mode to implement access to a larger number of Configuration Variables than was possible using just the 8 Physical Registers. It uses one of the registers, register 6, to hold an index value, which combined with 4 other register values gives access to 1024 CVs. Because of this, the sequences of commands
to the decoder are more complex than those for the other modes.

 • Direct mode gives access to 1024 CVs directly by their CV number. To addressCV1024 fequires a 10-bit CVnumber, so direct mode commands are longer - 4 bytes - than are those of the earlier methods. The maximum value of a 10-bit number is only 1023, but as there is no CV0, the 10 bits represent the CV under examination -1, or, if examining the command packet, decode the CV number from it and add 1. The extra instruction length also allows direct mode to access not just the whole CV as a single byte value, but also allows manipulation of individual bits. This has a significant advantage in decoder read speed, allowing individual bits to be changed without needing to know the other bit values in the CV. We'll discuss Direct mode operations
in more detail in a moment.

Note that in all cases, the last byte of the instruction is for error checking, so the instruction and data parts of the packet are two bytes, three in the case of direct mode.


Section F notes that while command station manufacturers are free to choose which of the four methods of programming they support, there is the exception that Direct mode must always be supported - a requirement that goes back to command stations made after 2002. Decoders must support Address-only mode. If they support CVs beyond those managed by Physical Register mode and were made after 2002, Direct mode must be supported, which basically means that all decoders must support Direct mode. Page mode is optional these days, but finding a decoder
that doesn't support it is rare. I advise you always to use Direct mode unless you have a specific reason not to.


Let me now offer a simple - if that is possible - explanation of how a command station programmer deals with a decoder. Because it's the universal programming method and the most versatile, I'm going to explain using Direct mode here.


There are a number of operation types that are used in service mode programming. Direct mode uses three. First is verify Byte. This is used to verify whether a particular CV contains a particular value.If it does, the decoder responds with an Acknowledge, as noted earlier. If it doesn't, the decoder stays mute. As I said before, when asked a question, the decoder can only say "Yes." So you can see that to find out if CV128 contains value 145, the programmer has to ask the decoder "does CV128 contain 0", followed by "does CV128 contain 255'', and then goes through values 1 to 254, until an acknowledge (Yes) occurs. That takes time - two or three seconds, possibly.


Next comes Write Byte, where the decoder is told to set the value of a given CV to an 8-bit value. Once the decoder has done that, it is expected to respond with an acknowledgment to say it's been done, and recall that I noted above that the acknowledgment must come after the decoder has completed an its internal work on storing the new value.


Lastly, there is a Bit Manipulation operation, which has two sub-operations: Verify and Write. Verify asks the decoder to tell whether a given bit contains 0 or 1 with an acknowledgment when the verify is correct. Write tells it to set the specified bit to either 0 or 1. It can be seen here that direct bit verify operations can check the value of a complete CV in just 16 operations - checking each of the 8 bits explicitly for 0 or 1 values. That means that in many cases, direct bit operations are much faster than direct byte operations and faster than page mode operations.

The standard also explains in Section E how a command station can verify that Direct mode is supported by attempting to verify whether bit 7 of CV8 contains either a 1 or a 0. If the decoder makes a correct response, then Direct mode is supported.


The entire sequence for a Direct mode operation is as follows:

1 . The command station powers on the program track, if required. That, in itself, requires that, once switched on, at least 20 packets are sent to allow the decoder time to power itself up and be ready to operate. These could be idle packets. At this time, the command station should be checking the decoder's power draw and marking an overcurrent fault if more than 250ma is
drawn after 100ms of starting to send those 20 packets. If such an overcurrent situation is detected, then the sequence should be terminated and an error returned to the end user.

2. The command station sends at least three decoder reset packets. These are not a hard-reset-to-factory-default. They just require the decoder to forget any volatile operating data, such as last speed step or direction, and return to its basic power-up state, ensuring the decoder status is always as expected before any programming operation.

3. At least five or more instructions, these are either Verify, Write, or Bit manipulation, are sent. If the command sent is verify or Bit-Verify, when an acknowledgment is detected, a decoder reset packet is sent. If the command is a Write, then the command station will send another 6 packets, either identical Writes or 6 reset packets. This is decoder recovery time to give the decoder time to do its internal store operations for the requested Write operation. Once the decoder has acknowledged, this sequence will stop. If, in either case, the decoder does not acknowledge, then the sequence stops after the command station has sent all the packets it is designed to send. It is open for the command station to send as many instruction packets as it likes, so long as the specified minimum is sent.

4. Optionally, the command station powers the program track off again.

There are similar but more complex sequences for each of the other modes (Page, Address only, and Physical register) , which you can review in the S-9.2.3 standard. If you'd like, you can check the sequences out with a packet analyzer, too!


The point of these defined sequences and acknowledgments is that any conforming decoder can be programmed by any conforming command station/programmer. The length of the sequences and all the command repetitions makes allowance for the fact that different decoders may take longer than others to perform an instruction, particularly a Write instruction. What
we, the hobbvists, want and need from all of this is robust and reliable ways to set up our decoders before we use them and that is what S-9.2.3 is all about.

 

Weather Underground PWS KCACARLS229