System 2 Route Processor & Animation Engine

Layout Automation — Worked Examples

Sample configurations for the Route Processor
Reference document · firmware V13 (2026)
Beta Document · Work in Progress This is a beta document and a work in progress. It may contain inaccuracies, incomplete sections, or details that change as the Route Processor firmware evolves. Treat the worked examples as illustrative guidance rather than a definitive specification, and verify behaviour against your own firmware version and layout before relying on it.

1. Introduction

The System 2 Route Processor is a CAN-bus based event-sequencer for model railways. It watches inputs from block-detection nodes, fires timed output sequences on servo and relay nodes, and gates each sequence on logical conditions over the live state of the bus.

This document walks through two fully-worked configurations that exercise most of the Route Processor's features:

Each example gives you the complete vPort numbering, block-group definitions, route configurations (mocked-up exactly as you will see them in the router's web interface), and a time-based walkthrough of what happens on the bus during a typical operating cycle.

Before you start Read section 3 once if you are new to the Route Processor — it covers the seven building blocks the worked examples use. After that you can dip into either example independently.

2. Hardware required

The Route Processor is the brain. Everything else — the block detectors, points, signals and brake relays — lives on other System 2 nodes that share the CAN bus. The following parts cover both worked examples in this document.

ProductQtyFunctionCapacity per board
S2-Route — Route Processor1The brain. Holds up to 100 routes, 32 block groups, runs the trigger / condition / chain / schedule engine.One per layout.
S2-IN32 — 32-input panel node1–2Block occupancy detection. Each input is one vPort that goes 1 when its track block is occupied, 0 when clear.32 inputs/board.
S2-serv8 — 8-channel servo driver2–3Drives point motors (one channel each) and semaphore signals (one channel each, with mechanical bounce on the up-quadrant swing).8 servos/board.
S2-Relay8 — 8-channel relay driver1–2Energises ABC brake sections. Coil de-energised = brake engaged (failsafe wiring). The relay's NO contact feeds the brake-section's DC offset.8 relays/board.
S2-Panel or S2-Mini (optional)0–1Operator console: physical buttons that act as trigger vPorts ("send the next train to road 4", "depart from road 4"). Not strictly required — the same triggers can be fired from the Route Processor's web page.Up to 32 buttons.
Tally — Mega Loop only 1 × S2-Route, 1 × S2-Mini Panel (4 of 8 inputs for the blocks), 1 × S2-serv8 (2 channels: 2 points), 1 × S2-Relay8 (2 channels: 2 ABC brakes). No signals and no panel buttons — Mega Loop is fully automatic.
Tally — Mega Sidings only 1 × S2-Route, 2 × S2-IN32 (48 inputs: 40 road blocks + 4 west mainline + 4 east mainline), 4 × S2-serv8 (32 channels: 14 points across two ladders + 2 home signals + 16 per-road starter signals), 1 × S2-Relay8 (8 channels: 8 brakes).

3. Concepts you will use

3.1 vPorts and blocks

A vPort is a numbered virtual address on the CAN bus. Inputs (block detectors) write 1 to a vPort when occupied and 0 when clear. Outputs (servos, relays) listen for writes to their vPort and animate accordingly. You pick the numbering — vPorts run 1–60000 and never collide unless you assign the same number to two physical channels.

Convention in this document:

This is just a convention; the firmware does not care.

3.2 Routes and slots

A route is a sequence of up to 16 timed vPort writes (the slots). Each slot specifies a vPort to write, the value to write (0 or 1), and a delay after the write before the next slot fires.

The route can have:

3.3 Block groups

A block group names a range of input vPorts. The group is OCCUPIED if any vPort in the range is set, CLEAR if every vPort is known and clear, UNKNOWN if none of them have been observed since boot. Up to 32 groups, configured on the Route Processor's Block Groups page.

Groups let route conditions ask "is South Yard occupied?" without having to list the 22 vPorts that make up the yard.

3.4 Conditions, schedules, chains, trigger-edge, defer TTL

Between the trigger and the slot sequence sit five gating features:

  1. ScheduleHH:MMHH:MM window in local time. Routes outside their window are dropped at trigger time.
  2. Conditions — up to 4 per route. Each tests a vPort or a block group against SET / CLEAR / UNKNOWN. Combined with AND or OR.
  3. Trigger edgerise (default; fire on enable vPort SET), fall (fire on enable vPort CLEAR — "train just left"), or both.
  4. On condition faildefer for N seconds while the bus state catches up, or drop immediately. Defer TTL is per route (default 5 s, range 1–60 s).
  5. Chain — on completion, fire route N. The chained target goes through its own gating, so the cascade is safe.

The route page also shows a dry-run preview: a client-side "what would happen now?" against the live block-group state. Use it while authoring — it'll catch off-by-one vPort numbers and condition typos without you having to send a real train.

3.5 Timed triggers (exact time & interval)

In addition to the enable, feedback and RFID triggers covered above, a route can fire itself on a clock without any input change at all. Two flavours, set on the same route alongside any other trigger:

Both timed triggers respect the schedule window (3.4): an interval timer that fires while the route is out of its window does not enqueue the sequence, and the interval clock pauses while the window is closed so it counts from the moment the window reopens instead of dropping back-logged fires.

Both triggers also respect conditions — you can build a "fire every 90 s, but only if South Yard is clear" sequence by combining the interval timer with a block-group condition. The condition is evaluated at fire time, not at the moment the timer is set, so the bus's current state always controls.

Fast-clock layouts Exact-time triggers match against your layout's clock, not the wall clock, when fast-clock mode is enabled — so "Open station" at 08:00 fires when the layout clock reads 08:00. But the once-a-day latch that stops it re-firing is cleared at real midnight, not layout midnight, so on a 10× fast clock the route still fires once per real day (the first time the layout clock passes 08:00), not on each of the ~10 layout days that elapse in 24 real hours.

One more caveat: schedule windows (3.4) are evaluated against real time, while fast-clock exact-time triggers use layout time. When fast-clock is running, don't combine a schedule window with an exact-time trigger on the same route — the two clocks disagree and the route can be gated out unexpectedly. (With fast-clock off, both use real time and compose correctly.)

3.6 Slot table layout (wide vs narrow)

The slot editor shows up to 16 slots per route. Two layouts are available, swappable from the top of the route page:

The preference is stored per-board, so the layout you set is what every browser session sees until you change it. The toggle animates between layouts so you can keep your eye on a slot while it moves.

3.7 Backup & restore (local file and cloud)

Once you've spent an evening dialling in delays and conditions, you do not want to lose them. The Route Processor keeps two independent backup paths:

Local file backup

The Backup button on the route editor downloads every route as a JSON file (<hostname>-routes-YYYY-MM-DD.json). The file is a complete, lossless snapshot — trigger gating, schedules, chains, timers, the lot. Save it somewhere safe (or check it into a layout-config git repo).

The Restore button reads the file back. Both the new .json format and older colon-string .txt backups are accepted — the browser converts legacy files on the fly. Routes are sent to the device in small batches so even a full 100-route restore is reliable and incremental: you can see "Sending 25 / 100 routes…" in the progress overlay rather than staring at a frozen page.

Cloud backup

If the router has been registered (one-time email/name handshake), the Cloud Backup link opens a panel showing every backup ever uploaded for this board. Locked backups are preserved indefinitely; unlocked backups rotate after five. From the same panel you can press Backup Now to push the current settings to the cloud, or pick any previous snapshot and Restore it.

The router also auto-backs-up after most settings changes and after every OTA firmware upgrade. The backup runs through your browser's TLS stack (not the device's), so big route sets ship reliably without making the board appear to freeze.

What a backup contains Routes, block groups, schedule windows, condition lists, chains, trigger edges, defer TTLs, exact-time and interval timers, and the basic device settings (protocol, MQTT, CAN ID, WiFi roaming). RFID tag tables and registration state are not in the backup — those are board-specific.

4. Worked example 1 — Mega Loop: a simple two-platform passing loop

4.1 Summary

What this example does

Mega Loop is a two-platform crossing station on a single-track main line. East-bound trains take Platform 1 (upper); west-bound trains take Platform 2 (lower). The system is fully automatic — no buttons, no operator, no manual controls. The Route Processor:

  • Throws the entry point so the arriving train is routed onto its correct platform.
  • Holds the train at the platform with an ABC brake section (relay-controlled DC offset). Brakes default to ENGAGED — a train that enters an empty platform always stops.
  • Refuses to release either brake until a train is standing in BOTH platforms. A train arriving alone simply waits until its counterpart arrives from the other direction.
  • Once both trains are in, throws the exit points (giving each train a clear path out), then drops both brakes simultaneously. The two trains glide out in opposite directions, passing each other through the loop.
  • Re-engages each brake as soon as its platform clears, ready for the next cycle.
  • Locks out the two approach routes while the trains are leaving, so a train departing back through its approach block is never mistaken for a new arrival — and can never throw the entry points under itself.

The interlock that makes it work is a single condition on the depart routes: the opposite platform detector must already read OCCUPIED. A second, internal flag (vP 500) guards the departure so the leaving trains aren't read as arrivals. Eight small routes and four block detectors are enough to run the whole station.

4.2 Track plan

The numbered circles are block detector vPorts (1–4). A single-track main line enters from the west, opens through the West points into a two-track loop, and recombines through the East points to continue east. Each platform has a 4–6 cm-long ABC brake section in the middle of its block.

