Trains.com

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

DCC Function keys while running a consist

8432 views
33 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    February 2007
  • From: Christiana, TN
  • 2,134 posts
Posted by CSX Robert on Monday, October 15, 2007 11:00 AM
 Don Z wrote:

...

I use an NCE system and when I create a consist, I don't have to change any CV values. The system takes care of modifying whatever CV's need to be changed so only the lead unit blows the whistle and has a headlight on, etc. Your system might require you to adjust each unit individually.

Don Z.

NCE does not automatically change CV21 and CV22. What NCE does is allow the user to designate a locomotive as the lead locomotive and it sends the function commands to the lead locomotive. In most situations, this is probably good enough, but there are many situations were the user will want more control over how the functions respond. If you have a consist of sound locomotives, you would want the headlight, horn and bell to only work on the lead unit, but you may want other sounds, such as the dynamic brakes and doppler effect, to work on all of the units. Using the lead locomotive feature of NCE, the other sound effects would not work on the other units. 

  • Member since
    January 2002
  • From: Portland, OR
  • 3,119 posts
Posted by jfugate on Friday, October 12, 2007 3:16 AM
 Falls Valley RR wrote:

I suffer Math Anxiety. The kind that disables and reduces a stout heart to a blubbering pile of wet fur mewing for mercy. I rather run Donner on ice than do math.

anyhow. Some of the links in this particular thread led me off to more CV's and more lists of Decoders and more, more and even more.

Has anyone thought to say for one second.. ENOUGH!?

Enough CVs already. We use what? 255 of them?

For the first time last night I pushed away from these decoder CV lists feeling as if there was one bottle of schnapps too many and have to take one more to straighten things out.

Even though I am a trained software developer who can do binary and hexadecimal in my sleep, I recommend people get a computer interface capable DCC system and use the free DecoderPro software available from the JMRI group.

With DecoderPro, you can program even complex sound decoders by pointing and clicking on sliders and radio buttons, just the way you'd like to do! No need to memorize CVs or do binary math. If you do want to see what's going on at the CV level you can, but you don't have to.

I find using DecoderPro lets me program a fleet of locos in a few minutes, even if the decoders are from various manufacturers. DecoderPro has a decoder discover feature that's pretty slick, but you need to put the loco on the programming track to use it. After that you can program on the main to your heart's content.

Once you use DecoderPro, you'll never go back to programming decoders using decoder manuals, juggling CVs, or making yourself cross-eyes with bit-fiddling binary math. Smile,Wink, & Grin [swg]

Joe Fugate Modeling the 1980s SP Siskiyou Line in southern Oregon

  • Member since
    April 2003
  • 305,205 posts
Posted by Anonymous on Thursday, October 11, 2007 3:22 PM
 Jake1210 wrote:
 Don Z wrote:

 dadret wrote:
Thanks for the information.  I understand the arithmetic but where did the table for the numeric values of the different bits come from?  I just spent a lot of time with the QSI manual and I can't find anything that resembles this.  Pages 44 and 45 of the manual show recommended values for CV21 and C22 but there are just binary numbers.  Is there another reference source I should be looking at?

The 8 bits have a predetermined value....they are:

 bit7   bit6  bit5  bit4  bit3  bit2  bit1  bit0
  F8     F7   F6    F5    F4   F3    F2    F1
 128 + 64 + 32 + 16 +  8 +  4 +  2 +  1 = 255

When you are adjusting the CV, you are simply 'turning on or off' the specific bit within the CV that you want to alter. That is represented by the example on page 44 of the manual. You add the numeric value for each bit that is turned on and that numeric value is what you enter into the CV value.

Does this help?

Don Z.

 

So if I'm getting what you are saying, each bit has a value double of the on preceding it, and half of the one after it? In other words, progressive doubling?

No.

 11111111 = 255

 11111110 = 254

 11111101 = 253

and so on.

What number do you think this one is?

 11000001

Take out your desktop calculator on your computer.

Open it up.

Set view to scientific.

Enter your number.. like 253

Change your value from Dec to BIN for BInary and it should come up properly. And vice versa.

Hex is for Hexdecimal and it is possible to jump among all three groups.

  • Member since
    August 2007
  • From: New Bedford, MA
  • 253 posts
Posted by Jake1210 on Thursday, October 11, 2007 2:30 PM
 Don Z wrote:

 dadret wrote:
