(See Also NCE-Speedometer.html)
The JMRI libraries contain a speedometer tool that you can use directly from the GUI, or build into your own applicationsIt does work in the 1.1.4 version, although there were some problems in the earlier versions. It only works with Digitrax there, as the code for reading feedback from other systems isn't available yet. We working on adding support for NCE AIU units, and for directly connecting sensors to the serial port.
Before it will report the speed, you need to configure it.
To do this, enter sensor numbers in the three fields. This is a number (like 23) for the address of the BDL16, DS54, etc channel that will report when the occupancy changes. The simplest way to get the right number is to open a "LocoNet monitor" window, and drop a locomotive onto the block you're interested in. You'll see the LocoNet message, complete with number, in the window that looks something like this:
General sensor input report: contact 161 (DS54 20 ch1 Sw input)
(BDL16 10 A2) is Lo
The contact number, 161 in this case, is what you want.
There are three sensors so you can have a shorter interval for slow speeds and a longer interval for fast speeds. (Roger Gleason added this) The timing is from sensor 1 to sensor 2, and from sensor 1 to sensor 3.
You also need to select "on entrance" or "on exit" for each of the sensors. This says whether the clock will start/stop when the sensor shows the block is first occupied, or when it shows the block is first unoccupied.
You also enter the distance in _scale_ feet between the various points. If you're using "on entrance", measure using the entrance end of the block.
Finally, click the "Start" button. The three little red dots along the right side will start changing color to indicate the status of the selected sensors: Red for "unknown", no message seen yet; White for "unoccupied"; Green or yellow for "occupied".
Once you click the Start button, you can't change the configuration. Just close that window and open another one. You can have multiple speedometer tool windows open if you'd like.