Mega Loop · Track plan WEST EAST 1 West block · vP 1 West points vP 200 PLATFORM 1 ABC 2 Platform 1 · vP 2 · brake vP 400 ABC 4 Platform 2 · vP 4 · brake vP 401 PLATFORM 2 East points vP 201 3 East block · vP 3 n Block detector (vPort) Points (servo) ABC brake section (relay) Platform surface
Figure 1 · Mega Loop track plan. East-bound trains run upper through Platform 1; west-bound trains run lower through Platform 2. The ABC brake section in each platform holds the train until both platforms are occupied.
Approach distance Make the West and East mainline blocks long enough that the point servo (~1.5 s swing) finishes its throw before the locomotive reaches the points. Two or three loco-lengths is plenty at typical scale speeds.

4.3 Hardware tally

Four System 2 nodes share the CAN bus. Every part is off-the-shelf — no custom wiring, no operator panel.

NodeQtyChannels usedRole
S2-Route1The brain. Holds the eight routes and the interlock conditions.
S2-Mini Panel (8 inputs + 8 outputs)14 of 8 inputsBlock-occupancy detection on each of the four track sections. Eight spare outputs are available for future indicators or panel LEDs.
S2-serv8 (8-channel servo driver)12 of 8 servosDrives the West and East point motors.
S2-Relay8 (8-channel relay driver)12 of 8 relaysSwitches the ABC brake section feed for each platform.
Plenty of spare capacity Mega Loop uses only a tiny fraction of each board. Expand into a longer line, more loops, or signalling without adding hardware: 4 spare Mini Panel inputs, 8 spare Mini Panel outputs (handy for platform-occupied indicator LEDs), 6 spare servo channels, 6 spare relay channels.

4.4 vPort allocation

Block detectors get the low single-digit vPorts (matching the numbered circles on the track plan). Points and brake relays use the same numbering convention as elsewhere in this document (200s for points, 400s for brakes, 500s for internal interlock flags).

vPortFunctionDeviceSemantics
1Block 1 — West approachS2-Mini Panel1 = occupied, 0 = clear
2Block 2 — Platform 1 (upper, east-bound)S2-Mini Panel1 = occupied, 0 = clear
3Block 3 — East approachS2-Mini Panel1 = occupied, 0 = clear
4Block 4 — Platform 2 (lower, west-bound)S2-Mini Panel1 = occupied, 0 = clear
200West pointsS2-serv80 = routes to Platform 1 (upper), 1 = routes to Platform 2 (lower)
201East pointsS2-serv80 = routes to Platform 1 (upper), 1 = routes to Platform 2 (lower)
400Platform 1 ABC brake relayS2-Relay80 = brake ENGAGED (coil off, train stops), 1 = brake RELEASED
401Platform 2 ABC brake relayS2-Relay80 = brake ENGAGED, 1 = brake RELEASED
500Departure interlock (loop busy)— internal flag1 = a departure is in progress; 0 (and never-written = UNKNOWN) = idle. No hardware behind it — written by routes only, read as a condition by R1/R2.
Failsafe brake polarity Wire the relay so its de-energised state engages the brake (NC contact carries the DC offset). On boot, a comms glitch, or a board reset, every brake is on by default — trains stop, never run away. The routes only ever release brakes; nothing ever needs to "set safe".

4.5 Routes

Eight routes run the entire station. Every route is fired by a block-detector edge — there are no panel buttons, no operator inputs, no manual overrides. Two routes throw the entry points on arrival, two routes throw the exit points and release both brakes when the interlock is satisfied, two routes re-engage each brake after departure, and two routes clear the departure interlock once both trains are clear of the loop.

Route 3 (and its mirror Route 4) is where the interlock lives: the route is triggered when a train arrives at one platform, but its condition checks that the other platform is also occupied. If the other platform is empty, the route is deferred — it sits in the queue and re-evaluates every time the bus state changes. When the second train arrives the condition flips to TRUE and the depart sequence fires.

There is a second, subtler interlock at departure. The two approach detectors (vP 1 and vP 3) are shared: a train heading out of the loop crosses the very same block a train heading in would. A bare occupancy detector reports presence, not direction, so without a guard the departing trains would re-trigger the approach routes (R1/R2) and throw the entry points — potentially under the train still crossing them. The fix is an internal flag, vP 500 (“loop busy”): the depart routes set it as their first slot, R1/R2 carry a condition that lets them fire only while it is not set (on fail: drop), and two falling-edge routes (R7/R8) clear it once both trains have left the approach blocks. It is the same direction-memory technique used by the bi-directional platform in the next example.

One wrinkle worth calling out: an internal flag reads UNKNOWN until something first writes it, and — unlike a block detector — a hardware-less vPort can't be “seeded” by briefly occupying a block (see §9.3). A plain is CLEAR condition fails on UNKNOWN, which would drop R1/R2 on the very first arrival after every power-on. So R1/R2 test vP 500 is CLEAR OR is UNKNOWN (a two-condition OR): only a known-SET flag — a departure genuinely under way — suppresses them, and the station comes up working from a cold boot.

Here is Route 3 (the “EB train arrives last” case) shown in the router's web editor:

Route Editor · Route 3 — "Both ready (EB arrived last)"
Both ready (EB)
3
Route Default
Delay ms
Enable
vPort
Feedback
vPort
RFID
vPort
Route Name
3 500 2     Both ready (EB)
Triggered when EB train arrives at Platform 1; holds until Platform 2 also occupied.
SlotvPortOn/OffMoveDelay ms
1 500 🗑 0
2 200 🗑 1500
3 201 🗑 1500
4 400 🗑 500
5 401 🗑 0
… slots 6–16 empty
Dest Duplicate Clear Invert Save Routes Load Routes Del All
Trigger gating (applies to this route)
Conditions (1/4) AND on fail Defer 60 s Clear all
Trigger on enable vPort SET (default)
1. vPort 4 is SET ×
2. vPort   is SET ×
3. vPort   is SET ×
4. vPort   is SET ×
Chain: on completion, fire route       Schedule: enable --:----:--
Dry-run preview Re-evaluate
Would DEFER — condition 1 (vPort 4 is SET) currently fails; retry up to 60 s.

The dry-run preview shows the route would defer right now because Platform 2 is still empty in the live bus state. The route sits in the deferred queue (capacity 8) and re-evaluates whenever any vPort changes — the moment the west-bound train rolls into Platform 2, the condition flips to SET and the slots fire.

All eight routes — compact summary

Each route has 1–5 slots and (where applicable) one or two conditions. There are no chains, no schedules, no feedback or RFID vPorts — the bus state is the only input.

#NameEnable vPEdgeConditionDefer TTLSlots (vP = val, delay ms)
1EB approach — set West points 1SETvP 500 is CLEAR or UNKNOWNdrop 200 = 0, 1500
2WB approach — set East points 3SETvP 500 is CLEAR or UNKNOWNdrop 201 = 1, 1500
3Both ready (EB arrived last) 2SETvP 4 is SET60 s 500 = 1, 0 · 200 = 1, 1500 · 201 = 0, 1500 · 400 = 1, 500 · 401 = 1, 0
4Both ready (WB arrived last) 4SETvP 2 is SET60 s 500 = 1, 0 · 200 = 1, 1500 · 201 = 0, 1500 · 400 = 1, 500 · 401 = 1, 0
5EB departed — re-arm brake 2CLEAR 400 = 0, 0
6WB departed — re-arm brake 4CLEAR 401 = 0, 0
7Departure complete — clear interlock 1CLEARvP 3 is CLEARdrop 500 = 0, 0
8Departure complete — clear interlock (mirror) 3CLEARvP 1 is CLEARdrop 500 = 0, 0
Why two "both ready" routes? Each platform's occupied edge needs its own trigger row. Whichever train arrives second fires its route directly (condition already true); the route that fired earlier has either timed out or is sitting deferred (it'll re-fire on the second train's arrival as a harmless duplicate — setting points that are already in position and releasing brakes that are already released are both no-ops).

4.6 Sequence walkthrough

A complete cycle from idle, through both trains arriving in opposite orders, the simultaneous departure, and back to idle. Initial state: both platforms empty, both brakes engaged (vP 400 = 0, vP 401 = 0), points wherever they were last left.

