The Big Picture

Stage 4 - Automation

Propeller Beanie Engineer Hat

What to expect to learn from stage 4

At the end of this stage, we expect you will have learnt the following:

  • How add automations to your EX‑CommandStation

Overview of EX-RAIL automations

The EX‑RAIL sequences are described in detail in the EX-RAIL (Automation/Animation) pages, which we recommend that you read. We won’t repeat all that information here, but as introduction…

EX‑RAIL is an “EXtended Railroad Automation Instruction Language” that can be used to describe sequential command ‘sequences’ to automatically take place on your model layout. These sequences are defined in a simple command script file, and uploaded to the Command Station once to configure it.

EX-Rail will then run the sequences automatically on EX-CommandStation startup, be triggered manually or run on occurrence of a specified events.

Once started, each ‘sequence’ will step through a list of simple keyword commands, in order, until they reach a DONE keyword. Multiple concurrent sequences are supported.

By using Conditional, Branching, Delay and Wait commands it is possible to design complex sequences with multiple outcomes which can drive your trains, operate your turnouts/points and signals, and react to events on your layout.

See the Example Objects and Sequences page and the following pages in this section for examples of what is possible.

Structure of a ‘Sequence’

In general, sequences follow the basic structure:

// Example
ROUTE(1,"Coal Yard exit")
   RED(77)      // signal 77 to Red
   THROW(1)     // throw turnout/point 1
   CLOSE(7)     // close turnout/point 7
   DELAY(5000)  // 5 second wait
   GREEN(92)    // signal 92 to Green
<sequence-type>( parameter-1, parameter-2, ...)
  <command 1>
  <command 2>
  <command n>
  DONE     or     RETURN     or     FOLLOW ( id )


Locomotive addresses in use

For our various automations and sequences that involve driving trains, we will be using locomotives that represent the various international locations and preferred modelling eras of the DCC-EX team. Be warned that this means we will be mixing completely unrealistic combinations of eras on the same layout!

Here are the various locomotives you can find used throughout these examples:

DCC Address







Diesel Hydraulic

Early Modern

Queensland, Australia




Early Modern

Queensland, Australia



Diesel Electric

Early Modern

Queensland, Australia