JMRI: Blocks Documentation
What are Blocks?
Blocks are sections of track whose occupancy may be individually monitored. Dividing track into Blocks is optional. Blocks set up in a track diagram normally correspond to physical blocks on a layout. Block occupancy is indicated by the state of an occupancy Sensor. When a layout's track is divided into Blocks, all of the track need not belong to a Block. For example, yard track may not be in a Block, whereas mainline track almost always would be divided into Blocks. The main use of Blocks is to facilitate Signaling, but Blocks may be used for other layout control and animation functions.
How to setup Blocks
Blocks may be set up manually from the Block Table, using
a script or automatically in a Layout Editor Panel. When a
Block is defined on a Layout Editor Panel, a new Block is
created if one does not already exist. In Layout Editor,
Blocks are identified by their User Name, so if a Block shown
in the Block Table is used in a Layout Editor Panel, its User
Name should not be changed.
If you want to change the User Name of a Block used in a Layout Editor Panel, make the change in the Layout Editor, not in the Block Table.
To complete the definition of a Block, Paths and Bean
Settings must be attached to each Block. Paths describe entry
points to the Block. Each Block has one or more Paths
associated with it. Sometimes a Turnout must be set a certain
way to use a Path; Bean Settings carry that information.
Paths and Bean Settings are set up automatically for Blocks
defined in a Layout Editor Panel. They can also be set up in
a script. There is currently no way to manually enter Paths
or Bean Settings. Paths and Bean Settings are not shown in
the Block Table, and are described here only for
Paths may however be deleted using the Paths menu.
The Block Table
Blocks are created and edited in the Block Table.
For use in automatically running Trains, a Length attribute and a Curvature attribute may optionally be assigned to a Block. These optional attributes are entered manually in this table. If Trains will not be run automatically through a Block, there is no need to add these attributes.
Block Table controls
- Below the Block Table you'll find the Add... button
- The Paths menu contains a Delete Paths... item
- The Speeds menu lets you set system wide Defaults...
Adding a new Block
To add a new Block, follow this procedure
Editing an existing Block
To check or change the properties of a Block, follow this procedure
Saving Blocks to disk
Blocks are saved in your layout configuration file, along with Turnouts, Sensors, Signal Heads, etc. To store this information on disk, use Store Configuration... in the File menu at the top of the Blocks Table (or other tables from the Tools menu), or select Store Panel... in the Panel menu. Note that the occupied/unoccupied state of each Block is not saved in the configuration file. When Blocks are loaded from a configuration file, their status is read from the Sensors.