TimeEventRoute firedResult on the bus
t=0WB train enters East block (vP 3 SET)R2 “WB approach”Interlock not raised (vP 500 reads UNKNOWN on a cold start, CLEAR thereafter — either way R2's guard passes), so R2 runs: East points throw to lower (vP 201 = 1). Servo settles in 1.5 s.
t≈4WB train rolls past East points into Platform 2 (vP 4 SET)R4 “Both ready (WB)” fires → defersCondition vP 2 is SET fails (Platform 1 still empty). Route enters deferred queue with 60 s TTL.
t≈5Brake engaged (was already on); WB train coasts to a stop in the brake section.
t≈12EB train enters West block (vP 1 SET)R1 “EB approach”Interlock still down, so R1 runs: West points throw to upper (vP 200 = 0). Servo settles.
t≈16EB train rolls past West points into Platform 1 (vP 2 SET)R3 “Both ready (EB)” fires; deferred R4 also re-evaluates.R3 condition vP 4 is SET now passes. Slot sequence begins.
t≈16.0R3 slot 1: raise the departure interlockR3vP 500 = 1. The loop is now “busy”; R1 and R2 are suppressed until it clears.
t≈16.0R3 slot 2: West points throw to lowerR3vP 200 = 1. Servo swings 1.5 s (clears the path for WB to depart west).
t≈17.5R3 slot 3: East points throw to upperR3vP 201 = 0. Servo swings 1.5 s (clears the path for EB to depart east).
t≈19.0R3 slot 4: Platform 1 brake releasedR3vP 400 = 1. Relay clicks. EB loco starts to accelerate.
t≈19.5R3 slot 5: Platform 2 brake releasedR3vP 401 = 1. WB loco starts to accelerate. Both trains glide out simultaneously.
t≈22EB train clears Platform 1 (vP 2 CLEAR)R5 “EB departed”vP 400 = 0. Platform 1 brake re-armed for the next cycle.
t≈23WB train clears Platform 2 (vP 4 CLEAR)R6 “WB departed”vP 401 = 0. Platform 2 brake re-armed.
t≈23.5Departing EB train rolls east into the East block (vP 3 SET)R2 evaluated → droppedWithout the guard this would read as a fresh WB arrival. Condition vP 500 is CLEAR fails, so R2 is dropped — the East points are left exactly where the depart sequence set them.
t≈24Departing WB train rolls west into the West block (vP 1 SET)R1 evaluated → droppedThe mirror case: vP 500 is CLEAR fails, so R1 is dropped. The West points stay at lower (vP 200 = 1) — never thrown under the train still crossing them.
t≈25.5EB train clears the East block (vP 3 CLEAR)R8 evaluated → holdsCondition vP 1 is CLEAR still fails (WB not yet clear of the West block), so the interlock stays up.
t≈26WB train clears the West block (vP 1 CLEAR)R7 “Departure complete”Condition vP 3 is CLEAR now passes. vP 500 = 0 — interlock dropped, R1/R2 re-armed.
t≈26Both trains have left the loop; the interlock is clear.System idle, ready for the next pair of trains.
Order-of-arrival doesn't matter The walkthrough has WB arriving first and EB second — reverse it and the only difference is which of R3 or R4 fires the depart sequence. Both routes produce the same outcome, so the station behaves identically whichever train shows up first.
What if only one train ever turns up? By design, the lone train sits in its platform with the brake on indefinitely. The deferred “Both ready” route times out after 60 s and is dropped; the brake stays engaged because nothing else writes to it. This is the requested behaviour: trains cannot pass until both are in the platforms. To unstick a stranded loco, just send the other train.

4.7 Variants and tuning notes

5. Worked example 2 — Bi-Directional Platform: a three-platform station with a shared middle road

5.1 Summary & introduction

What this example does

A three-platform through-station where Platform 1 serves only east-bound traffic, Platform 3 serves only west-bound traffic, and the middle Platform 2 is bi-directional — it can be used by a train heading in either direction. The operator picks the platform; the router enforces the interlock that makes the shared platform safe.

  • Each end of the station has a three-way throat built from two points, driven by an S2-serv8.
  • Each platform has its own block detector and ABC brake section, so the train always stops on the same spot regardless of which way it came in.
  • Two internal direction-flag vPorts (no hardware behind them) record whether Platform 2 is currently reserved for an east-bound or a west-bound move. Routes refuse to set up a counter-direction approach while the flag is held.
  • Departure routes check that the matching direction flag is set and the outbound main-line approach is clear, so a train can never be released into oncoming traffic.

Why have a bi-directional platform?

A bi-directional middle platform doubles the station's effective capacity without doubling its footprint. Common reasons to design one in:

How the Route Processor helps

Bi-directional working is the classic case where manual interlocking gets you into trouble. The router solves three problems for you:

5.2 Track plan

The single-track main line enters from each end and fans out through a two-point ladder (one S2-serv8 channel per point). Each platform has its own block detector and an ABC brake section centred on the platform. Direction arrows show single-direction running on P1 (east-bound only) and P3 (west-bound only); the middle Platform 2 is bi-directional.

Bi-Directional Platform · Track plan WEST EAST 10 West approach · vP 10 W-A vP 220 W-B vP 221 PLATFORM 1 · EAST-BOUND ONLY ABC brake 11 P1 · vP 11 · brake vP 420 PLATFORM 2 · BI-DIRECTIONAL ABC brake 12 P2 · vP 12 · brake vP 421 ABC brake 13 P3 · vP 13 · brake vP 422 PLATFORM 3 · WEST-BOUND ONLY E-A vP 222 E-B vP 223 14 East approach · vP 14 n Block detector (vPort) Servo point (vPort) ABC brake section (relay) Platform surface
Figure 2 · Bi-Directional Platform track plan. The single-track main line enters from each end and fans out through a two-point throat (one S2-serv8 channel per point) to three platforms. Platform 2 is shared between east-bound and west-bound traffic; arrows on P1 and P3 show their fixed direction of travel.
Why two points per throat, not three? Three destinations from one input always need exactly two points in series. The first point (W-A or E-A) chooses between “upper platform” and “everything else”; the second point (W-B or E-B) splits the rest into “middle” vs “lower”. The four servos and four vPorts (220–223) make the entire trackwork.

5.3 Hardware tally

One Route Processor, one Mini Panel (block detection plus four operator buttons), one S2-serv8 driving all four point motors, and one S2-Relay8 driving the three ABC brake sections. Eight CAN nodes from the System 2 family share the bus; nothing more is needed.

NodeQtyChannels usedRole
S2-Route1The brain. Holds the 13 routes, the two direction-flag vPorts and the interlock conditions.
S2-Mini Panel (8 inputs + 8 outputs)15 of 8 inputs, 8 of 8 outputs (optional)5 block detectors (West approach, P1, P2, P3, East approach). 8 outputs can drive panel LEDs for “platform occupied” / “P2 EB-locked” / “P2 WB-locked”.
S2-Panel (32 buttons)18 of 32 inputs4 “send-to” buttons (EB→P1, EB→P2, WB→P3, WB→P2) plus 4 “depart” buttons. The same triggers can be fired from the router's web page if you don't want a hardware console.
S2-serv8 (8-channel servo driver)14 of 8 servosDrives the four point motors: W-A, W-B, E-A, E-B.
S2-Relay8 (8-channel relay driver)13 of 8 relaysSwitches the ABC brake-section feed for each of the three platforms.
Plenty of spare capacity 3 spare Mini Panel inputs, 24 spare panel buttons, 4 spare servo channels (enough for two more 3-way throats), 5 spare relay channels. Add a head-shunt, a fourth platform or a goods loop without buying more hardware.

5.4 vPort allocation

Block detectors keep the single-digit/teens vPorts to mirror the numbered circles on the track plan. Points use the 220s, brake relays the 420s, and the two internal direction flags sit in the 500s. Operator buttons follow the document's convention in the 3000s.

vPortFunctionDeviceSemantics
10Block 10 — West approachS2-Mini Panel1 = occupied, 0 = clear
11Block 11 — Platform 1 (EB only)S2-Mini Panel1 = occupied, 0 = clear
12Block 12 — Platform 2 (bi-directional)S2-Mini Panel1 = occupied, 0 = clear
13Block 13 — Platform 3 (WB only)S2-Mini Panel1 = occupied, 0 = clear
14Block 14 — East approachS2-Mini Panel1 = occupied, 0 = clear
220W-A point (West throat, upper)S2-serv80 = through (toward W-B), 1 = diverge UP to P1
221W-B point (West throat, lower)S2-serv80 = straight (toward P2), 1 = diverge DOWN to P3
222E-A point (East throat, upper)S2-serv80 = through (toward E-B), 1 = diverge UP to P1
223E-B point (East throat, lower)S2-serv80 = straight (toward P2), 1 = diverge DOWN to P3
420P1 ABC brake relayS2-Relay80 = brake ENGAGED (coil off, train stops), 1 = brake RELEASED
421P2 ABC brake relayS2-Relay80 = brake ENGAGED, 1 = brake RELEASED
422P3 ABC brake relayS2-Relay80 = brake ENGAGED, 1 = brake RELEASED
500Internal flag — P2 reserved for east-bound(none — router state)1 = an EB train is in or approaching P2; cleared on departure or when P2 next reads CLEAR.
501Internal flag — P2 reserved for west-bound(none — router state)1 = a WB train is in or approaching P2; cleared on departure or when P2 next reads CLEAR.
3000Panel button — “Send EB to P1”S2-PanelRising edge fires R1.
3001Panel button — “Send EB to P2”S2-PanelRising edge fires R2 (blocked if P2 is reserved for WB).
3002Panel button — “Send WB to P3”S2-PanelRising edge fires R3.
3003Panel button — “Send WB to P2”S2-PanelRising edge fires R4 (blocked if P2 is reserved for EB).
3010Panel button — “Depart P1 east”S2-PanelRising edge fires R10.
3011Panel button — “Depart P2 east”S2-PanelRising edge fires R11 (requires vP 500 SET).
3012Panel button — “Depart P3 west”S2-PanelRising edge fires R12.
3013Panel button — “Depart P2 west”S2-PanelRising edge fires R13 (requires vP 501 SET).
Internal flag vPorts vP 500 and vP 501 are not bound to any hardware. The router keeps the last-known value of every vPort it has seen written, so a route can write to vP 500 and any later route can read it as a condition. This gives you free interlock state with no extra board, no extra wiring. The same trick is used in §6.7 for the fiddle-yard's sail-through override.
Failsafe brake polarity As in Mega Loop, the relay is wired so its de-energised state engages the brake. On boot, a comms glitch, or a board reset, all three brakes are on by default and any train in a platform stays put. Routes only ever release brakes — nothing has to “set safe”.

5.5 The direction interlock

The interlock that makes the shared platform safe lives on the two P2 approach routes (R2 and R4) and the two P2 departure routes (R11 and R13). Here is Route 2 (“Send EB to P2”) shown in the router's web editor — the route that throws the West throat for an east-bound train heading into the middle platform.

Route Editor · Route 2 — “Send EB to P2”
Send EB to P2
2
Route Default
Delay ms
Enable
vPort
Feedback
vPort
RFID
vPort
Route Name
2 500 3001     Send EB to P2
Fired by the “Send EB to P2” panel button (vP 3001); refused while P2 is reserved for a west-bound move.
SlotvPortOn/OffMoveDelay ms
1 220 🗑 1500
2 221 🗑 1500
3 500 🗑 0
… slots 4–16 empty
Dest Duplicate Clear Invert Save Routes Load Routes Del All
Trigger gating (applies to this route)
Conditions (2/4) AND on fail Drop 5 s Clear all
Trigger on enable vPort SET (default)
1. vPort 12 is CLEAR ×
2. vPort 501 is CLEAR ×
3. vPort   is SET ×
4. vPort   is SET ×
Chain: on completion, fire route       Schedule: enable --:----:--
Dry-run preview Re-evaluate
Would FIRE — AND of 2 conditions.
vPort 12 CLEAR
vPort 501 CLEAR

Three slots, two conditions, one button. Slot 1 sets W-A through (so the train rolls past it without being diverted to P1). Slot 2 sets W-B straight (so the train continues into P2 rather than diverging down to P3). Slot 3 writes vP 500 = 1 — the “P2 is EB” flag — with zero delay because it's the last action of the route.

The conditions are the interesting bit. Both must be true for the slots to fire:

The On condition fail = Drop setting is deliberate: if the operator presses the button at the wrong moment we want the action dropped immediately with a status-log line. Defer would invite a stale press to fire seconds later when the original intent is gone. The status log gets Route 2 dropped: condition 2 (vPort 501 is CLEAR) failed — the operator sees instantly why nothing happened.

Why “Drop” instead of “Defer”? The fiddle-yard's reception routes use Defer because the operator is queuing a future intent (“send the next train when this road is clear”). The bi-directional reception routes use Drop because the press is an immediate command (“this train, this platform, now”). Tune the gating mode to match the operator's mental model.

5.6 All routes — compact summary

Thirteen routes run the whole station: four reception (R1–R4), three brake re-arm (R5–R7) and six departure (R10–R13 plus two mirrored brake re-arms). Numbering is grouped by purpose with gaps so you can insert a starter-signal route per platform later without renumbering.

#NameEnable vPEdgeConditionsDefer TTLSlots (vP = val, delay ms)
1Send EB to P1 3000SET vP 11 is CLEAR Drop 220 = 1, 1500 · 221 = 0, 0
2Send EB to P2 3001SET vP 12 is CLEAR AND vP 501 is CLEAR Drop 220 = 0, 1500 · 221 = 0, 1500 · 500 = 1, 0
3Send WB to P3 3002SET vP 13 is CLEAR Drop 222 = 0, 1500 · 223 = 1, 0
4Send WB to P2 3003SET vP 12 is CLEAR AND vP 500 is CLEAR Drop 222 = 0, 1500 · 223 = 0, 1500 · 501 = 1, 0
5P1 cleared — re-arm brake 11CLEAR 420 = 0, 0
6P2 cleared — re-arm brake & clear flags 12CLEAR 421 = 0, 100 · 500 = 0, 0 · 501 = 0, 0
7P3 cleared — re-arm brake 13CLEAR 422 = 0, 0
10Depart P1 east 3010SET vP 11 is SET AND vP 14 is CLEAR Drop 222 = 1, 1500 · 420 = 1, 0
11Depart P2 east 3011SET vP 12 is SET AND vP 500 is SET AND vP 14 is CLEAR Drop 222 = 0, 1500 · 223 = 0, 1500 · 421 = 1, 0
12Depart P3 west 3012SET vP 13 is SET AND vP 10 is CLEAR Drop 220 = 0, 1500 · 221 = 1, 1500 · 422 = 1, 0
13Depart P2 west 3013SET vP 12 is SET AND vP 501 is SET AND vP 10 is CLEAR Drop 220 = 0, 1500 · 221 = 0, 1500 · 421 = 1, 0
Two flag-clears in R6, deliberately R6 fires on the FALLING edge of vP 12 (Platform 2 just cleared). At that moment we don't know whether the train left east or west, so the route blanks both direction flags. The departure route (R11 or R13) already cleared the correct flag on the way out, so the second write is a harmless no-op — but it also catches manual moves (operator shunts a loco through P2 by hand) and resets the flags from any leftover state. Belt-and-braces.

5.7 Sequence walkthrough

An east-bound parcels train is routed into P2 (the middle road). While it sits there a west-bound stopper arrives and is correctly diverted to P3 because P2 is locked east-bound. Both trains depart, P2 clears, and the station resets. Status-log lines shown verbatim where the router emits them.

TimeEventRoute firedResult on the bus / status log
t=0.0EB parcels enters West approach (vP 10 SET). Operator presses “Send EB to P2” (vP 3001).R2 “Send EB to P2”Route 2: P2 free and not WB-locked — throwing throat for east-bound to P2.
t=0.0R2 slot 1: W-A through. 1.5 s wait.R2vP 220 = 0. Servo swings.
t=1.5R2 slot 2: W-B straight. 1.5 s wait.R2vP 221 = 0. Servo swings.
t=3.0R2 slot 3: P2 EB flag SET.R2vP 500 = 1. Status log: P2 reserved EB.
t≈8EB parcels rolls past W-B into Platform 2 (vP 12 SET). ABC brake already engaged from boot; loco coasts to a stop on the brake section, dead-centre of P2.
t≈30WB stopper enters East approach (vP 14 SET). Operator presses “Send WB to P2” (vP 3003).R4 attempts to fireRoute 4 dropped: condition 2 (vPort 500 is CLEAR) failed.
t≈31Operator sees the diagnostic, presses “Send WB to P3” (vP 3002) instead.R3 “Send WB to P3”Route 3: P3 free — throwing throat for west-bound to P3.
t=31R3 slot 1: E-A through. 1.5 s.R3vP 222 = 0.
t=32.5R3 slot 2: E-B diverge down.R3vP 223 = 1.
t≈38WB stopper rolls into P3 (vP 13 SET). Brake holds it on the brake section.
— both trains parked, station is full —
t=120Operator dispatches the parcels east: “Depart P2 east” (vP 3011).R11 “Depart P2 east”Route 11: P2 EB and east approach clear — releasing east-bound from P2.
t=120R11 slot 1: E-A through. 1.5 s.R11vP 222 = 0.
t=121.5R11 slot 2: E-B straight. 1.5 s.R11vP 223 = 0.
t=123R11 slot 3: P2 brake released. Parcels accelerates east.R11vP 421 = 1.
t≈128Parcels clears P2 (vP 12 CLEAR). R6 fires.R6 “P2 cleared”vP 421 = 0 (brake re-armed); vP 500 = 0; vP 501 = 0. Status log: P2 cleared — flags reset.
t≈145Operator dispatches the stopper west: “Depart P3 west” (vP 3012).R12 “Depart P3 west”West throat thrown for P3 exit, P3 brake released.
t≈152Stopper clears P3. R7 re-arms P3 brake.R7vP 422 = 0.
t≈160Both trains have cleared the approach blocks. Station idle, P2 free for the next move from either direction.
What the interlock actually prevents Without R2/R4's direction-flag condition, the operator could press “Send WB to P2” at t≈30 and the router would happily throw E-A and E-B for a west-bound entry. The condition vP 12 is CLEAR wouldn't catch it because the EB train hasn't reached P2 yet (it's still on the approach at t≈1–5). Two trains would converge on the same platform from opposite directions. The flag vPort closes exactly this race.

