JMRI is...

Signaling

Adding signals to your layout with JMRI.

Tools

JMRI provides powerful tools for working with your layout.

Layout Automation

JMRI can be used to automate parts of your layout, from simply controlling a crossing gate to running trains in the background.

JMRI: Aspect Signaling

Controlling model signals in a prototypical manner

Protoypical signal systems present "Aspects" to the engineer to tell him how to run his train. The "Stop" aspect, for example, is pretty simple: "Stop the train". The "Approach medium" aspect indicates something more complicated: "Proceed approaching next signal at medium speed". Each aspect has an associated "indication", which is usually codified in a railroad's Rule Book.

The picture to the right shows an example, Rule 282 from the 1946 AAR rule book (Aspect: Approach Medium).

JMRI Support for Aspect Signaling

A collection of plain instructions let you set up Signaling in 7 Quick Steps.

Aspect Signaling is supported in JMRI using three of the Signaling Tools:

Signal Head objects in JMRI are not aware of their position on a mast and the Signaling System they are part of, so as individual objects they can't show Signal Aspects. Individually they can only be set to specific Appearances (colors), either from the Signal Head Table or via Logix.

How does it work?

In short, a set of files for the selected Signaling System contains the basic code to determine which combinations are available in the Signal Mast Logic tool.
In the xml/signals directory located in the JMRI program directory, there is a directory for every Signaling System that has been defined, with one "aspects.xml" file which lists all of the possible Aspects plus a number of "appearance..." files (i.e. appearance-one-searchlight.xml), each of which describes the possible Aspects based on one Signal Mast type. These essentially say "if the next signal has an 'x' aspect, then the current one needs to show a 'y' aspect" (more details).
The Signal Mast Logic table is then used to check which Signal Mast pairs are active in the Signal Mast Logic and whether the Aspect should not be 'Stop'. This is done by looking at Turnout positions (if applicable), Block occupancy and - possibly - Sensors. On the Signal Masts tab you might even specify additional Signal Masts to watch, e.g. for an Interlocking. For any Signal Mast, there can be 1 to n destination Signal Masts, one of which is active based on the positions of Turnouts connecting the protected Blocks.
If everything is OK, then the appropriate "appearance..." file for this Signal Mast type will be used by the Signal Mast Logic to assign a new Aspect based on the Aspect of the next Signal Mast.
This covers the basic workings in a very high level overview. (Thanks to Dave Sand)


Signal 4B showing the "Stop" Aspect when sensor OD1 is Active (at left) and "Approach Diverging" when the block is empty (at right).

Available Signaling Systems

