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!

Does DCC hardware repeat the most recent packet every 10 ms?

3099 views
8 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    October 2015
  • 188 posts
Does DCC hardware repeat the most recent packet every 10 ms?
Posted by passenger1955 on Saturday, April 15, 2017 12:36 AM

I am reading in the DCC documentation that the most recent DCC packet sent out gets repeated every 10 ms. I have a question about this. Is this only true for certain instructional packets? like speedstep and function packets? Or is this true for any packet (regardless)? For example, if the most recent packet was a reset packet, a page preset instruction, a direct write/verify, or a direct CV-bit manipulation - do these kinds of packets get repeated every 10 ms (if they are the most recent command)? Thank you.

  • Member since
    July 2009
  • From: lavale, md
  • 4,678 posts
Posted by gregc on Saturday, April 15, 2017 4:40 AM

considering that a DCC packet is ~5msec long, this could be true if there is only one active locomotiv e (see line 118 of S9.2).  

But this isn't possible if it needs to communicate with many active locomotive ( ten locos would require a minimum of ~50msec to send a packet to each loco).

not sure why you say "most recent DCC packet".   If the most recent is repeated, how can there me anything other than the one packet?

 

greg - Philadelphia & Reading / Reading

  • Member since
    October 2015
  • 188 posts
Posted by passenger1955 on Saturday, April 15, 2017 12:27 PM

I read this in 9.2:

"Packets sent to Digital Decoders should be repeated as frequently as possible, as a packet may have been lost due to 115 noise or poor electrical conductivity between wheels and rails."

For some reason I recall reading somewhere that they should be repeated every 10 ms.  So was under the impression that the last packet repeats every 10 ms (until there is a new command). Am I wrong about that?  Does the typical command hardware repeat packets? If so, is this typically every 10 ms? Does it repeat them x number of times? or until the next command?  Are the only packets that get repeated speed and function packets?  Thanks for any answers.

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Saturday, April 15, 2017 1:49 PM

 10ms is just not doable. Best you can do is send every current packet, then as soon as that is finished, start over again at the head of the packet memory. Your software may want to check for changes and prioritize the changes ahead of unchanged data for the best response, especially for things like hitting the horn button.

 There is a CV in the decoder which controls the packet timeout, but this is Recommended, not Mandatory and not all decoders have it - CV11. When used, this is the amount of time the decoder will maintain current speed without seeing a packet addressed to it.

                   --Randy

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    July 2009
  • From: lavale, md
  • 4,678 posts
Posted by gregc on Saturday, April 15, 2017 2:26 PM

passenger1955
"Packets sent to Digital Decoders should be repeated as frequently as possible, as a packet may have been lost due to 115 noise or poor electrical conductivity between wheels and rails."

"repeated as frequently as possible"  suggests that it never stops sending commands.   The number of active locos will determine the how frequent the command to a specific loco repeats.  

 

passenger1955
So was under the impression that the last packet repeats every 10 ms (until there is a new command).

A command station doesn't know if a packet is corrupted or if the loco lost power and is reset sitting stopped.

it sounds like you think the command station station only sends new commands  some limited number of times and then goes idle.

greg - Philadelphia & Reading / Reading

  • Member since
    October 2015
  • 188 posts
Posted by passenger1955 on Monday, April 17, 2017 7:32 PM

When you hit the F1 button on your NCE controller, does it send out a single F1  DCC packet? 5 copies of the F1 packet? 10 copies of the F1 packet?

  • Member since
    April 2012
  • From: Huron, SD
  • 1,016 posts
Posted by Bayfield Transfer Railway on Monday, April 17, 2017 7:43 PM

I expect it varies with the manufacturer.

Disclaimer:  This post may contain humor, sarcasm, and/or flatulence.

Michael Mornard

Bringing the North Woods to South Dakota!

  • Member since
    July 2009
  • From: lavale, md
  • 4,678 posts
Posted by gregc on Tuesday, April 18, 2017 6:45 AM

An NCE cab replies to a query from the command station which repeatedly queries or sends commands to each possible cab.

at least one type of response is two bytes: a button code or NoKeyPressed code (0x7d) and a speed byte.    See the NCE Cab Bus Communications Protocol.  So after it sends the latest button press it responds with NoKeyPressed in subsequent queries.

passenger1955
does it send out a single F1  DCC packet?

DCC applies to the signalling on the track to the locomotive.   The signalling between the command station and cabs (controllers) is proprietary.

greg - Philadelphia & Reading / Reading

  • Member since
    December 2004
  • From: Pa.
  • 3,361 posts
Posted by DigitalGriffin on Thursday, April 20, 2017 2:53 PM

They only send out the speed and direction for the loco in question over again and again.  If you will note sometimes our sound locos stutter and stop for a second causing a reset (dirty track) yet they pickup right where they left off.  That's because the speed and direction is being constantly broadcast.  Yet you might lose something light headlight on/off or bell.

Now as to the implementation of the repeat pattern, that is command station dependent.  The standard doesn't really say it has to be 10 ms later.  Just the next command is 10ms later.  It's equally valid to cycle through all the locos with their commands and then come back and repeat the speed and direction again.

 

Don - Specializing in layout DC->DCC conversions

Modeling C&O transition era and steel industries There's Nothing Like Big Steam!

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!