Files
2026-06-17 14:00:51 +02:00

254 lines
14 KiB
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<meta name="generator" content="HTML Tidy for HTML5 for Apple macOS version 5.8.0">
<title>JMRI: Sections Documentation</title>
<meta name="author" content="Dave Duchamp">
<meta name="keywords" content="JMRI help Sections"><!--#include virtual="/help/en/parts/Style.shtml" -->
</head>
<body>
<!--#include virtual="/help/en/parts/Header.shtml" -->
<div id="mBody">
<!--#include virtual="Sidebar.shtml" -->
<div id="mainContent">
<h1>JMRI: Sections Documentation</h1>
<p>This document describes the characteristics of Sections. Sections and Transits provide the
foundation for the Dispatcher tool.</p>
<p>Links:</p>
<ul>
<li>
<a href="../../package/jmri/jmrit/beantable/SectionTable.shtml">Using the Section
Table</a>
</li>
<li>
<a href="../../package/jmri/jmrit/beantable/SectionAddEdit.shtml">Add/Edit Section</a>
</li>
<li>
<a href="Transits.shtml">Transits Documentation</a>
</li>
<li>
<a href="../../package/jmri/jmrit/dispatcher/Dispatcher.shtml">Dispatcher
Documentation</a>
</li>
</ul>
<h2>What is a Section?</h2>
<p>A <strong>Section</strong> is a group of one or more connected <strong>Blocks</strong>
that may be allocated to a train traveling in a given direction. Sections were created to
solve the direction problem that can occur when using Blocks directly. A Section has only two
directions, "forward" or "reverse". Sections can be traversed by a Train in either direction.
Section direction is independent of the direction set for the locomotive by a throttle. In
addition to solving the direction problem, Sections offer the user other useful features.</p>
<!-- image by Egbert Broerse @silverailscolo 2018 -->
<img src="images/DispatcherSection.png" width="842" height="137" alt="sample sections">
<p>Sections can be considered an extension of Blocks. Many Sections contain only one Block.
All Blocks contained in a multi-Block Section must be different. Blocks are kept in
order--the first block is connected to the second, the second is connected to the third, etc.
That means a Block in a Section must be connected to the Block before it (if there is one)
and to the Block after it (if there is one), but may not be connected to any other Block in
the Section. A Section may not contain any reverse loops.</p>
<p>Sections and their associated <strong><a href="Transits.shtml">Transits</a></strong> are
designed to provide support for dispatching, either manual dispatching (by a dispatcher
sitting at a panel), or automatic dispatching by the computer. Dispatching is the temporary
allocation of Sections for the exclusive use of a train, either run by an engineer with a
throttle, and/or run automatically by the computer. Support for dispatching is provided by
<a href=
"../../package/jmri/jmrit/dispatcher/Dispatcher.shtml"><strong>Dispatcher</strong></a>, which
also provides for set up and running of trains automatically.</p>
<p>A Section's <strong>direction</strong> is defined by the sequence in which Blocks are
added to a multi-Block Section. For a single Block Section the direction is chosen
arbitrarily when the Section is created. A train may run through a Section in either the
<strong>forward</strong> direction (from first block to last block) or
<strong>reverse</strong> direction (from last block to first block). If a Section has only
one Block, the <strong>direction</strong> of that Section is chosen when setting up its
<strong>Entry Points</strong> (see below).</p>
<p>Therefore, when setting up multi-block sections, you should choose blocks in the same
order across the layout for sequentially connected sections. That way, the forward and
reverse directions will have consistent meaning for sections on a relative basis. For
example, a loop style layout might declare clockwise to be forward. A point-to-point layout
might define left to right as forward.</p>
<p>A Section has one or more <strong>Entry Points</strong>. An Entry Point defines a
connection from a Block inside the Section to a Block outside of the Section. Entry Points
are set up using Paths of Blocks in the Section--Paths that represent connections to Blocks
not contained in the Section. Entry Points are classified in one of two ways:</p>
<ol>
<li>Whether entering the Section at that Entry Point will result in a train traveling in
the "forward" direction.</li>
<li>Whether entering at that Entry Point will result in a train traveling in the "reverse"
direction.</li>
</ol>
<p>Sections are designed to be allocated to one train at a time. If a portion of connected
track is long enough to support multiple trains simultaneously traveling in the same
direction, one following the other, that connected track should be divided into two or more
Sections, if the user wants to run following trains in that area.</p>
<h2>Direction and Stopping Sensors</h2>
<p>Optionally, each Section may have two <em>direction sensors</em>, one for the Forward
direction and one for the Reverse direction. These are normally internal Sensors, bearing
system names that begin with IS. They automatically follow the state of their Section. A
Section has three states: <strong>FREE</strong> (not allocated to a train),
<strong>FORWARD</strong> (allocated for travel in the forward direction), and
<strong>REVERSE</strong> (allocated for travel in the reverse direction. When the state of
the Section is <strong>FREE</strong>, both direction sensors are set <strong>ACTIVE</strong>.
When the state of the Section is <strong>FORWARD</strong>, the forward direction sensor is
<strong>INACTIVE</strong> and the reverse direction sensor is <strong>ACTIVE</strong>.
Similarly, when the state of the Section is <strong>REVERSE</strong>, the forward direction
sensor is <strong>ACTIVE</strong> and the reverse direction sensor is
<strong>INACTIVE</strong>. These sensors may be used in signal logic to force signals for
travel in the direction opposite to the allocated direction to <strong>RED</strong> (Stop).
Tools are provided in the Section Table menu to automatically add direction sensors to signal
logic or to automatically remove all direction sensors from signal logic. Alternatively, if
<a href=
"../../package/jmri/jmrit/dispatcher/Dispatcher.shtml"><strong>Dispatcher</strong></a> is
being used, it can add direction sensors to signal logic as needed.</p>
<p>The direction sensors can also be used with Signal Mast Logic. The direction sensors are
manually added or removed using the Signal Mast Logic <strong>Sensor</strong> tab. Select the
direction sensor that corresponds to the direction to the destination mast and set the
desired state to INACTIVE. As indicated above, the direction sensors are normally ACTIVE.
This forces signal mast logic to set the mast aspect to Stop. When a transit is activated,
the Forward or Reverse direction sensors for the sections in the transit are set to INACTIVE.
This triggers signal mast logic to update the signal mast aspect.</p>
<p>Also optionally each Section may have two <em>stopping sensors</em> that indicate when a
train in the Section has reached the end of the Section by traveling in the forward direction
or in the reverse direction. Stopping sensors should be physical sensors on the layout, for
example infrared point detectors. For manual dispatching, these sensors may be displayed on a
panel to indicate to the dispatcher when a train has reached the end of its allocation. For
automatic running, these sensors may be used to stop a train before it reaches the end of its
allocated Section, and before it overruns a red signal, if signals are present.</p>
<h2 id="SignalMast">Using Signal Mast Logic with Sections</h2>
<p>If your signaling is based on <a href=
"../../package/jmri/jmrit/beantable/SignalMastLogicTable.shtml">Signal Mast Logic</a> and the
associated logic has been generated using the Layout Editor, then it is possible to also have
Sections automatically generated based upon that same logic.</p>
<p>The tool to accomplish this can be found in the <strong>Signal Mast Logic Table</strong> |
<strong>Tools</strong> | <strong>Generate Sections</strong>. Running this will immediately
create Sections that each contain all of the Blocks between any already-defined Signal Mast
Pairs. It will also set up each "Automatically Generated" Section so that they include those
Blocks in the correct order, with the direction being set as FORWARD travel, going from the
Source to the Destination Signal Mast. Please note that the Block details are not saved when
the Panel is stored, but are re-created when the file is loaded.</p>
<p>The tool will also automatically create forward and reverse direction Sensors and place
them in the Section. However the Signal Mast Logic does not use the direction sensors and
their creation is only there to allow validation of the Section (or inclusion by the user in
unrelated Logix if desired). If desired, they can be added to the signal mast logic as
described above.</p>
<p>Sections generated with the tool will only have a pair of Entry Points and simply follow
the Path between the two Signals.</p>
<p>The details of the Optional Direction and Stopping Sensors are saved when the Panel file
is stored.</p>
<p>To use the Sections that have been built this way, you will next need to set up <a href=
"Transits.shtml">Transits</a>. Following that, you will also need to set the <a href=
"../../package/jmri/jmrit/dispatcher/Dispatcher.shtml"><strong>Dispatcher</strong></a> to use
SignalMast Logic via the Dispatcher's <a href=
"../../package/jmri/jmrit/dispatcher/Options.shtml"><strong>Options</strong></a> menu.</p>
<p>With stubs (UK sidings), a special procedure has been adopted. When working with signal
mast logic, transits work best when the sections are all FORWARDS. If a reverse section is
used the transit sometimes works, but sometimes does not. There is no signal mast section
facing out of a stub, and a block section at the stub has been found to work well in transits
emanating from the stub.</p>
<p>When signal mast logic is automatically called, block sections for all stubs are also
produced. Transits produced with the transit Create Tool (reached by right clicking signal
masts in sequence), automatically use these block sections. Care must be taken to use the
block sections (as opposed to using a signal mast logic section in the reverse direction)
when using the 'Add Transit' method accessed by clicking the Transits option in the Tools
Menu.</p>
<h2>Requirements</h2>
<p>Sections build on JMRI's Blocks and Path structures. So before attempting to create any
Sections, you should have Blocks and Paths fully initialized for your layout. A Layout Editor
panel of your layout with Blocks assigned is required to create the necessary path
information. See <a href="../../package/jmri/jmrit/display/LayoutEditor.shtml">Layout
Editor</a> for details on creating a Layout Editor panel.</p>
<p>Layout blocking should be carefully planned, to provide "<em>reasonable</em>"
Sections--Sections that make sense for a Dispatcher to allocate to a certain Train. For
right-handed or left-handed Turnouts switching mainline track, for example, this usually
means including the Turnout in the same Block as the track entering at the Turnout throat,
and providing separate Blocks for continuing and diverging tracks. Some users prefer to have
a Turnout in a separate Block, and that works fine also. From a Dispatching perspective,
tracks of mainline Turnouts that branch to industries do not need to be separately blocked,
but blocking here is acceptable. A layout blocking scheme that works well for Signals, should
work fine for Sections also.</p>
<p>Signals are not required for using Sections, but Sections will work fine with Signals
installed. If Signals are installed, the direction Sensors included in Sections provide an
easy way to set up simple APB signaling (see <a href="#SignalMast">above</a>).</p>
<h2>How to setup Sections</h2>
<h3>Creating and Displaying Sections</h3>
<p>All the Sections that JMRI knows about can be viewed using the <a href=
"../../package/jmri/jmrit/beantable/SectionTable.shtml">Section Table</a>. Select
<strong>Sections</strong> in the <strong>Tables</strong> submenu of the
<strong>Tools</strong> menu of the main JMRI program window. Sections can either be created
manually from the Section Table pane, or they can be created automatically if you also plan
to use <a href="#SignalMast">Signal Mast Logic</a>.</p>
<h3>Section Table Controls</h3>
<p>Below the Section Table there's an <a href=
"../../package/jmri/jmrit/beantable/SectionAddEdit.shtml">Add...</a> button.</p>
<p>The <a href=
"../../package/jmri/jmrit/beantable/SectionTable.shtml#tools"><strong>Tools</strong></a> menu
gives access to:</p>
<ul>
<li>Validate All Sections...</li>
<li>Set Direction Sensors in Logic...</li>
<li>Remove Direction Sensors from Logic...</li>
</ul>
<h3>Creating a new Section</h3>
<p>To Create a new Section, click the "<a href=
"../../package/jmri/jmrit/beantable/SectionAddEdit.shtml">Add..."</a> button.</p>
<h3>Saving Sections to disk</h3>
<p>Sections are kept in your <em>layout configuration</em>, along with Turnouts, Sensors,
Signal Heads, Lights, control panel setup etc. To store this information on disk, allowing
you to <a href="../../package/jmri/jmrit/display/PanelMenuHelp.shtml">reload it</a> next time
you run JMRI, see <a href="../apps/LoadStoreWork.shtml">Loading and Storing Your
Work</a>.</p>
<!--#include virtual="/help/en/parts/Footer.shtml" -->
</div>
<!-- closes #mainContent-->
</div>
<!-- closes #mBody-->
<script src="/js/help.js"></script>
</body>
</html>