User Tools

Site Tools


Setup Measure Velocity Track


  • Setup


Use for both ways

The MVTrack can be used in both directions if the option One-way is disabled.
:!: This option can only be used if the underlying sensor system generates only one event for a train. (Delayed off.)
If the reverse direction distance is not equal to the forward direction the second distance field can be used for the reverse distance. If left zero the first distance field will be used for both directions.


Name Description Units
s1 sensor one to trigger the measurement ID
s2 sensor two to trigger the calculation ID
distance distance between s1 and s2 mm
distanceR distance between s2 and s1 mm
scale locomotive gauge/scale: H0=87, N=160… -
mph Miles Per Hour true/false
oneway One-way true/false

The sensors may also be used by a block; they both will get the events.
See also:


If activated the selected loco will get informed of the measured kmh and will adjust its CV 5 value to match the wanted Max. km/h.
Multiple runs at the highest speed step are necessary to come close to the wanted result.
Depending on the hight of the difference between Vtarget and Vactual, CV5 will be varried.
If the used sensors will report a loco Code this will overwrite the selected loco ID in this dialog. (RailCom, RFID, …)

Note 1: The CV 5 will be adjusted by a POM write command.
Note 2: The CV 6 will be set by POM to 30% of the CV 5 value. (This percentage can be adjusted on the Loco Calibrate Tab.)

See also: Loco Calibrate


The measured value can be used with the rocrail variable %mvspeed% as Dynamic text in a Action of type "text".
The action must be called with status "in" in the action control of "MVTrack".
The example assumes that the text field txtSpeed is defined.

Text action "measure"Action control of the MVTrack
calling the action "measure"

Using existing blocks

This feature, without calibrate, is also available in Blocks.
The measure value is than transfer in the rocrail variable %bkmvspeed% to the block action control.

Result view

The average velocity is shown in the Rocgui server window:

In case of MPH the calculated KM/H is multiplied by 0.621371192.

Note: Trace level Calculation must be activated in the server.


A file with the name "mvtrack.csv" is created in the server working directory with the following content:


Remark: Unless the LocoID will not be forwarded by BiDi systems dynamically, "LocoID" = "unknown" is inserted (as well as "TrainID"). Example:


Shall the LocoID be displayed without use of BiDi systems, measure velocity track in the block must be utilized.

An import in a spread sheet could looks like this:

How to define the distance

In case of current sensors measure the distance between the start of s1 and the start of s2 in mm.

:!: The measured results dependents of the used sensor system and of the data traffic.

mvtrack-setup-en.txt · Last modified: 2019/04/18 12:54 by cds