DCC address starting with a '0'?

Post all your DCC only problems, solutions and discoverys here.
User avatar
centenary
Posts: 1038
Joined: Thu Sep 03, 2009 3:08 pm

DCC address starting with a '0'?

Post by centenary »

I noticed in one of DCC Concepts many helpful documents that they said 'please do not start your loco's DCC address with a leading zero.' No explanation was given but the suggestion was having a DCC loco address starting with '0' wasnt a good idea.

My loco DCC numbering protocol is for diesel numbers to drop the 3rd digit if the loco has a 5 digit number ie 57302 on the chip is 5702.

For kettles that have a 5 digit number ie 42020, is to drop the first digit and have a DCC address of 2020.

This caused a problem with Scotsman 60103. If I stick to my numbering protocol, I'd have to number it 0103 which means the address starts with the leading zero!

Technically, I cannot see a problem why a leading zero should cause a problem because the '0' is stored on the chip as part of a loco address without problem in the 2nd, 3rd and 4th address slots, so, why would the 1st be any different?

What's the esteemed panel's opinion, does a DCC address with a leading zero cause problems within the decoder and should it be avoided? Currently, Scotsman is actuall.y adressed as 6003
aleopardstail
Posts: 1526
Joined: Thu Apr 29, 2021 9:48 pm
Contact:

Re: DCC address starting with a '0'?

Post by aleopardstail »

to a computer 103, 0103 & 00103 are the same value.

the "short" address is 1 to 127, actually a 7 bit digital value from 00000001 to 0FFFFFFF since its stored as 8 bits (128-255 are used for other things or reserved values)

some base stations and decoders limit to 1-99, with "0" being a special address decoders don't use

in effect there is no way to differentiate between a leading zero that is part of the address and a leading zero thats just indicating no value

same as why MS Excel has real issues with telephone numbers and has to store them as text to retain that leading zero.

the decoder could do that but your address goes from one 8 bit value (or one 16 bit for long addresses) to three 8 bit values to store up to 127 as text and up to five 8 bit values to store the long address as text. in practice each also needing a further 8 bit value thats always set to zero to mark the end of it.

in effect to the user you don't have address 1 to address 10,239, you have 00,001 to 10,239, its just convention is to drop the leading zeros and not show them
Bigmet
Posts: 11004
Joined: Tue Aug 14, 2007 2:19 pm

Re: DCC address starting with a '0'?

Post by Bigmet »

You are actually creating a problem in your thinking, due to the (doubtless well meant) advice. The BR steam loco numbers were created by adding 5 digit numbers to the previous owners numbering systems to create unique numbers thus:
add 30000 to SR locos,
add 40,000 to LMS,
add 60,000 to LNER.

I simply subtract the relevant number from the BR locos on my layout, thus my 60103, is addressed 103, 60008, is 8, and so on.
User avatar
Mountain
Posts: 6792
Joined: Mon Oct 24, 2016 3:43 pm
Location: UK.

Re: DCC address starting with a '0'?

Post by Mountain »