Thanks for the information.  I understand the arithmetic but where did the table for the numeric values of the different bits come from?  I just spent a lot of time with the QSI manual and I can't find anything that resembles this.  Pages 44 and 45 of the manual show recommended values for CV21 and C22 but there are just binary numbers.  Is there another reference source I should be looking at?

The 8 bits have a predetermined value....they are:

 bit7   bit6  bit5  bit4  bit3  bit2  bit1  bit0
  F8     F7   F6    F5    F4   F3    F2    F1
 128 + 64 + 32 + 16 +  8 +  4 +  2 +  1 = 255

When you are adjusting the CV, you are simply 'turning on or off' the specific bit within the CV that you want to alter. That is represented by the example on page 44 of the manual. You add the numeric value for each bit that is turned on and that numeric value is what you enter into the CV value.

Does this help?

Don Z.

 

So if I'm getting what you are saying, each bit has a value double of the on preceding it, and half of the one after it? In other words, progressive doubling?

  • Member since
    April 2003
  • 305,205 posts
Posted by Anonymous on Thursday, October 11, 2007 2:10 PM

OIY!

And I suppose every single widget that is controlled by a decoder is going to be programmed by manufactor in 500 different languages excluding sanskrit and force us all to gather over tomes of CV's to ascertain which CV for a specific function is which when Mr New Train Buyer Esq. shows up with a CV question.

I think for some reason there was a great loss of control of each and every one of the 255 CV's involved. If we go as high as Function 28.... the situation will turn into a tower of Babel.

  • Member since
    December 2001
  • From: Trois-Rivieres Quebec Canada
  • 1,063 posts
Posted by jalajoie on Thursday, October 11, 2007 2:01 PM

And it's not over yet, what will we do when manufacturers start implementing the now NMRA 28 functions standard.

Jack W.

Jack W.

  • Member since
    April 2003
  • 305,205 posts
Posted by Anonymous on Thursday, October 11, 2007 1:55 PM

I suffer Math Anxiety. The kind that disables and reduces a stout heart to a blubbering pile of wet fur mewing for mercy. I rather run Donner on ice than do math.

anyhow. Some of the links in this particular thread led me off to more CV's and more lists of Decoders and more, more and even more.

Has anyone thought to say for one second.. ENOUGH!?

Enough CVs already. We use what? 255 of them?

For the first time last night I pushed away from these decoder CV lists feeling as if there was one bottle of schnapps too many and have to take one more to straighten things out.

  • Member since
    August 2005
  • From: Austin, TX
  • 1,752 posts
Posted by Don Z on Thursday, October 11, 2007 10:55 AM
 MisterBeasley wrote:

There are only 10 kinds of people in the world - those that understand binary arithmetic, and those that don't.  Laugh [(-D]

