JMRI: Utility USS CTC Tools
This is the original implementation of CTC and provides capabilities that are enabled using scripting. See also the newer CTC implementation that provides a GUI editor to configure the CTC rules and a run-time to implement CTC logic. It also builds a skeleton Panel Editor CTC panel with the turnout levers/indicators, signal levers/indicators, code button, etc., and a minimal track plan.
JMRI contains tools to help in the automation of USS CTC Panels. These can be used for either screen-based Panels, or to drive a physical panel with real levers and lights.
Script-based ToolsSince JMRI 4.8
These tools are very powerful, but currently can only be configured via a script.
For information how to do this, see:
- The jython/ctc/TwoColumnMachine.py sample script and it's associated jython/ctc/TwoColumnMachine.xml panel file.
- The Javadoc documentation on the various components
- Code Line
- Implements the code line between the CTC machine and the field. Can use a turnout output to tell e.g. a lamp to light or relays to make noise.
- Station
- Corresponds to a single station on the code line, usually a single column on the CTC machine and all the items in the field that are connected to it.
- Code Button
- One per section, this defines the connection to the code button (a sensor input) and the code lamp (a turnout output) on the panel.
- Turnout Section
- Controls a single turnout in the field. You configure it with that turnout's name along with sensor inputs for the lever on the panel, and turnout outputs for the indicator lamps. Can optionally take Lock objects to add prototypical locking.
- SignalHead Section
- Controls the signal heads around a single OS in the field. You configure it with lists of left-going and right-going heads which it can hold and release, along with sensor inputs for the lever on the panel, and turnout outputs for the indicator lamps. Can optionally take Lock objects to add prototypical locking.
- Track Circuit Section
- This drives a track occupancy indicator lamp (an output) on the panel from a occupancy sensor in the field (a sensor input). Optionally, can ring a bell when goes occupied or unoccupied.
- Maintainer Call Section
- This drives a maintainer call lamp (an output) in the field from a lever or switch on the central panel (a sensor input).
- Occupancy Lock
- When added to a Turnout or SignalHead section, this prevents changes while the OS section (defined into the Lock) is occupied.
- Route Lock
- When added to a Turnout section, this prevents changes while the OS section has a route cleared through the Turnout.
- Time Lock
- When added to a Turnout section, this prevents changes while the OS section has signals running time.
- Traffic Lock
- Locks against signals being cleared in opposite directions onto a single segment of track. Can be configured with turnout settings (BeanSetting objects) to allow e.g. signals at opposite ends of a town to clear when one turnout is set ot the main and the other to the siding.
- Turnout Lock
- A bit of a misnomer, because this refers to locking based on the state of a JMRI Turnout, which should be considered a generalized output. Can be used to e.g. lock sections when a Call On state (on an internal turnout that represents the state) has been set (by e.g. a Maintainer Call section used to set that JMRI Turnout in the field).
These tools log information to several JMRI Memory objects, which in turn can be placed onto panels as MemoryIcons to show e.g. which lock is preventing an operation. Prototype CTC machines don't have these, of course, but they're very useful for model railroad dispatchers.
- IMUSS CTC:CODELINE:1:LOG
- What the code line is doing
- IMUSS CTC:SIGNAL LOCK:1:TIME
- Activity associated with the signals
- IMUSS CTC:TURNOUT LOCK:1:LOG
- Activity associated with turnout locks
These tools also create sensors that indicate whether a particular station is locked due to running time or not. They're called ISUSS CTC:SIGNALSECTION:1:RUNNINGTIME:1:, ISUSS CTC:SIGNALSECTION:2:RUNNINGTIME:1:, etc and can be placed on panels to display that the station is running time.
Note that the example panel uses one set of display icons. JMRI has other sets (See these and others) that let you make up other styles and sizes, and you can always make up your own. For examples of creating CTC panels, please see the gallery page. Often the best way to create the background is to draw the entire thing as a single background image using graphics tools on your computer. (There's a nice summary of CTC lamp colors by Mike Burgett)
There's also another set of CTC tools for building CTC controls in a more graphical way.
Model Railroad Compromizes
Activity on a model railroad is typically much faster than on the prototype railroad. It can be very frustrating to a dispatcher, particularly one who doesn't use the panel every day, to have the panel's indicators and operations falling behind the railroad. To help with this, these tools allow two compromises. See the sample scripts for examples of how to tune these.- You can adjust the timing of the various operations. By default, they're somewhat faster than the prototype. You can make them faster or slower.
- On the prototype, indicator lamps go off when the code button is pushed and only come back on when an indication is received back. By default, these tools will keep the indicators lit when no change has been requested. This makes it easier for the dispatcher to consider their next move while actions are occurring.
Standalone Tools
These can be created from the USS menu under Tools in JMRI applications. They work by creating Logix and/or Routes that implement the desired functionality. You could do that by hand, of course, but these are meant as a simplification.- Follower
- Slaves an output Turnout device to follow the state of an input Sensor device. This could, for example, make a layout turnout follow a fascia switch connected to a Sensor.
- OS Indicator
- Drives the occupancy indicator lamps on the Panel. This takes input from a Sensor to show the track section is occupied, and also optionally can light the indicator if the section has been unlocked.