5.8 Variants and tuning notes

6. Worked example 3 — Mega Sidings: an 8-road through fiddle yard

6.1 Summary

What this example does

Mega Sidings is an 8-road through fiddle yard with a mainline entering at each end: 8 parallel roads, 5 detection blocks each, accessed through a matching points ladder at both the west and east ends. Trains can:

  • Enter from either end, be routed (operator pick) to a specific empty road, and either roll through to the other end OR stop and park.
  • Be held mid-road by an ABC brake section in the middle block — the train stops at exactly the right spot every time, irrespective of which direction it arrived from.
  • Depart on operator command (or on a schedule) to either end: brake releases, the appropriate starter signal clears, the appropriate ladder folds out, the train rolls away.

The brake-release-on-departure is the same primitive used in the passing loop, but applied per-road. We'll add the option of disabling the brake when the next train is cleared to leave — useful when a non-stop train should sail through the yard from one mainline to the other.

6.2 Track plan

The points-ladder is a binary tree: three "levels" of points get any incoming train onto one of eight roads with three servo movements. Buffer ends are on the far right. The last block on each road has an ABC brake section.

Mega Sidings · 8-road through fiddle yard West mainline (4 approach blocks) W1 1001 W2 1002 W3 1003 W4 1004 W Home vP 2100 P1L 2000 P2La 2001 P2Lb 2002 P3La 2003 P3Lb 2004 P3Lc 2005 P3Ld 2006 R1 B1 1101 B2 1102 B3 · brake 1103 / 2200 ABC B4 1104 B5 1105 2101 2111 R2 B1 1201 B2 1202 B3 · brake 1203 / 2201 ABC B4 1204 B5 1205 2102 2112 R3 B1 1301 B2 1302 B3 · brake 1303 / 2202 ABC B4 1304 B5 1305 2103 2113 R4 B1 1401 B2 1402 B3 · brake 1403 / 2203 ABC B4 1404 B5 1405 2104 2114 R5 B1 1501 B2 1502 B3 · brake 1503 / 2204 ABC B4 1504 B5 1505 2105 2115 R6 B1 1601 B2 1602 B3 · brake 1603 / 2205 ABC B4 1604 B5 1605 2106 2116 R7 B1 1701 B2 1702 B3 · brake 1703 / 2206 ABC B4 1704 B5 1705 2107 2117 R8 B1 1801 B2 1802 B3 · brake 1803 / 2207 ABC B4 1804 B5 1805 2108 2118 P3Ra 2013 P3Rb 2014 P3Rc 2015 P3Rd 2016 P2Ra 2011 P2Rb 2012 P1R 2010 E Home vP 2110 East mainline (4 approach blocks) E4 1008 E3 1007 E2 1006 E1 1005 ABC brake section (middle block B3 of each road) Points motor Semaphore signal (per road, per direction)
Figure 3 · Mega Sidings — 8-road through fiddle yard. 8 parallel roads, 5 blocks each (B1–B5), with the middle block (B3) carrying an ABC brake section. Two binary-tree ladders mirror each other — a train can be routed in/out from either end with three point throws. Each road has TWO starter signals: a west-facing one for departures to the west, an east-facing one for departures to the east.

