Jump to content

Speed Curves


Recommended Posts

Prompted by a recent post in another thread, I used MS Excel to look at the contents of the resource.mdb file which holds the loco settings for Railmaster. I did this by opening a new spreadsheet, clicking Data then Import External Data then Import Data and navigating to the resource.mdb file in the Railmaster folder. This gives a spreadsheet with a row for each of my locos.

 

There's a column with the CV settings, although this is only filled in for one of my locos so it presumably is empty when a loco is initially added and is only filled in if one reads the CVs from the loco using the programming track.

 

Two other columns are Factor (the speed factor) and Speed Curve. For my Duke of Gloucester TTS loco the default speed factor was 0.759 and my updated value used to get a correct scale speed is 0.856. The speed curve for the DoG, which I don't think can be changed in RM, contains the values

 

2.588,1.823,1.568,1.298,1.158,1.058,0.978,0.918,1.318,

 

Can anyone tell me what these numbers mean - presumably they tell RM what speed command to send to the loco at each of the standard speeds described in the Auto Profiling section of the RM manual (which needs RM Pro and the yet-to-be-delivered Loco Detection system). Interestingly the last number in the list above, 1.318, is larger than its predecessors - for my other two locos the speed curve numbers are strictly descending. I wonder if this is a bug in the DoG setup? I'm tempted to try updating the speed curve (after backing up resource.mdb!) to see if I can get a more linear speed progression - currently (with the CV150 motor algorithm set to 1) it crawls very smoothly at 5mph but races away as soon as the speed is increased even to 10mph.

 

Regards

 

John

Link to comment
Share on other sites

I haven't been able to update the speed curves in resource.mdb. Excel can read the database but not write it, and my version of Access (which is itself quite old, Office XP Professional) says that the database is for an even older version of Access and it can open in read-only mode but can't convert it. I tried creating a new database and importing the table into it, but RM won't read this. So I give up! It's a pity that RM doesn't seem to include a facility to edit the speed curves.

 

Regards, John

Link to comment
Share on other sites

Bb, RM is capable of changing all CVs supported by your decoder, noting that not all decoders support change of all CVs.  Basic decoders, the R8249 being an example, support the change of very few CVs.

 

I suggest you look at the specs for your decoders to see which CVs are supported, then read the Loco Setup section of the RM manual on changing CVs, including setting up Complex Speed Curves by switching on bit 4 of CV29.  You certainly won't find that the procedure for this is to edit resource.mdb which is just a record of your loco setups.

Link to comment
Share on other sites

Hi FM, many thanks for your response. You must excuse my ignorance - I'm just starting in all this, with a 'Majestic' train set and a DoG TTS, and just in the process of building my baseboards prior to expanding the layout.

 

I did rather assume that the speed curve and speed factor data in resource.mdb must be used by RM to translate the speed in mph selected on the screen to speed step numbers to be sent over the network to the DCC decoder in the loco - are you saying that they are merely a copy of data that's held in CVs in the decoder?

 

I'm afraid I don't have any documentation on the decoders fitted to the two locos in the Majestic set, and the TTS leaflet for the DoG doesn't mention bit 4 among the CV29 functions. I did set CV150 to 1 and this did cure the jerkiness at low speed.

 

Kind regards, John

Link to comment
Share on other sites

Guys, I think BritanniaBuilder is talking about something else and not decoder CVs or the optional speed curve CVs built into most decoders which can be switched on via CV29. In the Railmaster software it alludes to calculations it does in the software to convert from the mph throttle setting to the actual DCC speed step it sends to the loco thus removing the need to update the CVs in the decoder. It also talks about being able to do this calibration yourself once LD is available. I think these are the values that BritanniaBuilder has found in the resource.mdb file. And yes it would be nice to be able to edit them oneself if one wanted to.

Link to comment
Share on other sites

Rm has its own cv29 manager.

read a decoders cvs then double click cv29 value and up pops a tick list, which converts to a decimal number for you to write to the decoder.

also i think the tts leaflet gives quite a good brief on cv29.

Link to comment
Share on other sites

Nick has correctly summarised my question. I was hoping to edit the speed curve in resource.mdb rather than setting up complex speed curves in the decoder, which I suspect are not in any case supported in my TTS and Majestic train set decoders.

 

It would be nice if a future release of RM could allow editing of the speed curves in the RM database. I've done timing tests on each of my 3 locos at speeds of 5, 10, 20 ... 80 mph and plotted throttle speed in mph against reciprocal of lap time on a graph, and they are not very linear (although the Class 47 is pretty close).

 

 

Regards, John

Link to comment
Share on other sites

You were right about awake poliss, came back from Perth overnight so hadn't had much sleep.

 

Back to Bb's problem, the Majestic set locos will have R8249 decoders or equivalent and these do not support complex speed curves, so the whole discussion is academic for them, however interpreted.  And yes, resource.mdb is simply a copy of the info you have set up in RM for the loco/decoder.  Then TTS locos do their own speed curve thing via the motor algorithm options.

 