Laugh [(-D] After I read your response the 2nd time, I got it! Good one!

Don Z.

  • Member since
    December 2004
  • From: Bedford, MA, USA
  • 21,481 posts
Posted by MisterBeasley on Thursday, October 11, 2007 10:21 AM

There are only 10 kinds of people in the world - those that understand binary arithmetic, and those that don't.  Laugh [(-D]

 

It takes an iron man to play with a toy iron horse. 

  • Member since
    December 2001
  • From: Trois-Rivieres Quebec Canada
  • 1,063 posts
Posted by jalajoie on Thursday, October 11, 2007 8:58 AM
 Don Z wrote:

I use an NCE system and when I create a consist, I don't have to change any CV values. The system takes care of modifying whatever CV's need to be changed so only the lead unit blows the whistle and has a headlight on, etc. Your system might require you to adjust each unit individually.

Don Z.

I agree with you, NCE in my opinion has the best implementation of consisting locos. However I think it is an invaluable tool to know what goes on at the bit level of CV when problems arise.

Jack W. 

Jack W.

  • Member since
    December 2002
  • From: Overland Park, KS
  • 343 posts
Posted by dadret on Thursday, October 11, 2007 6:58 AM
The MRC system requires that you adjust each unit individually-apparently Lenz and NCE don't which is a nice feature.
  • Member since
    December 2002
  • From: Overland Park, KS
  • 343 posts
Posted by dadret on Wednesday, October 10, 2007 6:51 PM
You're right - I meant to say F9 and F10 enabled.  Thanks for the help.
  • Member since
    February 2007
  • From: Christiana, TN
  • 2,134 posts
Posted by CSX Robert on Wednesday, October 10, 2007 6:39 PM
dadret,

It looks like you've got it, except I think you meant to say F9 and F10 enabled instead of F8 and F10(F8 would have been taken care of by CV21). You are correct in that the value of each bit is always the same unless they are numbered incorrectly. I have seen them numbered bit1 - bit8, but again, this is incorrect and if you see them numbered this way just subtract 1 from each bit number.
  • Member since
    August 2005
  • From: Austin, TX
  • 1,752 posts
Posted by Don Z on Wednesday, October 10, 2007 5:48 PM

You have the 2nd half correct....the values given to each bit will always be the same....as far as changing CV's in your B units or extra motive power, I'm not sure.

I use an NCE system and when I create a consist, I don't have to change any CV values. The system takes care of modifying whatever CV's need to be changed so only the lead unit blows the whistle and has a headlight on, etc. Your system might require you to adjust each unit individually.

Don Z.

  • Member since
    December 2002
  • From: Overland Park, KS
  • 343 posts
Posted by dadret on Wednesday, October 10, 2007 5:29 PM
Just want to make sure I really understand this.  My lead or A unit should have a value of 255 for CV21 and 63 for CV22.  On the helper or B unit CV21 should be 252 (F1 Bell and F2 whistle disabled) and C22 would be 12 (only F8 and F10 enabled).  The numeric values of each bit are always the same, i.e. bit 7 will always be 128, bit 4 is always 16 etc, so the value of the CV is the sum of those bits which are turned on.  Please correct me if I'm wrong!!
  • Member since
    April 2003
  • 305,205 posts
Posted by Anonymous on Wednesday, October 10, 2007 3:56 PM

 dadret wrote:
My question is where do you find these predetermined values for the 8 bits?  I understand the principle, I just don't know where these values are coming from.

This is Binary.

A computer language that uses 0 for Off and 1 for On.

At it's simplest form, all computers can understand this. The IP Address of your computer talking to the internet has it's own set of numbers xxx.xxx.xxx.xxx which becomes 4 octects of binary numbers

 255.255.255.255 = 11111111.11111111.11111111.11111111

Believe it or not, we are moving from Groups of 4 octects to 6 octects with IP addressing in the xxx.xxx.xxx.xxx.xxx.xxx range!!!! Sorta like what happened to telephone numbers when cell phones started to exhaust numbers in various area codes.

It is possible to count from Zero, one, two, three all the way to infinity using Binary numbers expressed as Bits.

But you can only count up to 255 at a time.

Think of a CV number in your QSI decoder as a row of 8 switches on a control panel.

It is possible to set a CV by throwing some switches, all switches or none at all.

The way I see Binary goes all the way back to Morse Code and Telegraph and early shipboard wireless 100 years ago or more.

 

Now, I use a BLI ABBA unit, the B units have lights and whistle disabled and the rear A unit is lights, whistle disabled. I was wondering how I was going to set the Rear A unit to respond to changes in direction etc.

  • Member since
    December 2002
  • From: Overland Park, KS
  • 343 posts
Posted by dadret on Wednesday, October 10, 2007 3:42 PM

Thanks for the math lesson - I finally understand where the numbers come from.  I knew when I got into this hobby you had to be a carpenter, electrician, painter, and model builder - guess I need to add mathmatician.  Thanks again.

By the way, I just bought a PCM EMD F3 with the A&B lashed up and it completely eliminates the consist address problem as the two units run in a consist right out of the box (but of course thats the only way they run).

  • Member since
    August 2005
  • From: Austin, TX
  • 1,752 posts
Posted by Don Z on Wednesday, October 10, 2007 9:48 AM

Jack,

Thanks for the catch! I corrected my post.

Don Z.

  • Member since
    December 2001
  • From: Trois-Rivieres Quebec Canada
  • 1,063 posts
Posted by jalajoie on Wednesday, October 10, 2007 9:44 AM
 Don Z wrote:

 dadret wrote:
My question is where do you find these predetermined values for the 8 bits?  I understand the principle, I just don't know where these values are coming from.

Binary uses two digits, so each column is worth twice the one before. This fact, coupled with expanded notation, can be used convert between from binary to decimal. In the binary system, the columns are worth 1, 2, 4, 8, 16, 32, 64, 128, 256.

I hope this helps,

Don Z.

 

I will only add that in a byte bits are numbered 0 to 7 and from right to left.

such as Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0

I know of a French site that explain these mathematics, I presume an English one can be found on the net.

Jack W.

Jack W.

  • Member since
    August 2005
  • From: Austin, TX
  • 1,752 posts
Posted by Don Z on Wednesday, October 10, 2007 9:34 AM

 dadret wrote:
My question is where do you find these predetermined values for the 8 bits?  I understand the principle, I just don't know where these values are coming from.

Binary uses two digits, so each column is worth twice the one before. This fact, coupled with expanded notation, can be used convert between from binary to decimal. In the binary system, the columns are worth 256, 128, 64, 32, 16, 8, 4, 2, 1.

I hope this helps,

Don Z.

EDIT: I placed the values in the correct order. Sorry for any confusion.

  • Member since
    December 2001
  • From: Trois-Rivieres Quebec Canada
  • 1,063 posts
Posted by jalajoie on Wednesday, October 10, 2007 9:21 AM

 dadret wrote:
Thanks for the information.  I understand the arithmetic but where did the table for the numeric values of the different bits come from?  I just spent a lot of time with the QSI manual and I can't find anything that resembles this.  Pages 44 and 45 of the manual show recommended values for CV21 and C22 but there are just binary numbers.  Is there another reference source I should be looking at?

First, a value of CV21=255 and a value of CV22=63 is the default value on most decoders I am familiar with. Lenz does not document CV21 and CV22 therefore I don't know if they are supported. CSX Robert and Don Z. gave an easy to understand Binary to Decimal conversion math.

Here is an interesting NMRA link

http://www.nmra.com/standards/DCC/standards_rps/rp922.html#Configuration%20Variable%20General%20Definitions

The following are quote from that link.

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

Following CSX Robert and Don Z. math it is easy to understand a consist address must be between 1 and 127 or a short address. Except may be with Lenz whose range for short address is 1 to 100 if I am not mistaking.

Knowing that Bit 7 is reserved for the normal direction of travel. It is now clear that adding a value  of 128 to the consist address will reverse the normal direction of travel of that engine. This is use to run two engines back to back.

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.

end of quote.

Following CSX Robert example it becomes easy to tailor at will the behavior of your locos in the consist.

Another good link:

http://jmri.sourceforge.net/xml/XSLT/pages/decoderIndex.html 

Jack W.

Jack W.

  • Member since
    December 2002
  • From: Overland Park, KS
  • 343 posts
Posted by dadret on Wednesday, October 10, 2007 9:12 AM
My question is where do you find these predetermined values for the 8 bits?  I understand the principle, I just don't know where these values are coming from.
  • Member since
    August 2005
  • From: Austin, TX
  • 1,752 posts
Posted by Don Z on Wednesday, October 10, 2007 9:03 AM

 dadret wrote:
Thanks for the information.  I understand the arithmetic but where did the table for the numeric values of the different bits come from?  I just spent a lot of time with the QSI manual and I can't find anything that resembles this.  Pages 44 and 45 of the manual show recommended values for CV21 and C22 but there are just binary numbers.  Is there another reference source I should be looking at?

The 8 bits have a predetermined value....they are:

 bit7   bit6  bit5  bit4  bit3  bit2  bit1  bit0
  F8     F7   F6    F5    F4   F3    F2    F1
 128 + 64 + 32 + 16 +  8 +  4 +  2 +  1 = 255

When you are adjusting the CV, you are simply 'turning on or off' the specific bit within the CV that you want to alter. That is represented by the example on page 44 of the manual. You add the numeric value for each bit that is turned on and that numeric value is what you enter into the CV value.

Does this help?

Don Z.

  • Member since
    February 2007
  • From: Sweden
  • 52 posts
Posted by ami6 on Wednesday, October 10, 2007 8:51 AM
 MisterBeasley wrote:

My Lenz DCC system allows me to run a consist either under the consist address, or under the address of any engine in the consist.  Is this a common feature of other DCC systems, or is a Lenz feature only? 

Only Lenz, or at least not on possible Digitrax. With Digitrax you can only run an advanced consists from the consist adress.

Greetings from Sweden Bertil, Fan of the Fallen Flags modelling the midwest 1975-1985 (And a lot of other started projects)
  • Member since
    December 2002
  • From: Overland Park, KS
  • 343 posts
Posted by dadret on Wednesday, October 10, 2007 8:48 AM
Thanks for the information.  I understand the arithmetic but where did the table for the numeric values of the different bits come from?  I just spent a lot of time with the QSI manual and I can't find anything that resembles this.  Pages 44 and 45 of the manual show recommended values for CV21 and C22 but there are just binary numbers.  Is there another reference source I should be looking at?
  • Member since
    February 2007
  • From: Christiana, TN
  • 2,134 posts
Posted by CSX Robert on Wednesday, October 10, 2007 7:54 AM
 MisterBeasley wrote:
 jalajoie wrote:


A value of CV21=255 will put F1 to F8 under the control of the consist address.

A value of CV22=63 will put directional lighting along with F9 to F12 under the control of the consist address.

Jack W.



Does this have any effect when the engine is not in a consist?

...


No.



 dadret wrote:


With the MRC you add each loco number into a new consist number but none of the function keys work. Oddly enough my system would not accept a consist address which was the same first two digits as the original loco addresses - my loco addresses are 1671 and 1672 but when I tried to make a consist with an address of 167 it would not work so I changed the first digit and it works fine.

I got some info from another forum (BLI) that the values for CV21 and C22 are determined by adding together all of bit values for the particular CV but I can't get the numbers to come out 255 and 63 but as long as it works I guess thats all I need to know.


167 is not a valid consist address, the address can be 1 - 127.


CV21:
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
  F8   F7   F6   F5   F4   F3   F2   F1
 128 + 64 + 32 + 16 +  8 +  4 +  2 +  1 = 255

CV22:
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
   0    0  F12  F11  F10   F9  F0r  F0f
   0 +  0 + 32 + 16 +  8 +  4 +  2 +  1 = 63


You add the bit value for each function that you want to be activated by the consist address(bit0=1, bit1=2, bit2=4...bit7=128).

As an example, if you did not want F3 to be controlled by the consist address the value for CV21 would be:

bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
  F8   F7   F6   F5   F4   F3   F2   F1
 128 + 64 + 32 + 16 +  8 +  0 +  2 +  1 = 251


  • Member since
    December 2002
  • From: Overland Park, KS
  • 343 posts
Posted by dadret on Wednesday, October 10, 2007 7:04 AM

With the MRC you add each loco number into a new consist number but none of the function keys work.  Oddly enough my system would not accept a consist address which was the same first two digits as the original loco addresses - my loco addresses are 1671 and 1672 but when I tried to make a consist with an address of 167 it would not work so I changed the first digit and it works fine.

I got some info from another forum (BLI) that the values for CV21 and C22 are determined by adding together all of bit values for the particular CV but I can't get the numbers to come out 255 and 63 but as long as it works I guess thats all I need to know.

  • Member since
    July 2006
  • From: Colorful Colorado
  • 594 posts
Posted by Gandy Dancer on Tuesday, October 9, 2007 11:15 PM

 dadret wrote:
I programmed my BLI EMD F7 A&B units (DCC with QSI Sound) into a consist using the Advanced Consisting feature of my MRC Prodigy Advance.  The two units now run as one but I can't figure out how to make the function keys (F0-F12) respond when runnning the consist.
Interesting.  When I consist locomotives the system then automatically sends the function key signals only to the lead unit.  Even the headlamps of the center units get shut down. When I break the consist all the locomotives start acting independently to the function keys again.  I assumed all DCC brands of control units worked this same way.

But your mention of BLI just made me think of something.  A friend of mine told me that when he upgraded the chips in the QSI decoders they stopped MUing with other units.  They will MU with other QSI upgraded chip decoders but nothing else.   Don't know if this could be related to your problem or not.    

  • Member since
    December 2004
  • From: Bedford, MA, USA
  • 21,481 posts
Posted by MisterBeasley on Tuesday, October 9, 2007 10:56 PM
 jalajoie wrote:

A value of CV21=255 will put F1 to F8 under the control of the consist address.

A value of CV22=63 will put directional lighting along with F9 to F12 under the control of the consist address.

Jack W.

Does this have any effect when the engine is not in a consist?

Normally, I run my consists under the engine number of the lead engine.  My Lenz DCC system allows me to run a consist either under the consist address, or under the address of any engine in the consist.  Is this a common feature of other DCC systems, or is a Lenz feature only?  Since not all my engines have sound, I typically make the sound engine the lead and run from there, giving me control of all engines in the consist, plus the sound from the lead.

It takes an iron man to play with a toy iron horse. 

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

Users Online

There are no community member online

Search the Community

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
Model Railroader Newsletter See all
Sign up for our FREE e-newsletter and get model railroad news in your inbox!