JMRI users have provided the following pre-defined Aspect Signaling Systems:
Basic
A non-prototypical set of aspects and appearances that most model railroaders will understand easily.
AAR-1946
American Association of Railroads 1946 rule book
Amtrak-2010
Amtrak Northeast Corridor Color Position Light signals
B&O-1957
1957 B&O
(Incomplete, not finished as of JMRI 3.10.)
B&O-1980
1980 B&O Corridor Color Position Light and semaphore signals
B&O-2009
2009 B&O (CSX)
B&O-Semaphore
1969 B&O Semaphore masts only (works with B&O-2009 CPL)
BN-1989
Burlington Northern Oct. 1989 rule book
BNSF-1996
BNSF Railway 1996 rule book
BR-2003
British Rail 2003 rule book
CFL-2014
Current (2014) Luxemburg railways (Societé Nationale des Chemins de Fer Luxembourgeois)
CROR-2008
Transport Canada (TC) 2008 O-0-93 rule book
CSD-1962-zakladniCSD-1962-cestovaCSD-1962-vlozenaCSD-1962-mechanikySZDC-2015-zakladni
ČSD – Československé státní dráhy – Czechoslovakia signal definition 1962
CSD-1962-zakladni – basic signals – Set 0
CSD-1962-cestova – intermediate signals – Set 1
CSD-1962-vlozena – embedded signals and hump yard signals – Set 2
CSD-1962-mechaniky – mechanical signals – Set 4
SŽDC – Správa železniční dopravní cesty – Czech signal definition 2015
SZDC-2015-zakladni – basic signals – Set 3
CSX-1998
CSX Transportation Signal Rules - 281-298, January 1998
CSX-2014-Chessie
CSX 2014 rule book (former Chessie rules)
DB HV 1969
1969 Deutsche Bundesbahn "Einheitsbauform" Home Signal/Distant signal (Hauptsignal/Vorsignal) system revision
(Missing aspect mapping, not finished as of JMRI 3.10.)
GWR-1931
Great Western Railway 1931 searchlight signals (British)
InfraBel-2013
Belgian Railways, taken from Wikipedia, current as of 2013
LMS-1932
Complete London, Midland and Scottish Railway speed signaling from 1932-1988 (British)
NS-2008
Norfolk Southern Corporation Operating rules book (NORAC)
NW-1981
Norfolk and Western 1981 rule book
NYCS-1937
New York Central System 1937 rule book
(Missing aspect mapping, not finished as of JMRI 3.10.)
NYC-1956
From the New York Central System publication "Rules of the Operating Department, Effective October 28, 1956."
ProRail-1954
1954 Prorail rule book, still in use in 2015 (the Netherlands)
RG-1965
1965 Rio Grande Rules of the Operating Department
SLSF-1973
St. Louis - San Francisco Railroad (Frisco) 1973 rule book
(Missing some icons, not finished as of JMRI 3.10.)
SOU-1981
1981 N&W - Southern Railway
SPTCO-1930
Southern Pacific Railway and Transportation Company 1930 rule book
SPTCO-1960
Southern Pacific Railway and Transportation Company 1960 rule book
SPTCO-1969
Southern Pacific Railway and Transportation Company 1969 rule book
UP-2008
Union Pacific Railroad 2008 rule book
WM-1980
Western Maryland Railroad 1973-1980

The most current list of Aspect Signal Systems supported in JMRI can be found at http://jmri.org/xml/signals/.

To create your own Signaling System Definition follow these Instructions. If you do create a new definition for another prototype railroad or era, after testing please contribute it back to the JMRI project so we can distribute it with future releases of the project for others to use. Like Decoder Definitions in DecoderPro, the more Signal System Definitions we have, the more useful the program becomes, and the more people spend time to improve it. We all win that way!

Code Access to Aspect Information

Logix

Signal Masts can be both tested (in Conditionals) and set (in Actions) via Logix. When you're editing a Logix Conditional or Action, you have to type the Signal Mast name and hit enter/return so that the program can look up the available Aspects for that particular Signal Mast.

Scripting

A program (in Java or Python) can get access to Aspect information in two ways. If the code has a reference to a specific Signal Mast "m", it can use

   m.getValidAspects()
to get the list of aspect names that this Signal Mast can display. The program can then access the Signal System definition with
   SignalSystem sys = m.getSignalSystem()
and then enquire about properties of the aspect:
   sys.getProperty("Clear","speed");
where the first argument is the aspect name (use, for example, m.getAspect() to obtain the current one on the mast) and the second is a specific property. Properties can be defined programmatically via e.g. m.setProperty("Clear","speed","69"); or get loaded automatically from elements in the aspect.xml file that defines the specific signal system.

In addition to the global properties for an Aspect, there can also be local properties to a specific Signal Mast type. An example of this is the default icon image: The image for a two-head Signal Mast is different from that for a one-head Signal Mast, even if they both represent "Clear".

To get those:

   m.getAppearanceMap().getProperty("Clear","imagelink");
In words, this is saying "Get the Appeance info for this Signal Mast, and then check the imagelink property of the Clear aspect".

Alternatively, if you know the name of the Signal System in use, a program can access it directly via the InstanceManager:

   SignalSystem sys = InstanceManager.getDefault(SignalSystemManager.class).getSystem("basic");

Back to the Signaling main help page.