JMRI: Turnout Documentation
What are Turnouts?
JMRI calls just about any output to the layout a "Turnout". Originally, JMRI controlled just Turnouts via DCC accessory decoders. As time went on, JMRI added more capability, but has kept that name. Now, for example, the individual output pins on a C/MRI system are also referenced via the "Turnout" name.
Controlling a Turnout
In most cases, you can just operate a turnout and JMRI will figure out why you mean. For example, you can open the "Turnout Control" from the "Tools" menu, enter a Turnout number (DCC or C/MRI address number), and click Thrown or Closed. JMRI will take it from there.
The two states of the output are called "Closed" and "Thrown". "Closed" is the off, inactive, not commanded state. "Thrown" is the on, active, commanded state.
Saving Turnout configuration to disk
The turnout definitions are saved in your layout configuration file, along with
sensors, signal heads, etc. To store this information on disk, use Store
Configuration... in the File menu at the top of the Light
Table (or other tables from the Tools menu), or select Store Panel...
in the Panel menu.
Adding a new Turnout
To fully configure a new Turnout, follow this procedure:
Click Turnout Table in the Tools menu to bring up the Turnout Table, and click the Add... button at the bottom of the table to bring up the Add/Edit Turnout window.
Enter a system name, according to the JMRI convention. The first letter designates your hardware system ('L' for loconet, 'C" for C/MRI, etc.), and the second letter must be 'T' for Turnout. These are followed by a number that gives the hardware address of the digital output bit being referenced. Examples of valid system addresses are: CT1004, and LT401, assuming you have the hardware for the addressed digital output bits.
Enter a user name. Any string of characters that is different from the user name of other Turnouts will be accepted, but it's wise to use a string that describes the intended use of the Turnout. You can leave this blank if you'd like.
Click the Create button at the bottom of the window. If everything is fine, a message stating "New Turnout added ... " will be displayed in the notes area. If there is trouble with anything, an error or warning message will be displayed in the notes area; you should then correct the error and click Create again.
Back in the main Turnout Table, you can then select options for the Turnout and control it by clicking on the state button.