6.3 Hardware tally

NodeQtyChannels used
S2-Route1The brain.
S2-IN32 (block detection)248 inputs: 4 west mainline + 4 east mainline + 40 road blocks. First board covers mainlines + roads 1–5; second covers roads 6–8 plus 11 spare.
S2-serv8 (points, west ladder)17 servos for the 7 west-ladder points (P1L, P2La, P2Lb, P3La, P3Lb, P3Lc, P3Ld) + 1 spare for the west home signal.
S2-serv8 (points, east ladder)17 servos for the east-ladder points (P1R, P2Ra, P2Rb, P3Ra–d) + 1 spare for the east home signal.
S2-serv8 (starter signals)216 servos for the per-road starter signals (8 west-facing + 8 east-facing).
S2-Relay8 (ABC brakes)18 relays: one per road. Brake section sits in the middle block (B3) so the train can stop here whether arriving from the west or the east.
S2-Panel (optional)0–1Operator console: 32 buttons (8 receive-from-west, 8 receive-from-east, 8 depart-to-west, 8 depart-to-east) plus one "override brake" latch.

6.4 vPort allocation

vPortFunctionDevice
1001–1004West mainline approach blocks W1–W4 (W1 = far, W4 = at west home signal)S2-IN32 #1
1005–1008East mainline approach blocks E1–E4 (E1 = at east home signal, E4 = far)S2-IN32 #1
1101–1105Road 1 blocks B1–B5 (B1 = west end, B3 = brake section, B5 = east end)S2-IN32 #1
1201–1205Road 2 blocksS2-IN32 #1
1301–1305Road 3 blocksS2-IN32 #1
1401–1405Road 4 blocksS2-IN32 #1
1501–1505Road 5 blocksS2-IN32 #1 (33 inputs used)
1601–1605Road 6 blocksS2-IN32 #2
1701–1705Road 7 blocksS2-IN32 #2
1801–1805Road 8 blocksS2-IN32 #2
2000West ladder P1L (Roads 1–4 vs 5–8)S2-serv8 #1 ch 1
2001P2La (Roads 1–2 vs 3–4)S2-serv8 #1 ch 2
2002P2Lb (Roads 5–6 vs 7–8)S2-serv8 #1 ch 3
2003–2006P3La–P3Ld (final pair-selectors west ladder)S2-serv8 #1 ch 4–7
2010East ladder P1R (Roads 1–4 vs 5–8)S2-serv8 #2 ch 1
2011P2Ra (Roads 1–2 vs 3–4)S2-serv8 #2 ch 2
2012P2Rb (Roads 5–6 vs 7–8)S2-serv8 #2 ch 3
2013–2016P3Ra–P3Rd (final pair-selectors east ladder)S2-serv8 #2 ch 4–7
2100West home signal (protects the west throat; faces eastbound trains entering)S2-serv8 #1 ch 8
2110East home signal (protects the east throat; faces westbound trains entering)S2-serv8 #2 ch 8
2101–2108West-facing starter signals Road N (allows train on Road N to depart westward; one per road)S2-serv8 #3 ch 1–8
2111–2118East-facing starter signals Road N (allows train on Road N to depart eastward; one per road)S2-serv8 #4 ch 1–8
2200–2207Road N brake relay (B3 ABC brake section)S2-Relay8 ch 1–8
3010–3017Operator button "Receive from west into Road N"Panel button OR web UI
3018–3025Operator button "Receive from east into Road N"Panel button OR web UI
3030–3037Operator button "Depart from Road N to the west"Panel button OR web UI
3038–3045Operator button "Depart from Road N to the east"Panel button OR web UI
3050"Disable brake on next departure" override togglePanel button (latching)

Each "into / out of Road N" requires three points thrown on the relevant ladder. The binary index of the road, mapped to (P1, P2L/P2R, P3a/b/c/d), is identical for the west and east sides — same bit pattern, different physical servos.

RoadP1P2(a)P2(b)P3aP3bP3cP3d
Road 1000
Road 2001
Road 3010
Road 4011
Road 5100
Road 6101
Road 7110
Road 8111
Symmetric ladders The bit-pattern table applies to BOTH the west and east ladders. When routing into Road 4 from the west, throw P1L=0, P2La=1, P3Lb=1. When routing into Road 4 from the east, throw P1R=0, P2Ra=1, P3Rb=1. The vPort numbers differ but the operator-facing logic is the same.

6.5 Block groups

Ten groups: one per road plus one for each mainline approach. The mainline-approach groups are dual-purpose — "is there a train waiting to come in?" (SET test) and "is the path clear for departure?" (CLEAR test).

Block Groups page (router web UI)
#NameRangeStatus
1West Approach1001–1004● CLEARedit
2East Approach1005–1008● CLEARedit
3Road 11101–1105◐ OCCUP.edit
4Road 21201–1205● CLEARedit
5Road 31301–1305◐ OCCUP.edit
6Road 41401–1405● CLEARedit
7Road 51501–1505● CLEARedit
8Road 61601–1605◐ OCCUP.edit
9Road 71701–1705● CLEARedit
10Road 81801–1805● CLEARedit
Add Block Group Refresh

6.6 Routes

With symmetric entry/exit there are five route classes per road:

  1. Receive from west — throw the west ladder to road N, clear west home signal.
  2. Receive from east — throw the east ladder to road N, clear east home signal.
  3. Auto-brake on arrival at mid-block — engage brake relay when the train hits B3 (works for arrivals from either direction).
  4. Depart to west — throw west ladder, clear west-facing starter, release brake.
  5. Depart to east — throw east ladder, clear east-facing starter, release brake.

That's 5 × 8 = 40 routes for the basic yard, well under the 100-route limit. We'll detail the Road 1 set; copy the pattern for roads 2–8 with the substitution table below.

Route 1 — "Receive from west into Road 1"

Operator presses the "Receive from west into Road 1" panel button (vP 3010). Conditions check that Road 1 is empty and the west approach actually has a train waiting. Slots throw the three west-ladder points to route into Road 1, then clear the west home signal.

Route Editor · Route 1
Receive from west to R1
1
Route Default
Delay ms
Enable
vPort
Feedback
vPort
RFID
vPort
Route Name
1 2000 3010     Receive from west to R1
Set west ladder for Road 1; clear west home signal.
SlotvPortOn/OffMoveDelay ms
1 2000 🗑 2000
2 2001 🗑 2000
3 2003 🗑 2000
4 2100 🗑 100
5   🗑  
… slots 6–16 empty
Dest Duplicate Clear Invert Save Routes Load Routes Del All
Trigger gating (applies to this route)
Conditions (2/4) AND on fail Defer 10 s Clear all
Trigger on enable vPort SET (default)
1. Group 3 is CLEAR ×
2. Group 1 is SET ×
3. vPort   is SET ×
4. vPort   is SET ×
Chain: on completion, fire route       Schedule: enable --:----:--
Dry-run preview Re-evaluate
Would FIRE — AND of 2 conditions.
Group 3 CLEAR
Group 1 SET

Route 2 — "Receive from east into Road 1"

Mirror of R1, but for an eastbound train arriving at the east throat. Uses the east-ladder points (P1R, P2Ra, P3Ra) and the east home signal.

Route Editor · Route 2
Receive from east to R1
2
Route Default
Delay ms
Enable
vPort
Feedback
vPort
RFID
vPort
Route Name
2 2000 3018     Receive from east to R1
Set east ladder for Road 1; clear east home signal. Mirror of R1.
SlotvPortOn/OffMoveDelay ms
1 2010 🗑 2000
2 2011 🗑 2000
3 2013 🗑 2000
4 2110 🗑 100
5   🗑  
… slots 6–16 empty
Dest Duplicate Clear Invert Save Routes Load Routes Del All
Trigger gating (applies to this route)
Conditions (2/4) AND on fail Defer 10 s Clear all
Trigger on enable vPort SET (default)
1. Group 3 is CLEAR ×
2. Group 2 is SET ×
3. vPort   is SET ×
4. vPort   is SET ×
Chain: on completion, fire route       Schedule: enable --:----:--
Dry-run preview Re-evaluate
Would FIRE — AND of 2 conditions.
Group 3 CLEAR
Group 2 SET

