What the file is
JMRI, the free model-railroad software that runs this layout, keeps what it knows in "tables". There is a table of turnouts (the switches), a table of sensors, a table of blocks (stretches of track), and so on. When you save, JMRI writes all of them into one XML file. When it starts, it reads that file back, and the railroad is there again.
Ours is called tables.xml. It is about 1.1 MB and 13,082 lines long, and it has
20 top-level sections. It is in the ordinary JMRI format. build_tables.py generates it from the device master and a template, and
PanelPro 5.16, the main JMRI program, loads it. It holds no connection settings: how JMRI reaches the layout lives in the profile, a
separate set of preferences. Everything else is in here, including the four panels, of which
the track diagram is the one shown on screen.
How the file is laid out
The file is one long list of sections, one after another. It falls into two broad parts. Objects are the things JMRI keeps track of: sensors, turnouts, masts, blocks and so on. Each has a system name, JMRI's internal id, and usually a user name, the public name people use. Panels are the drawn screens. They hold no objects of their own; they refer to the objects by name.
systemName M2S100
userName BS K-1
That is a real sensor. Many objects also carry a comment, a free note such as "Node: 1 Block: 1". A sensor icon on a panel carries only "BS K-1", and JMRI finds the sensor from that.
Mind the order. The panels are what you see first on screen, but in the file they come last: about 46% of the file is objects, then about 54% is panels. A short record of loads and stores closes the file. The largest single section is HART Railroad, at about 27% of the file.
| Section | What it holds | Share of the file |
|---|---|---|
| At the start | ||
| JMRI version | The version of JMRI that stored the file. | under 1% |
| Objects | ||
| Sensors | Inputs: occupancy and switch feedback from the layout, plus internal flags and helpers. | 4% |
| Turnouts | The switches, their DCC twins, and internal turnouts for the main and upper levels. | 2% |
| Memories | Small stored values, such as the fast-clock time and the mimic page's requests. | under 1% |
| Signal heads | Virtual heads that carry each lamp's colour. | 3% |
| Signal masts | The signals, real and virtual, all stock Basic. | 3% |
| Blocks | Stretches of track, each with an occupancy sensor and paths to its neighbours. | 8% |
| Layout blocks | The Layout Editor's view of each block. | 4% |
| Sections | Dispatcher track pieces, mostly made from pairs of masts. Parked. | parked |
| Transits | Whole moves that the Dispatcher builds from sections. Parked. | parked |
| Signal Mast Logic | The rules that set a mast from the track ahead. | 8% |
| Logix | Older-style logic items. Parked. | parked |
| Conditionals | The conditions and actions inside those Logix. Parked. | parked |
| Fast clock | The settings of JMRI's fast clock. | under 1% |
| LogixNG | Newer logic that hides windows and clears the main and upper block sensors at startup: the LogixNGs, their ConditionalNGs and their actions. | 14% |
| CTC data | The USS CTC machine's code buttons and settings. Parked. | parked |
| Entry/Exit | Pairs that line a route from a click on the panel. Parked. | parked |
| Panels | ||
| USS CTC | The lever machine, a Panel Editor screen. Parked. | parked |
| HART Railroad | The track diagram, a Layout Editor panel. | 27% |
| Staging Level | The staging level alone, a copy of the track diagram; hidden when the file loads. | 9% |
| Main Level | The main level alone, a copy of the track diagram; hidden when the file loads. | 7% |
| Upper Level | The upper level alone, a copy of the track diagram; hidden when the file loads. | 11% |
| Dispatcher System | A Layout Editor panel drawn by the Dispatcher System package. Parked. | parked |
Browse the tables
Here are the rows themselves, with their comments, for the tables that hold named objects. Pick a table, type to filter, and the list narrows to the rows that contain your text in any column.
How the pieces link
Each table points at the next by name, so a detector on the track ends up as a leg of a train's route. The figure follows the chain.
Start at the top. An occupancy sensor reports a train on the track. A layout block (the Layout Editor's view of a block) names that sensor, and a block of the same name joins its neighbours through paths. The file stores no paths: JMRI works them out from the Layout Editor panel when it loads the file. Several blocks can share one detector; since the hidden yard throats were dropped (November 2026) each yard track is one block on its own detector. 34 detectors are shared. That leaves 185 layout blocks on 146 detectors. On the main and upper levels each block's sensor is an internal one for now, since those levels have no detectors yet.
Here is the block for OS Switch 13, trimmed to the parts that matter:
<block>
<userName>OS Switch 13</userName>
<occupancysensor>BS Switch 13</occupancysensor>
</block>
The paths JMRI works out for it read as a sentence: from OS Switch 13 you can go to Track Barn when Switch 13 is closed, and to OS Switch 11 when it is thrown. Every block gets paths like these, and together they are the map.
Masts sit at block boundaries. Signal Mast Logic takes two masts and works out what lies between them from the Layout Editor, using those paths. Here is one destination, trimmed:
<signalmastlogic source="Mast 40LA">
<destinationMast destination="Mast 24L">
<enabled>yes</enabled>
<useLayoutEditor>yes</useLayoutEditor>
<useLayoutEditorTurnouts>yes</useLayoutEditorTurnouts>
<useLayoutEditorBlocks>yes</useLayoutEditorBlocks>
<associatedSection>Mast 40LA:Mast 24L</associatedSection>
</destinationMast>
</signalmastlogic>
The pair creates a section named "Mast 40LA:Mast 24L", which is why the Dispatcher's sections are named after masts. The Dispatcher chains sections into a transit, a whole move from one mast to another via the switches in between. Entry/Exit reuses the same pairs rather than inventing its own. Sections, transits and Entry/Exit are parked since the helix-join release (November 2026); the masts and pairs stay live.
Switches have a link of their own. This one reports its position through two sensors, one for each side, so JMRI can tell "thrown" from "not yet arrived":
<turnout feedback="TWOSENSOR"
sensor1="FB Switch 35 R"
sensor2="FB Switch 35 N">
<userName>Switch 35</userName>
</turnout>
Who writes what
build_tables.py writes the file from the device master and the template. Anything you do on screen in PanelPro, such as
renaming a mast, comes back into those sources when the Store is pulled. A few jobs are done by script, and each does one thing:
- The device master holds each device's public equipment name, which is what appears on this site.
- Another script places the masts and their heads.
- JMRI's own Discover tool finds the Signal Mast Logic pairs from the panel.
- Before the USS CTC machine was parked, a generator wrote its CTC data, including the 20 columns of code buttons.
- Validators check that names agree across the file, so a typo does not become a missing switch.
The scripts that edit the file directly run only with PanelPro and CATS closed. Discover is the exception: it runs inside a one-shot PanelPro, with no other JMRI session open, then stores and quits.
The LogixNGs
Two pieces of logic are little programs rather than tables of things. They are LogixNGs (JMRI's newer logic tool), both listed in the Initialization Table, which is why they run when the tables load. One hides windows; the other sets the main and upper block sensors and turnouts to a known state, described below the table.
"Hide windows on start" has three ConditionalNGs, each with one stock action:
| ConditionalNG | Stock action |
|---|---|
| Hide WiThrottle | Window Management: hides the WiThrottle window |
| Hide HART Railroad under CATS | Run Script: runs hide_cats_desk_windows.py |
| Hide the band panels | Run Script: runs hide_band_panels.py |
The two Run Script actions call ordinary Jython files, described among
the scripts. A LogixNG runs wherever the tables load, so it fires under both PanelPro
and CATS with no condition of its own. hide_cats_desk_windows.py does the checking: it looks at how JMRI was
started and at the open windows, and if CATS is not running it does nothing. hide_band_panels.py
waits for the three level windows to open, then hides them. A window action
ignores a window that is not there, so if one is missing, nothing happens.
The second LogixNG, "Main and upper block sensors clear on start", sets the 103 occupancy sensors of the main and upper blocks to clear when the tables load. Those levels have no detectors yet, so each block has an internal sensor of its own, and JMRI starts an internal sensor in an unknown state. A signal does not clear into a block whose state is unknown, so without this step every main and upper signal would show Stop. It also sets the 39 internal main and upper turnouts to their normal position, except Switches 227 and 229, which start thrown so the main route runs round the peninsula loop.
What is in the file
The file uses JMRI's standard format. The content is specific to this railroad: the names, the comments and the main and upper levels' internal turnouts. The data for the CTC lever machine is parked.
More: What we added to JMRI · How the signals work · LCOS and the Arduino bridge · Device viewer · Dispatcher guides · Bringing the Railroad Together · jmri.org