Speedometer
The JMRI libraries contain a Speedometer tool that you can use directly from the screen, or build into your own applications
Before the tool 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 DCC 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 sensor 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 LoThe 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. 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 of the Speedometer window 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.
Also check out the JMRI Help pages on: