JMRI: Simple Signal Logic Example
This page provides an example of using the JMRI "Simple Signal Logic" to control signals on a Digitrax SE8c. This also works for other types of signals, including LEDs connected to stationary decoders, C/MRI systems, etc.Modeling railroad signaling on a layout can be done many different ways, ranging from "stoplights" to complete emulation of a particular prototype's signaling logic. For more information on the various posibilities, please see the JMRI signaling page.
Predefined example
A predefined example signaling configuration is provided in the JMRI downloads; see the download page for information on downloading). To use it:- Start the PanelPro program, and select Prefs from the Edit menu. On the panel that opens, select "LocoNet Hexfile" as the protocol. Save, and quit the program. This will let you use the example (which uses LocoNet addresses for signals, turnouts and sensors) even when your computer is not connected to a layout of any kind.
- Restart the program.
- From the "Panels" menu, select "Load" and navigate to the file "SE8cSignalExample.xml" in the xml/layout directory. Note that you may have to look around for this file; it's in the same place that you installed the program.
-
You should now see a simple schematic panel for a layout consisting of a loop
of track and one passing siding.
Because there's no connection to a real layout, the status of the block detectors and turnouts isn't initially known. This example shows that by displaying the block detectors as yellow, and the turnouts as "not connected either way". Since the signal logic isn't sure whether blocks are occupied nor how turnouts are set, it shows red on all the signals.
You can click on the icons to change the occupancy and turnout status, or use another tool (e.g. the "turnout table") to do that.
Click on each of the turnouts to set them closed. Click on the block detectors to set them "unoccupied", which is shown as a gray circle (it's supposed to look like an unlit LED; occupied is indicated by a red LED)
-
The display should now look like the image to the right.
The signals on the passing siding are red, as the turnouts are thrown against
them. All the signals on the mainline are green.
If you "hover" the cursor over an item, a tooltip will pop with information about the item. For example, a turnout might show "Turnout 1 (LT1)". LT1 is the "system name" for that turnout. In this case, it means "LocoNet Turnout with address 1". "Turnout 1" is a "user name", which can be anything you want it to be. You can edit these with the "Turnout Table" in the Tools menu. Signal heads and block detectors work similarly. There's more information on this on the program page on naming.
-
You can now click on the block detectors to show how the signals would react
to the presence of a train. For example, the image to the right
shows a train entering a passing siding from the left side. It's about
to encounter a yellow signal upon entering the siding, which tells it to
be prepared to stop for a red signal at the far end of the
siding.
Note that the rear of this train is protected by a red signal, which in
turn is protected by a yellow signal in the previous block.
Another train is just leaving
onto the main going to the right.
-
If you're interested in how the program would communicate with a
Digitrax SE8c signaling card, you can open the LocoNet Monitor
tool from the Digitrax menu. Clicking on a turnout sends a
LocoNet message to move the turnout. Clicking on a block detector
causes a message as if a BDL16 block detector channel had seen
a change in occupancy. If either of those messages result in
a change to the signals, the program will send
messages to those SE8c channels to change their output.
For example, when the train in the previous image enters the
block on the right side (block 1), the messages are:
General sensor input report: contact 1 (DS54 0 ch1 Sw input) (BDL16 0 A2) is Hi Requesting Switch at 290 to Thrown (output Off) Requesting Switch at 284 to Thrown (output Off) Requesting Switch at 281 to Thrown (output Off)
The three switch messages set signals 5B, D and 4C to red, red and yellow respectively. -
To see how the signals are configured, open the
"Simple Signal Logic" item in the Tools menu.
Enter a signal name, e.g. "Section 5A" in the top
text field and hit return. You should get something
like the image to the right (click to expand it to full size).
Section 5A is the signal protecting
turnout 2, the right-hand entrance to the passing siding.
- It's defined here as a "facing point" signal.
- It protects sensor LS7 by turning red when the sensor detects a train in the block.
- It watches the status of turnout LT2. When that turnout is thrown, the signal will be yellow when signal LH263 at the entrance to the passing siding is red. When the turnout is closed, a yellow signal will protect a red on signal LH261 on the mainline between the turnouts.
- The flashing yellow checkbox isn't selected here, but if it was, this signal would protect a yellow signal further on with a flashing yellow.
Setting up your own example
The complete set of steps involved in creating this example were:- Launch and configure the PanelPro application. Restart it to
have your preferences take effect.
For more information on launching and configuring PanelPro, please see the PanelPro web page.
- Tell it about your block detectors.
- From the Tools menu, open the "Sensor Table" tool.
- If you have a Digitrax DCC system with your occupancy detectors connected to LocoNet, just power the track off and on using either a DT-series throttle or the "Power Control" in the Tools menu. The program will capture the sensor addresses from the resulting LocoNet traffic.
- For other layouts, use the "Add" button to create the needed sensors.
- Save your work by selecting "Store Panels..." from the "Panels" menu, typing a filename, and hitting "Save". (You might want to do this often!)
- Tell it about your computer-driven turnouts.
- From the Tools menu, open the "Turnout Table" tool.
- If you have a Digitrax DCC system, just throw or close each turnout from a throttle. The program will capture the throttle addresses from the resulting LocoNet traffic.
- You can also use the "Add" button on the turnout table window to open a panel to enter new turnouts.
- The "Turnout Control" in the Tools menu also creates a new turnout entry for every turnout you operate.
- If you have signal heads connected to "turnout-type" outputs, tell the program about those turnouts also. (SE8c users skip this step)
- Tell it how your signals are addressed.
- From the Tools menu, open the "Signal Table" tool.
- Click the "Add..." button to pop a frame
with three choices for the type of signal driver:
- Triple Turnout
- This a signal head with red/yellow/green lights that
are driven by three DCC turnout outputs.
To configure one of these, enter the name you want to give it (typically something like IH2, etc), and the names of the three turnouts that drive the lamps.
- Double Turnout
- This a signal head with lights that
are driven by two DCC turnout outputs.
The two outputs drive red and green lights separately; the program
will turn them both on to make yellow.
To configure one of these, enter the name you want to give it (typically something like IH2, etc), and the names of the two turnouts that drive the lamps.
- SE8c 4 aspect
- This is one signal head driven by a Digitrax SE8c.
Enter the lower of the two "turnout address" that this head responds to. For example, if it's the first head on the first card, you can control it by setting turnout 257 and 258 with your throttle. Enter LT257 in the turnout control box.
The SE8c should be configured so that the "4th aspect" is "dark"; the program will handle any flashing that's needed.
- Configure your signal logic using the "Simple Signal Logic" tool
- Open the tool from the "Tools" menu. You should get a frame
with a number of fields:
- In the top box, enter the name of the signal you want to control.
- The radio buttons below that select one of four possible uses
for this signal:
- "On Single Block" - this signal protects one end of a straight through block, with no signalled turnouts
- "On Main Leg of Trailing-Point Turnout" - this signal is along the main route through a turnout, which is defined as the direction taken by trains when the turnout is closed. It's protecting the frog of the turnout so that trains will stop before running through a turnout set against them.
- "On Diverging Leg of Trailing-Point Turnout" - this signal is along the diverging route through a turnout, which is defined as the direction taken by trains when the turnout is set to "thrown". It's protecting the frog of the turnout so that trains will stop before running through a turnout set against them.
- "On Facing-Point Turnout" - this signal is protecting the points-end of a turnout. Depending on whether the turnout is thrown or closed, the train will take two different routes, and the signal will protect different next blocks.
- If you want the signal to go red when a block detector shows occupied (sensor active), enter the sensor name in the next box.
- If this signal is protecting travel in the trailing point direction through a turnout, you can have the signal show red if the turnout is thrown against the train. To do this, enter the turnout number to be monitored in the 3rd box, and select whether the signal should be red when the turnout is thrown or closed.
- If you want multi-block logic, e.g. Absolute Block Signaling,
enter the name of the following signal in the last box. When that
signal shows red, this one will be set to yellow to warn the engineer
that the train must be able to stop at the next signal.
If you'd like to give additional warning, click the "with flashing yellow" checkbox. In that case, the signal before a red will show flashing yellow, and the signal before that flashing yellow will show a steady yellow.
- Once you've set the options, click "OK". You can use this form repeatedly to enter as many as you'd like.
- Open the tool from the "Tools" menu. You should get a frame
with a number of fields:
- Once you save your work, you're done!
Although it's a lot less fun than actually running the layout, you can also test the signal logic by changing turnout and sensor status in the computer itself. Just click on the status information in the tables to change it. For example, is turnout LT23 is showing "Thrown", click on that to change it to "Closed". The signal status will update to the new appearance.
You can create a small control panel to do this graphically. For more info on how to do that, see the Panels page.