Route 3 — "Train at B3, engage brake"

Auto-fires when the middle block of Road 1 (B3 = vP 1103) goes SET. The brake snaps on, stopping the train mid-road. Direction-agnostic: works whether the train arrived from the west or the east, because B3 is detected the same way either way.

Both home signals are stamped back to RED — the throat is no longer "cleared" for this incoming train, so neither side accidentally accepts another arrival down the same road.

Route Editor · Route 3
R1 brake on at B3
3
Route Default
Delay ms
Enable
vPort
Feedback
vPort
RFID
vPort
Route Name
3 100 1103     R1 brake on at B3
Fires when block 1103 (Road 1 / B3, the ABC section) goes SET — train just arrived. Direction-agnostic: works whether the train came from west or east.
SlotvPortOn/OffMoveDelay ms
1 2200 🗑 100
2 2100 🗑 100
3 2110 🗑 100
4   🗑  
… slots 5–16 empty
Dest Duplicate Clear Invert Save Routes Load Routes Del All
Trigger gating (applies to this route)
Conditions (0/4) AND on fail Defer 5 s Clear all
Trigger on enable vPort SET (default)
1. vPort   is SET ×
2. vPort   is SET ×
3. vPort   is SET ×
4. vPort   is SET ×
Chain: on completion, fire route       Schedule: enable --:----:--
Dry-run preview Re-evaluate
Would FIRE — AND of 0 conditions.

Route 4 — "Depart from Road 1 to the west"

Operator presses "Depart Road 1 westbound" (vP 3030). Conditions: a train must be present on Road 1 (group SET) and the west approach must be clear (no incoming train using the throat). Slots throw the west ladder back out to Road 1, clear the west-facing starter signal, release the brake.

Route Editor · Route 4
R1 depart westbound
4
Route Default
Delay ms
Enable
vPort
Feedback
vPort
RFID
vPort
Route Name
4 2000 3030     R1 depart westbound
West ladder + west-facing starter + brake release. Train rolls out westbound.
SlotvPortOn/OffMoveDelay ms
1 2000 🗑 2000
2 2001 🗑 2000
3 2003 🗑 2000
4 2101 🗑 2000
5 2200 🗑 100
6   🗑  
… slots 7–16 empty
Dest Duplicate Clear Invert Save Routes Load Routes Del All
Trigger gating (applies to this route)
Conditions (2/4) AND on fail Defer 10 s Clear all
Trigger on enable vPort SET (default)
1. Group 3 is SET ×
2. Group 1 is CLEAR ×
3. vPort   is SET ×
4. vPort   is SET ×
Chain: on completion, fire route       Schedule: enable --:----:--
Dry-run preview Re-evaluate
Would FIRE — AND of 2 conditions.
Group 3 SET
Group 1 CLEAR

Route 5 — "Depart from Road 1 to the east"

Mirror of R4 for an eastbound departure. Uses the east ladder and the east-facing starter signal.

Replicating for Roads 2–8

Same five routes per road (40 routes total for the basic yard), with these substitutions for road N:

What changesRoad 1 (template)Road N (substitution)
Arrival button (from west)30103010 + (N−1)
Arrival button (from east)30183018 + (N−1)
Departure button (to west)30303030 + (N−1)
Departure button (to east)30383038 + (N−1)
Mid-block (B3, engage brake trigger)1103(1000 + N×100) + 3
West-facing starter21012101 + (N−1)
East-facing starter21112111 + (N−1)
Brake relay22002200 + (N−1)
Road group#3#(N+2)
West-ladder points (slots 1-3 of R1/R4)P1L=0, P2La=0, P3La=0see binary table in §6.4
East-ladder points (slots 1-3 of R2/R5)P1R=0, P2Ra=0, P3Ra=0see binary table in §6.4

6.7 Brake control — optional "sail-through" override

By default the brake engages the moment a train hits B3, stopping it dead-centre of the road. That's what most operators want — the yard parks the train cleanly for storage. But with the symmetric layout it's natural to also use the yard as a through-running route: a non-stop train enters from one side, sails through a chosen road, exits the other side, never stops.

For that we use the same "Disable brake on next departure" pattern, applied at the moment the train reaches B3 rather than at departure time. Set the panel toggle vP 3050 BEFORE the train arrives; the train enters B3, the auto-brake route (R3) is shadowed by an override route (R6) that fires concurrently:

Route Editor · Route 6
R1 brake-disable override
6
Route Default
Delay ms
Enable
vPort
Feedback
vPort
RFID
vPort
Route Name
6 100 1103     R1 brake-disable override
Fires alongside R3 when a train enters B3. If override toggle (vP 3050) is SET, releases the brake immediately so the train sails through. Override is auto-consumed (drop, not defer).
SlotvPortOn/OffMoveDelay ms
1 3050 🗑 100
2 2200 🗑 100
3   🗑  
… slots 4–16 empty
Dest Duplicate Clear Invert Save Routes Load Routes Del All
Trigger gating (applies to this route)
Conditions (1/4) AND on fail Drop 5 s Clear all
Trigger on enable vPort SET (default)
1. vPort 3050 is SET ×
2. vPort   is SET ×
3. vPort   is SET ×
4. vPort   is SET ×
Chain: on completion, fire route       Schedule: enable --:----:--
Dry-run preview Re-evaluate
Would FIRE — AND of 1 condition.
vPort 3050 SET
Order of operations matters When B3 fires, R3 and R6 BOTH try to fire. R3's condition list is empty so it always runs (brake on). R6's condition checks vP 3050; if SET, R6 also runs and writes the brake to 1 (released). The router fires routes in numerical order, so set R6 to a HIGHER number than R3 — R6's brake-release write lands AFTER R3's brake-engage write, so the net effect is "released". If you reverse the order, the train will stop on B3 anyway.
Schedule-controlled through-running Want the yard to behave as storage during operating hours and as a pass-through overnight (e.g. for a scenic continuous-running session at a show)? Put a Schedule on R6 (e.g. 22:00–06:00) so the override activates after hours without anyone touching a button. Trains arriving in B3 outside the window engage the brake normally; arrivals inside the window sail through.
Don't forget to set BOTH starter signals When a train is going to sail through, the EXIT-side starter (the one facing the direction the train will leave towards) needs to be CLEAR before the train arrives, otherwise the loco hits the brake section at full speed AND a red signal. Add a "pre-clear exit starter" route fired by the arrival on B1 (west-arriving) or B5 (east-arriving) that pre-clears the appropriate signal. Left as an exercise.

6.8 Sequence walkthrough