I have to say that had two routes to take. I had just over 100 locos (Think 117) at the time BUT I was not going to DCC them all (About 8 were Dublo 3 rail, and some were not DCC able anyway...

I had the Lenz system 01 with various extras such as extra set 02 handsets etc, and a Lenz Compact which only does 2 figure addresses, but can be used as a dlave handset to the set 01 system...

So I could do four figure addresses BUT like you, I was stuck when it came to conflicting numbers anyway!
Or I could keep to two figure addresses and add the Compact as a slave so in effect I had four handsets for up to four people to operate...

But one thing I noticed that thr Lenz set 01 could (If I remember) automatically pick up if it was a two or four figure address (Going by memory of the operating instructions)... And it could distinguish between 01 and 0001 if I recall. (I have not used it in ages or looked at the manuals, but I am sure it wasn't a problem)

But I had not thought of this senario... I am sure it wasn't an issue BUT I did not personally have that issue... The issue I had (As I was planning to use the Compact for H0e locos instead) was that using the B.R. TOPS codes, I had too many conflicting numbers when trying to shorten 5 figure numbers into 4 figure addresses.
If I used the first four or the last four numbers I had loads of conflicting numbers. BUT Ieven had this with omitting any of the other numners, as I had a fair few classes (E.g. 31's, 37's, 47's etc where I had in 37's and 47's up to 12 locos in each class) and no matter how I tried I could not find a solution... As renumbering some of them was an issue as they were also named locos as well!)

It was actually the last big task I remember trying to work out before circumstances meant I turned to 7mm narrow gauge instead, and I also abandoned DCC for both economy reasons and I REALLY missed DC!

(I liked both DCC and DC, but had I missed DC so much after going "All out" into DCC, that I decided not to use my spare decoders in 0-16.5 locos and have them DC instead.
Then 0-16.5 I quickly grew to love, and 00 I basicslly abandoned. Gave away my H0e items... So I never did get to re-examine the DCC numbering problem!)

So I can sympathize as to the DCC numbering issue. Think DCC should have allowed a six figure address so one merely enters in ones loco numbers putting a 0 in front of any four or five figures.... BUT as mentioned above.... Some systems may not like zeros in front? (Had not thought about this in the past... I am sure it was never even mentioned in my Lenz system handbooks).
Dad-1
Posts: 7837
Joined: Sun Aug 24, 2008 8:05 pm
Location: Dorset - A mile from West Bay.

Re: DCC address starting with a '0'?

Post by Dad-1 »

As my first & frequently used DCC systems only offered 2 number addresses
up to 59 I use 01 through to 09 and it makes no difference how I key it in.
If for my J94 I just key in 8, once recorded the system calls it 08 anyway.
I like simple systems, suits me. How do I cope with over 100 locomotives ?
I don't run diesels & kettles at the same time so duplication not a problem.

Geoff T.
User avatar
Mountain
Posts: 6792
Joined: Mon Oct 24, 2016 3:43 pm
Location: UK.

Re: DCC address starting with a '0'?

Post by Mountain »

I was also thinking about large clubs. Do they use four figure addresses and allocate each member 100 addresses? (Talking theory here).
aleopardstail
Posts: 1526
Joined: Thu Apr 29, 2021 9:48 pm
Contact:

Re: DCC address starting with a '0'?

Post by aleopardstail »

keep in mind so long as you know what numbers are being used the fact everyone has a loco #7 doesn't matter, just don't run those specific ones together

also keep in mind with a short programming track it is trivial to change the number and leave the rest alone

only time its really been a huge problem here, and by huge I mean trivial, is having a pair of class 86 locos, I went with "take the class, add a zero to the end then increment" so I ended up with 860 & 861, figured unlikely to have ten of them

currently beauty of modelling LNER, just use the number painted on the side and don't buy two identical models

think whoever came up with DCC initially figured "hardly anyone will use more than 127 locos at a time", and in the end had to go to the extended range as many wanted to use the painted number. guessing locomotive numbers higher than 9,999 are rare in the states and Germany
Bigmet
Posts: 11004
Joined: Tue Aug 14, 2007 2:19 pm

Re: DCC address starting with a '0'?

Post by Bigmet »

aleopardstail wrote: Tue Nov 19, 2024 2:28 pm ...think whoever came up with DCC initially figured "hardly anyone will use more than 127 locos at a time", and in the end had to go to the extended range as many wanted to use the painted number. guessing locomotive numbers higher than 9,999 are rare in the states and Germany
DCC as we know it is the NMRA's protocol, developed after a decade or so of investigation of digital control systems from various sources starting around 1980; and finally adoption of a system based on what Bernd Lenz of Lenz Elektronik GMBH had developed, originally for installed facilities management. (Some careful work was required to avoid infringing Lenz' patents, and the system that Marklin had already launched in Germany, for its 3 rail system.)

The Lenz technique was already in a proven operational state, and I suspect will have had addressing capability well exceeding what is offered in NMRA DCC; and it should be noted that Bernd Lenz effectively donated the relevant elements of his technique to the NMRA, in the interest of having an open standard system for the model railway application.

There must be a far wider range of 'digital control signal embedded on power' system protocols by now, the NMRA deserve credit for spotting the potential early enough and progessing to an open standard, which thus far is still broadly adopted. Otherwise we might have been in a situation where every brand that could afford it was pushing incompatible versions...
User avatar
Mountain
Posts: 6792
Joined: Mon Oct 24, 2016 3:43 pm
Location: UK.

Re: DCC address starting with a '0'?

Post by Mountain »

One thing I will say that if one is a GWR modeller, the four figure address couldn't be better!
User avatar
centenary
Posts: 1038
Joined: Thu Sep 03, 2009 3:08 pm

Re: DCC address starting with a '0'?

Post by centenary »

I settled on 4 digit addresses for a number of reasons. Consistency, ease of identification and to make it easier for SWMBO to select and run her kettles. She'd easily get confused if one had a DCC address of a single digit, another three and another two! She'd have one loco that would have a DCC address of '0' and another that was '3'!

So 4 digits it is. I appreciate no numbering system is without faults especially as NMRA has stuck with 4 digit maximum address.

I guess Im going to have to compromise and give Scotsman the number 6003!
Last edited by centenary on Tue Nov 19, 2024 11:28 pm, edited 1 time in total.
aleopardstail
Posts: 1526
Joined: Thu Apr 29, 2021 9:48 pm
Contact:

Re: DCC address starting with a '0'?

Post by aleopardstail »

comes down to how binary and decimal match up, a full 16 bit address is up to 65,535, so still not 0-99,999 so they capped it. 14 bits gives in theory 0-16,584, while 13 bit isn't enough to get to 0-9,999

14 bits gives them the upper two bits for other things. various systems support up to 9,999 some others go higher

keep in mind DCC goes back a bit and every bit (groan) mattered, these days a "very long" address using a 32 bit value would be possible but nothing supports or defines it - this would allow a full 0-99,999 range and still allow the upper bits to be used to identify classes, types, whatever

we are where we are
User avatar
SRman
Posts: 1271
Joined: Fri Oct 03, 2008 2:26 am

Re: DCC address starting with a '0'?

Post by SRman »

With the NCE systems, 1 - 127 are short addresses, 0000 - 9999 are long addresses. It allows (say) address 27 and 027 (or 0027) to be separately configured addresses, which is fine for the NCE system but might confuse some other systems.

In the above example, long address 027 would be marked with an asterisk on the handset screen.
User avatar
Bigglesof266
Posts: 1037
Joined: Tue Feb 10, 2009 9:59 am
Location: Australia

Re: DCC address starting with a '0'?

Post by Bigglesof266 »

Bigmet wrote: Tue Nov 19, 2024 1:09 pm
I simply subtract the relevant number from the BR locos on my layout, thus my 60103, is addressed 103, 60008, is 8, and so on.
I use the same protocol. Makes memory jogging the address assigned to any specific loco's decoder easy unless I have multiples of the exact same loco.

In the rare instance that occurs where I might have both on the layout at the same time necessitating an address departure from that protocol, I will have assigned a leading 2 to the address of the second model to differentiate them. So if entering one address doesn't work, the other will & I know it's model #2 even without checking my immediate to hand reference source outlined below. My failsafe is to refer to the address details affixed to the underside of the bogie or chassis.

Ordinarily I systematically make a stick-on placards at the time of fitting the decoder with details of the decoder model, version & date fitted. If sufficient room to fit a second, it denotes date run-in along with long and short addresses assigned for confirmation.

e.g. My Bachmann 32-052A Class 42 Warship D823 'Hermes. I just pulled it out of the display case where it lives when not on the track. On its underside stuck on the chassis out of sight when running I have two labels. The first annotated "Hornby Sapphire R8245. Fitted 30-09-2011". Then another "Run-in 30-09-2011 Address 823/23". In the case of the Warship, there was plenty of room.

On another model, my Hornby GWR Parcels Railcar I stuck them on the bogies. In hindsight, the chassis is preferred if room as there was in its case. Regardless, despite running and wheel bearing maintenance oil having soaked the original labels I assigned back in 2012 diminishing the contrast of the original black on white print to grey on translucent white, both are still perfectly legible, albeit these tired old eyes now needing direct light to read any of the latter so affected more typical on the chassis of steam locos. e.g. Bachmann 38-178DC Jubilee 45659 "Drake". Already DCC Fitted, I already knew which decoder was factory fitted & when, and so a single label sufficed in its case.

In general however, I have no need to refer to the label/s for an address should I forget it in not-every-day operation between swapping locos or rolling stockout on the layout. Insta-memory jog is printed on the sided of the loco. How I do it. OMMV.
User avatar
centenary
Posts: 1038
Joined: Thu Sep 03, 2009 3:08 pm

Re: DCC address starting with a '0'?

Post by centenary »

aleopardstail wrote: Tue Nov 19, 2024 8:16 pm comes down to how binary and decimal match up, a full 16 bit address is up to 65,535, so still not 0-99,999 so they capped it. 14 bits gives in theory 0-16,584, while 13 bit isn't enough to get to 0-9,999

14 bits gives them the upper two bits for other things. various systems support up to 9,999 some others go higher

keep in mind DCC goes back a bit and every bit (groan) mattered, these days a "very long" address using a 32 bit value would be possible but nothing supports or defines it - this would allow a full 0-99,999 range and still allow the upper bits to be used to identify classes, types, whatever

we are where we are
Cool. Just subscribed to your YT channel. Ive gone the easier (but more expensive route) with MegaPointController boards but admire your decision to go along with the configure it yourself boards.
aleopardstail
Posts: 1526
Joined: Thu Apr 29, 2021 9:48 pm
Contact:

Re: DCC address starting with a '0'?

Post by aleopardstail »

centenary wrote: Tue Nov 19, 2024 11:32 pm
aleopardstail wrote: Tue Nov 19, 2024 8:16 pm comes down to how binary and decimal match up, a full 16 bit address is up to 65,535, so still not 0-99,999 so they capped it. 14 bits gives in theory 0-16,584, while 13 bit isn't enough to get to 0-9,999

14 bits gives them the upper two bits for other things. various systems support up to 9,999 some others go higher

keep in mind DCC goes back a bit and every bit (groan) mattered, these days a "very long" address using a 32 bit value would be possible but nothing supports or defines it - this would allow a full 0-99,999 range and still allow the upper bits to be used to identify classes, types, whatever

we are where we are
Cool. Just subscribed to your YT channel. Ive gone the easier (but more expensive route) with MegaPointController boards but admire your decision to go along with the configure it yourself boards.
Cheers, the MegaPoints stuff is actually quite amazing, its where you end up if you take the stuff I'm fiddling with and think about how to make a product out of it

e.g. their servo controllers include the functionality to configure what I'm doing by changing the code for each board. I did have on Dingleberry a servo controller than handled configuration itself, indeed thats where the actual code driving the servos came from. thing had a socket to add both a screen and a touch pad controller to allow the limits, operating speeds etc to be changed. found it got used once when setting up and not touched again.

here I was going to add an EEPROM (indeed the breadboard version had it) to store settings then have another board to programme that chip but in the end with wifi its easy to change the code so I did that instead.

oh yes, and ta for the sub, up to 176 now :)
Post Reply