Train Configuration

The layout needs to know a lot of detail about each train.  More than you might first think! Eventually i will put a nice user-friendly screen together to make it easier to setup, but for now it's setup as a text file, old school!

There's an example configuration at the bottom of this post.  Here's the explanation:

  • Name.  Self explanatory!
  • ID.  This is the DCC ID of the loco.
  • Location & LocationCM & Backwards.  This is where the train considers to be home on the track.  Backwards denotes which direction it sits on the track.
  • Gaps.  This is the distance in CM between the coaches.
  • Colour.  This is a colour name, or HTML code, for the train to make it look different from the other rolling stock.  It's also used to colour code track where the blocks are locked.
  • MaxReverseSpeed.  This is a limit for reversing that's lower than it's allowable forward full speed.  I found that the HST For example which is only powered at one end, can't do full speed in reverse reliably.
  • SpeedMap.  This is where we map the DCC Speeds (from 1-126) to the speed in CM/Sec.   CM/Sec is my universal speed, and by having a speed mapping table I can ensure the software knows how fast the train is actually travelling.  The mappings are automatic multi-point mapping- to start with it just needs one mapping for 126, and then as you refine the speed you can put some more points in, at any speeds required.  The more effort here the better the results, you can see for this train i put in 9 of them which is  more than strictly necessary.
  • StopMap.  This is all about stopping distances.  You have to run the train at set speeds (measured in CM/Sec) and then press 'Idle' to set speed to zero.  Then measure the distance it takes to stop with a tape measure.  This can be done at a number of different speeds to ensure it's well calibrated.  This is actually the most CRITICAL setting for the whole train - to stop it overrunning points and speed limits.
  • Acceleration.  This is how long the train takes to accelerate a single speed point (i.e. from 1 to 2 cm/sec).  This is a bit rudimentary and i just set it to a rough number.  It's not too important.
  • Functions.  These are the DCC sounds and light functions.  They have to be named consistently and then they will be automated.  Lights are always on, Engine always started, Horn is blown before tunnels, etc.
  • Units.  These are the locos and coaches.  Here we have an HST with a driving car, 6 coaches and a dummy trailer.  The lengths are important for these so it knows how they sit on track and how far behind the lead loco needs to remain locked.

[train]
name=Virgin
id=5
location=Top Station Platform 1
locationcm=10
backwards=1
gaps=1.5
colour=red
maxreversespeed=60

speedmap=6=1
speedmap=12=3
speedmap=30=10
speedmap=40=17
speedmap=50=26
speedmap=60=38
speedmap=70=51
speedmap=90=84
speedmap=126=139

stopmap=20=15
stopmap=55=110
stopmap=85=380
stopmap=139=400

acceleration=0.05

[functions]
f0.toggle=Lights
f1.toggle=Engine
f2.moment=Horn     #High-Low
f3.moment=Horn 2   #Low-High
f4.moment=Brakes
f5.moment=Notch Up
f6.moment=Notch Down
f7.moment=Idle
f8.toggle=Thrash
f9.toggle=Cold Start
f10.toggle=Compressor
f11.moment=Cab Door
f12.toggle=Fan
f13.moment=Horn 3  #Long High
f14.moment=Horn 4  #Long Low
f15.toggle=Primer
f16.toggle=Flange Squeal
f17.moment=Safety Device
f18.moment=Horn 5  #Short Low
f19.moment=Horn 6  #Short High
f20.toggle=Windscreen Wipers
f21.moment=AWS Test
f22.moment=Fire Test
f23.moment=Guards Whistle
f24.moment=Guard To Driver

[unit]
length=23.5
width=3.5
powered=1

[unit]
length=30
width=3.5
repeat=6

[unit]
length=23.5
width=3.5
powered=0

Comments