An eastbound train approaches the west throat. Operator picks Road 4 (it's empty). After a session break, the train is dispatched onwards to the east. Status-log lines shown verbatim.

TimeEventWhat firesStatus log line
t=0.0Eastbound train enters W1 (vP 1001)nothing (west home already RED)
t≈3.0Train at W3, slowing. Operator presses "Receive from west to R4" (vP 3013).R31 "Receive from west to R4" fires.Route 31: West ladder set for Road 4; clear west home.
t=3.0R31 slot 1: P1L OFF (Roads 1–4). 2 s wait.vP 2000 = 0
t≈5.0R31 slot 2: P2La ON (Roads 3–4). 2 s.vP 2001 = 1
t≈7.0R31 slot 3: P3Lb ON (Road 4). 2 s.vP 2004 = 1
t≈9.0R31 slot 4: West home CLEAR. Train accelerates.vP 2100 = 1
t≈12.0Train clears W4, enters B1 of Road 4 (vP 1401).
t≈14.0Train enters B2 (vP 1402).
t≈15.5Train enters B3 (vP 1403). R33 auto-fires.R33 "R4 brake on at B3"Route 33: brake engaged, both homes red.
t≈16.0Loco brakes to a stand on the ABC section, dead-centre of Road 4.Train parks mid-road.
— session break, train sits parked for 20 min —
t=1200Operator decides to dispatch eastbound. Presses "Depart R4 to east" (vP 3041).R35 "R4 depart eastbound"Route 35: East ladder set; east starter clear; brake release.
t=1200R35 slot 1: P1R OFF. 2 s.vP 2010 = 0
t=1202R35 slot 2: P2Ra ON. 2 s.vP 2011 = 1
t=1204R35 slot 3: P3Rb ON. 2 s.vP 2014 = 1
t=1206R35 slot 4: East-facing starter (R4) CLEAR.vP 2114 = 1
t=1208R35 slot 5: Road 4 brake RELEASED. Loco accelerates eastbound.vP 2203 = 1
t≈1215Train exits B5, crosses east ladder, enters E1 (vP 1005).

Note the symmetry: this same train could equally have been dispatched back to the west (R34 instead of R35), in which case it would have used the WEST ladder + west-facing starter. Roads in a through yard genuinely behave as bidirectional sidings.

Sail-through scenario (override active)

Operator pre-sets vP 3050 (the brake-disable override) and the east-facing starter for Road 4 BEFORE the train arrives. The arrival sequence becomes:

7. Worked example 4 — Automated Fiddle Yard Exit (Multiple points)

7.1 Summary

What this example does

A four-road fiddle yard that exits through a three-point ladder. Each road carries its own sense block; firing a route now writes two point positions in sequence so the train's path is set all the way from its road to the single exit road.

  • Four roads — R1, R2 (upper pair) and R3, R4 (lower pair).
  • Three points — an upper ladder point merging R1/R2, a lower ladder point merging R3/R4, and a final exit point selecting between the upper and lower trunks.
  • Four block detectors, one per road, sited in a single detection zone immediately upstream of the ladder.
  • Four routes, two slots each. Each route writes both points that the route needs — the relevant ladder point and the final exit point. The two slots fire ~100 ms apart (the engine's minimum inter-slot gap is 50 ms), negligible against the ~1.5 s servo swing, so the time budget per route is still essentially a single swing.

This is the configuration to reach for when you want a small staging yard (3 to 6 roads, typically) without the dispatcher, brake-control and signalling apparatus of the §6 Mega Sidings build. No conditions, no chains — just one route per road that throws every point on the train's exit path.

7.2 Track plan

Each of the four roads carries a sense block in the same vertical band — the detection zone. The two ladder points fan in to short trunk sections; a third point merges those trunks onto the single exit road. Trains travel left → right.

Automated Fiddle Yard Exit (Multiple points) · Track plan FIDDLE YARD EXIT ROAD R1 1 vP 10 R2 2 vP 11 R3 3 vP 12 R4 4 vP 13 Upper ladder vP 200 0 = R1, 1 = R2 Lower ladder vP 201 0 = R3, 1 = R4 Exit point vP 202 0 = upper, 1 = lower DETECTION ZONE n Block detector (vPort) Point motor (servo)
Figure 5 · Four-road fiddle yard exiting through a three-point ladder. Each road has its own sense block in the shared detection zone; firing a route throws every point on that road's path to the exit.
One detection zone, four detectors All four sense blocks sit at the same distance from the ladder so the time budget for swinging the points is the same for every road. The detectors are independent — nothing prevents two roads from going active at the same moment, but in normal hand-shunting operation you advance one train at a time.

7.3 Hardware tally

Still only three System 2 nodes — the same parts as the simple example, just using more channels.

NodeQtyChannels usedRole
S2-Route — Route Processor1The brain. Holds the four routes that throw the ladder points.
S2-Mini Panel (8 inputs + 8 outputs)14 of 8 inputsBlock-occupancy detection on the four sense blocks. Four spare inputs and all eight outputs remain.
S2-serv8 (8-channel servo driver)13 of 8 servosDrives the upper ladder, lower ladder and exit-point motors. Five spare channels for signals, semaphore arms or future points.
Same footprint, more capacity Doubling the road count from 2 to 4 cost two extra Mini Panel input channels and two extra servo channels — nothing else changed. The same hardware will comfortably take this build out to a 6-road yard with a deeper ladder (one more sense block per extra road, one more servo channel per extra ladder point).

7.4 vPort allocation

Four detection inputs in the low 10s, three point servos on the 200 series.

vPortFunctionDeviceSemantics
10R1 sense blockS2-Mini Panel input1 = train present, 0 = clear
11R2 sense blockS2-Mini Panel input1 = train present, 0 = clear
12R3 sense blockS2-Mini Panel input1 = train present, 0 = clear
13R4 sense blockS2-Mini Panel input1 = train present, 0 = clear
200Upper ladder point (R1/R2 merge)S2-serv8 servo0 = aligned to R1, 1 = aligned to R2
201Lower ladder point (R3/R4 merge)S2-serv8 servo0 = aligned to R3, 1 = aligned to R4
202Exit point (upper/lower trunk merge)S2-serv8 servo0 = aligned to upper trunk, 1 = aligned to lower trunk

7.5 Routes

Four routes, two slots each. Each route writes both of the points on the exit path for its road. The two slots fire in immediate succession — the engine staggers consecutive slots by at least 50 ms (this route sets an explicit 100 ms gap). Because the two points are driven by different physical channels, that fraction-of-a-second stagger is imperceptible, so the servos appear to swing together.

RouteTriggerSlot 1Slot 2Effect
R1 — Exit via R1 vP 10 rise vP 200 ← 0
DLY 100 ms
vP 202 ← 0
DLY 100 ms
Upper ladder → R1, exit point → upper trunk.
R2 — Exit via R2 vP 11 rise vP 200 ← 1
DLY 100 ms
vP 202 ← 0
DLY 100 ms
Upper ladder → R2, exit point → upper trunk.
R3 — Exit via R3 vP 12 rise vP 201 ← 0
DLY 100 ms
vP 202 ← 1
DLY 100 ms
Lower ladder → R3, exit point → lower trunk.
R4 — Exit via R4 vP 13 rise vP 201 ← 1
DLY 100 ms
vP 202 ← 1
DLY 100 ms
Lower ladder → R4, exit point → lower trunk.
Why both points always get written Even if the upper ladder is already at R1 from the previous train, R1's route still writes vP 200 ← 0. This is harmless — the servo doesn't re-swing if commanded to its current position — and it makes the route self-contained: from any prior state of the ladder, firing R1 leaves the exit path correctly set for R1 with no dependency on history.

7.6 Sequence walkthrough

A typical exit from R3 with the ladder set the wrong way (previous train came out of R1):

  1. t=0 s. Train sits stationary on R3. All sense vPorts clear. Points are: vP 200 = 0 (upper ladder to R1), vP 201 = anything, vP 202 = 0 (exit to upper trunk).
  2. t=1 s. Operator opens the throttle. The R3 loco creeps forward toward the lower ladder point.
  3. t=4 s. Loco enters the R3 sense block. The Mini Panel writes vP 12 ← 1.
  4. t=4.01 s. R3's route triggers on the rising edge. Slot 1 writes vP 201 ← 0 — the lower ladder begins swinging to R3.
  5. t=4.11 s. Slot 2 fires (after the 100 ms inter-slot delay). Writes vP 202 ← 1 — the exit point begins swinging to the lower trunk.
  6. t≈5.5 s. Both servos finish. The status log shows two slot writes for route R3; the exit path from R3 through both points onto the exit road is now correctly set.
  7. t≈7 s. Loco reaches the lower ladder point, rolls through, continues onto the lower trunk.
  8. t≈8 s. Loco reaches the exit point, rolls through onto the exit road.
  9. t≈10 s. Tail of the train clears the R3 sense block; vP 12 returns to 0. No route fires — the falling edge is not configured.

Note that vP 200 (the upper ladder) was never touched — it stays set to R1 from the previous operation. That's fine: no train is on the upper trunk and nothing about the R3 exit cares where the upper ladder is pointing.

7.7 Variants and tuning notes

8. Worked example 5 — Entrance/Exit (NX) route setting

8.1 What NX is, and when to use it

OCS vs NX — the difference that matters

Everything so far has been OCS operation (One Control Switch): each route has one button, and pressing it fires that one route. OCS is perfect when a move has a single obvious path — a passing loop, a fiddle-yard exit. There is nothing for the operator to choose, so one button is all you need (and an entrance/exit gesture there would be pointless — the straight road between two buttons is simply the shortest route, which a single OCS button already sets).

NX (eNtrance–eXit) earns its keep somewhere quite different: a junction or station throat with many ways in and many ways out, where each approach can reach several platforms and each platform can be reached from several approaches. The operator joins the dots — presses the button at the line they are coming from and the button at the platform (or line) they want to go to — and the interlocking looks up and sets the one route between that pair.

The win is combinatorial. With N entrances and M exits there can be up to N×M routes, but the panel needs only N+M buttons — one per place a train can enter or leave. A four-platform throat fed by three lines is a dozen-odd routes from seven buttons, and the operator never hunts for “the Platform-3-from-the-Down-Main button”: they press Down Main, then Platform 3. The same seven buttons set departures too (platform → line), so a handful of buttons compose dozens of routes.

How the gesture and interlock work

  • Physical mimic panel — an illuminated pushbutton sits at every entrance and every exit, each wired to a CAN vPort that goes SET on press / CLEAR on release. Route-light lamps and occupancy LEDs are mimic outputs. The browser is configuration + diagnostics only; the track diagram is the physical panel, not the screen.
  • Press-and-hold a pair — hold the FROM button + the TO button together for about ¼ s and the matching route establishes. Re-press the same pair to cancel.
  • Interlocking — a request is denied, and nothing on the layout moves, if there is no route for that pair (NO_ROUTE), the route is already set (ALREADY_SET), a locked route holds a shared point the other way (OPPOSING_ROUTE_SET), or the route's Conditions report the path occupied (ROUTE_OCCUPIED). There is no path-finding: a blocked request returns a reason, never an alternative.
  • Locking & release — a set route stays locked (points held, route-light lit) until its detector clears after the train has passed, or the operator re-presses the pair. Non-conflicting routes lock side by side, so several moves can be set across the throat at once.

The NX layer sits on top of the existing engine: occupancy reuses each route's Conditions (§3.4), the points and signals are driven by the route's ordinary slots, and only the gesture + locking are new.

8.2 Simple example — a two-platform junction (2 in × 2 out)

The smallest layout where NX actually means something: a station approached by two lines — Main and Branch — that share a single lead through the throat to two platforms, P1 and P2. A point PA selects which approach line is connected to the lead; a point PP selects which platform the lead feeds. Either line can reach either platform, so there are four arrival routes.

This is why you need both buttons: pressing Main alone is ambiguous (P1 or P2?), and pressing P1 alone is ambiguous (from Main or Branch?). Neither end on its own identifies a route — the entrance+exit pair does.

Two-platform junction · 2 entrances × 2 exits PA PP single lead MAIN BRANCH P1 P2 5211 5212 5221 5222 ENTRANCE buttons EXIT buttons

vPorts. Points PA=201, PP=202. Approach aspects Main=211, Branch=212. Mimic entrance buttons Main=5211, Branch=5212; exit buttons P1=5221, P2=5222. Detectors: throat 810, P1 811, P2 812. Route-light lamps 251–254 (one per route).

The four routes. One ordinary route per (entrance, exit) pair; each route's slots set the two points and clear the approach signal, its Condition is “target platform CLEAR and throat CLEAR”, and its NX block names the entrance and exit buttons.

RouteEntrance (in)Exit (out)Slots (points + signal)Condition
1  Main→P15211 Main5221 P1PA→N, PP→N, Main→clearP1 CLEAR, throat CLEAR
2  Main→P25211 Main5222 P2PA→N, PP→R, Main→clearP2 CLEAR, throat CLEAR
3  Branch→P15212 Branch5221 P1PA→R, PP→N, Branch→clearP1 CLEAR, throat CLEAR
4  Branch→P25212 Branch5222 P2PA→R, PP→R, Branch→clearP2 CLEAR, throat CLEAR

Notice entrance 5211 (Main) appears on two routes and exit 5221 (P1) appears on two routes — that overlap is exactly what makes a single button ambiguous and the pair unambiguous.

Walkthrough.

  1. Set Main→P2. The operator holds Main (5211) + P2 (5222). The router resolves the pair to route 2, checks the interlock (not set; no opposing lock; P2 & throat clear), and grants: PA normal, PP reverse, Main signal clears; route 2 locks, PA/PP go into the lock table, the P2 route-light lights. Status log: NX route 2 SET (5211->5222).
  2. A conflicting request is denied. Another operator holds Branch (5212) + P1 (5221) — route 3, which needs PA reverse. PA is locked normal by route 2 (the single lead is committed to the Main approach), so the request is DENIED OPPOSING_ROUTE_SET (conflict route 2). Nothing moves; the panel route-lights for route 3 simply never come on.
  3. Release. The train berths in P2; block 812 reads occupied then clears as the train comes to a stand clear of the throat (or the throat detector clears). Route 2 releases, PA/PP free, the P2 lamp extinguishes — and now Branch→P1 would be granted.

8.3 Complex example — a station throat (join the dots, both ways)

Now the real thing. A through station whose west throat is fed by three lines — Up Main (UM), Down Main (DM) and a Goods Loop (GL). All three merge into a common throat lead, and a single point ladder fans that lead out to every one of the four platforms, P1–P4. So any line can be routed to any platform — twelve possible arrival routes — and the operator simply joins the dots between the line they are on and the platform they want.

West throat · any of 3 lines → any of 4 platforms UP MAIN DOWN MAIN GOODS LOOP 6311 6312 THROAT LEAD point ladder — one point per platform P1 P2 P3 P4 ENTRANCE buttons (lines) EXIT buttons (platforms) ● point

Every line merges into the throat lead, and the ladder fans the lead to every platform — so any of the three entrance buttons pairs with any of the four exit buttons. 3 × 4 = 12 arrival routes, from just 3 + 4 = 7 buttons.

The route matrix. With this throat every line reaches every platform, so all twelve pairs are valid routes:

from ↓   to →P1P2P3P4
Up Main (6311)
Down Main (6312)
Goods Loop (6313)

Twelve arrival routes from 3 + 4 = 7 buttons. With OCS you would wire twelve dedicated route buttons; add the twelve departures (platform → line at the east end) and OCS needs twenty-four, while the NX panel composes them all from fourteen buttons — seven at each end of the station. The exit buttons are P1=6321…P4=6324; the ladder points are 301…304 (one per platform); platform detectors 821–824, throat lead 820.

Walkthrough. This throat has a single lead, so it carries one move at a time and the lock serialises requests — exactly what the interlocking is for. (A larger station has several leads; the lock table then grants any moves that don't share a point set the other way, so they run in parallel.)

  1. Set Up Main→P3. Hold Up Main (6311) + P3 (6323). The pair resolves to that route, the interlock passes, the ladder point for P3 throws (and the others sit normal), the Up Main signal clears, the route locks, and the P3 route-light lights. Status log: NX route N SET (6311->6323).
  2. A conflicting request is denied. Another operator holds Down Main (6312) + P1 (6321). That route needs the ladder set for P1, but the lead is committed to the P3 move — the shared ladder point is locked the other way, so the request is DENIED OPPOSING_ROUTE_SET (and the throat lead is occupied). Nothing moves; the panel route-lights for the P1 move never come on.
  3. Release. The train berths in P3 and the throat-lead detector clears behind it. The UM→P3 route releases, the ladder frees, the P3 lamp extinguishes — and now Down Main→P1 (or any other pair) can be set.
  4. A departure — the same idea, the other way. At the east end the move is platform → line: the operator holds the P3 starter button (entrance) + the Down Main east button (exit) and the panel sets P3→DM out. Because arrivals and departures use physically separate signals, every button stays single-role and the pair is always unambiguous. (A button that genuinely must be both an entrance and an exit for a run-through is flagged “combined” in the editor — see §8.5.)

A button-pair you have not built returns NO_ROUTE and the panel does nothing — there is no path-finding, so the interlocking can never invent a move you did not define.

8.4 Building the route matrix, and choosing NX vs OCS

There is no special “NX mode”: you build each route exactly as an ordinary route — slots that throw the points and clear the signal, a Condition for occupancy — and then, in the route editor's NX (Entrance / Exit) block, tick Enable NX and name the entrance and exit button vPorts (and optionally a route-light vPort and an auto-release detector vPort). One route per cell of the matrix. Save Routes. The editor warns if two routes claim the same entrance/exit pair (a duplicate — the lowest route id wins). The global pair-window / confirm-hold / cancel settings sit in the NX Live Monitor and can stay at their defaults.

Choosing: reach for OCS (one button per route) when the move has a single obvious path or there are only a few routes; reach for NX when a throat has several entrances and several exits, so a single button can't identify the move. The two coexist freely — an NX-enabled route is still a perfectly ordinary route that can also be fired by its enable vPort, a timer, RFID or a chain.

What the firmware is doing

The gesture, the lock table and the denial reasons all run on the main loop — no new task, no blocking, no extra heap; every NX structure is a fixed RAM array. NX runtime state is RAM-only and rebuilt empty on boot, so after a power cycle every route comes up free and the operator re-sets the throat, exactly like a real panel returning from a supply interruption. The per-route NX fields ride inside /routes.bin (preserved across firmware OTA); the global timing lives in NVS (survives OTA, rollback and recovery).

8.5 Variants, limitations and out-of-scope

9. Testing & commissioning

9.1 Bench-test before laying any track

Both examples can be wired up on a bench — signals, points, brake relays, and block-detector dummy inputs — and tested by typing trigger events into the router's web console:

  1. Open the Block Groups page. Confirm all your groups appear with the right ranges and currently show "UNKNOWN" or "CLEAR".
  2. For each block detector, manually flip its CAN frame to 1 (use another node, or a CAN frame generator) and watch the group status flip to OCCUP.
  3. Press the route's Dry-run preview button while flipping detectors. The preview tells you exactly which conditions pass and which fail.
  4. Use the route editor's Trigger Route button to fire a route manually. This bypasses gating — if it works here but not from a real trigger, the problem is in your conditions, not the slots.

9.2 First train on the layout

9.3 Common gotchas

10. Common patterns reference card

Fire when a train arrives (rising edge)

Trigger vPort = the input vPort for that detection block. Trigger edge = rise. Condition (optional) = the train's expected approach blocks must be SET so a glitch in detection doesn't fire the route.

Fire when a train leaves (falling edge)

Trigger vPort = the input vPort. Trigger edge = fall. Use for "train cleared the loop", "starter signal reset", "release a downstream interlock".

Fire only when the path ahead is clear

Add a condition: the "path ahead" block group is CLEAR. Use Defer 10–15 s on fail so a slow upstream train clearing the path doesn't lose the trigger.

Fire one route after another

Use the Chain field. The chained target is independently gated — if its own conditions fail, it defers or drops without affecting the upstream route.

Three-event ceremony (points, signal, brake)

Three slots, two non-zero delays. Slot 1 throws points, DLY 2000 ms. Slot 2 clears the signal, DLY 2000 ms. Slot 3 releases the brake, DLY 100 ms (last slot's DLY is irrelevant).

Always-RED-by-default signal

Signal hardware powers up with vPort = 0 (RED). No route needed for the default state. Add a defensive "stop on arrival" route that re-stamps the signal to 0 when a train approaches, in case anything earlier left it at 1.

Always-engaged-by-default brake

Same pattern as the signal. Relay coil de-energised on power-up = brake engaged. Defensive "stop on arrival" route confirms the brake is on. Departure route flips it to 1 (released).

Operator override (panel button → vPort)

Wire a panel button to a vPort. Use it as a route trigger directly, OR as a condition (vPort N is SET) on multiple routes — effectively a "permission" or "interlock" toggle.

Schedule-bound routes

Add a schedule (start HH:MM, end HH:MM) to any route you want to fire only during operating hours. Triggers outside the window are dropped with a status-log entry.