Not sure how this works when you select a loco from the database because that sets specific shunt and cruise speeds but not by writing speed curves into the decoder.  And if it were possible to edit resource.mdb to change anything in the decoder, it could only be done by doing a specific write operation to that CV in the decoder, and I think RM can only do this on one CV at a time, not multiple CVs.  That implies any future upgrade requested would have to change significantly the way RM works.

 

For now, accept that resource.mdb is just a record of setup info and the values written to the decoder by the normal RM means and editing it will get you nowhere as far as changing anything in the decoder.

Link to comment
Share on other sites

I've now found a way of editing resource.mdb, by writing an Excel VBA macro to download the fields into a spreadsheet so that they can be manually edited, and then uploading the changes. RM seems to work with the changed data quite happily (I've so far just made cosmetic changes such as editing the loco name). I'll now try changing the speed curves and speed factor and let you know what (if anything) happens.

 

Regards, John

Link to comment
Share on other sites

You can't use on screen slider bars in RM to do all this for you instead of having to write to resource.mdb?

...like you can in Decoder-Pro.

 

This sort of handy app could be marketed by Hornby as an add on to RM Pro.

Link to comment
Share on other sites

@Polis, @RAF96,

you're still misunderstanding what BritanniaBuilder is talking about.

It's nothing to do with programming CVs in the decoder but to do with changing internal RailMaster calibration values held in resource.mdb which affects how RailMaster internally converts from MPH as shown on the throttle to the speed step needed for a particular loco to run at that scale speed. 

Nick

Link to comment
Share on other sites

I've now found a way of editing resource.mdb, by writing an Excel VBA macro to download the fields into a spreadsheet so that they can be manually edited, and then uploading the changes. RM seems to work with the changed data quite happily (I've so far just made cosmetic changes such as editing the loco name). I'll now try changing the speed curves and speed factor and let you know what (if anything) happens.

John, I'd be interested to see that macro. I'm familiar with programming, just not with writing Excel VBA macros

Nick

Link to comment
Share on other sites

I've now had a chance to experiment with the speed curve field in resource.mdb and it does indeed control the mapping between the mph selected with the slider and the speed steps sent to the decoder. For example, the speed curve for the DoG TTS is:

 

2.588,1.823,1.568,1.298,1.158,1.058,0.978,0.918,1.318,

 

and the numbers seem to relate to 5, 10, 20, ... 80 mph. I think each factor is being multiplied by the selected speed (and some other constant factor, together with the separate speed factor field) to give the speed step value . If I change say the 40mph value to 0, it will run normally up to 30mph, then slow down and stop at 40mph, then speed up again to the normal speed at 50mph. By reducing the values for 10-40mph I've been able to get a much more linear speed progression, which was the thing that originally prompted me to investigate this. It's not a big issue, but it's nice to understand what's going on. Changing CV150 to 1 to get smooth low-speed running may have invalidated the speed curve distributed by RM, so it's not a fault with their loco data.

 

Nick, I'll be happy to copy you the spreadsheet and VBA code. If you go to my website shown below, you'll see an email address where you can contact me.

 

Regards, John

Link to comment
Share on other sites

Good work Bb.  You've now explained how the speeds for locos are setup in the RM database without writing anything to the decoder.

 

On TTS locos, I suspect that changing the algorithm from 0 to 1 doesn't invalidate the way the speed progression works from resource.mdb, rather it interacts with it, with a combined factor determining the speed step sent to the motor.  Unless of course there is a field in resource.mdb that switches its factors on and off (there must be something in there of this nature relating to whether you select scale speeds or not?).  Might be an area for further investigation?

 

This may be useful for locos not in the database too as you could populate this field with speed data and experiment rather than doing it via running around a standard length track with or without LD as per the manual.

 

PS.  How do you explain the last factor you reported not being less than the one before like all the others are?

Link to comment
Share on other sites

Thanks FM - it's nice to get to the bottom of these things. The option to use scale speeds is selected on the main settings screen of RM and so applies to all locos - I've just tried turning it off and the speed sliders then show speed steps of 0-127 rather than mph, so they must bypass the speed factor and speed curves in resource.mdb for all the locos. I don't know why the last (80mph) speed curve entry for the DoG is larger than the others - it looks a bit odd, but there doesn't seem to be any reason why the numbers have to be in descending sequence. Perhaps it just needs a bit of extra oomph to get up to 80mph which is its top speed.

 

The Accutrack speedometer looks to be a very useful gadget.

 

Nick, I hope you got my email - the spreadsheet might have been caught by your spam filter?

 

Regards, John

Link to comment
Share on other sites

Nick tells me that some of his locos also have a higher number at the end of the speed curve list, so it must be fairly common.

 

I've tried running with the scale speed option turned off so that speed steps are selected on the throttle sliders. The DoG runs faster at moderate settings (say 40) than the Class 47, but the DoG will go right up to step 127 which seems to be the equivalent of about 80mph, whereas the Class 47 at step 100 is going so fast that I didn't dare push it any further.

 

Regards, John

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...