JMRI: Fast Clocks
JMRI provides two kinds of Fast Clock capability:
- Internal - the computers clock provides the time information
- External - the DCC system provides the time information
There are two different parts to consider: A "Timebase" provides the basic time information, while one or more displays show you what's going on.
Fast Clock Timebase
To create a Timebase, use the "Set up Fast Clock..." item in the "Clocks" submenu under the JMRI "Tools" menu. This gives you a window where you can:
- Select the timebase source to control (typically, this is the internal computer clock)
- Set the rate at which the clock runs
- Set the time
- Start and stop the clock
Fast Clock Display
Once you have created a timebase by configuring it in that window, you can open clocks that will display on your screen. Currently, JMRI has three types available:
- Analog clock - the traditional circular clock with hands. You can resize it by dragging the window edges. There's also a pause/run button.
- Nixie clock - a digital clock that looks like the old-style Nixie tubes
- Panel clock - you can also embed a clock in a panel (instead of a separate window) from the panel editor.
- Pragotron clock - flip clock used in net Czechoslovak State Railways – ČSD since 4.19.2
When a clock is running, JMRI creates an internal sensor and a memory variable that you can use to control and access the clock. The ISCLOCKRUNNING sensor controls whether the clock is running (ACTIVE) or stopped (INACTIVE). The IMCURRENTTIME memory contains the current fast-clock time, and can be easily accessed from Logix and scripts.
Lights can be an easy way to set up Fast Clock Logic, see Light Controller - Fast Clock Follower.