Creating and Editing Warrants

A Warrant contains the information needed to run a train. This includes the DCC address of the locomotive(s), the route train will take, the settings of the turnouts to traverse the route and the throttle commands to use at various points along the route - e.g. speed, when to show lights, sound horns, bells or other sound effects. There are three steps in creating a warrant, 1. define the route; 2. select a train; and 3. record the throttle commands.

Defining a Warrant Route

Routes are created using the Define Route tab in the Edit Warrant window.

Origin, Destination and Via Blocks

A warrant route is created by selecting the the Block and path where the train will begin its trip and the portal by which it should leave. Then select the Block and path and entry portal of the path where the train should end its trip. Press the Calculate Route button and the the computer will determine all the intermediate paths needed to make the trip. More information about OBlocks, Portals and OPaths can be found at The Occupancy Block Tables.

Calculate and Debug

After the origin and destination blocks and paths have been chosen, press the Calculate Route button. Frequently, more than one route will be found. The "Searching for Route" text box will show some statistics on the number of routes and their length in blocks that have been found while searching for routes. The text field "Max Number of Blocks in Route" limits how far the computer will look routes. The Stop button will terminate the search for routes. After the Stop button is pressed or the computer exhausts all the possible routes less than or equal the "max length", it presents a list of those that it found and their lengths. Choose a route by pressing its radio button. Pressing the Review button will display the route for you to examine in the Route Table. Each block, path and portals used to traverse the route is displayed.

You may inspect all the routes in this manner. Choosing a route and pressing the Select button will dismiss the dialog. and bring up the Record/Playback Script tab. If exactly one route is found, the list dialog is skipped.

Sometimes the dialog message "No Route found from "Origin Block', path ..." etc. is displayed. Responding Yes to the question, "Show the search tree?" will open a window with a graphic description of all paths begining at the Origin block, path and exit portal. Trace what you believe to be a likely route by clicking on the nodes. Each node is a block path and will display its path and block name and the entry and exit portals it uses. At the end of each branch, the leaf node will be the point where the route could not continue. Normally these leaves are spurs. However, these are also the places where you may find an error or omission that you made when defining the OBlocks, OPaths and Portals.

Record/Playback Script

You pick the engine to power your train and record its actions from this panel. You also can test and modify the recorded script here.

Choosing a train

If you have defined an JMRI engine roster, the train names are displayed in the Engine Roster drop down ComboBox. Selecting a name from this list will fill in the text fields: Train Name, Road Name and Number, DCC Adddress.

You may also choose a train by entering a DCC address in the DCC Adddress text field. This address will be used whether or not it is found in the IJMRI engine roster.

Learn Mode

Throttle commands are created by recording the commands you send to a train while operating it manually from a screen throttle in Learn Mode.

"Teaching" a Train

Pressing the Start button in the Learn Mode box will display a throttle on the screen. Operate the train just as you would with any other throttle. All speed changes and button presses on the throttle are recorded in the Throttle Command Table.

Pressing the Stop button will end the recording.

The learn script should be done with a completely clear route - All turnouts set should be set for the route, all blocks unoccupied (except origin), all signals set for clear runing and no changes made during recording period. When the train is run executing the script, any changes to signal aspects will be taken into account and the train's speed and schedule will be altered accordingly.

Running a Train As a safety feature, whenever a warranted train has permission to enter the next block, the turnouts are (re)set. Having permission from signals means that resetting the turnouts should not interfere with any interlocking logic. In the absence of signals, occupancy or allocation to another warrant also may deny permission. It is the most restrictive of these three conditions that gives the auto-run train permission to proceed. When such a denial is cleared, the train will proceed automatically. The only thing that overrides having permission to proceed is if the user has set the control to "Halt". The train will not move until the user sets "Resume". (see below how to set these user commands.

Throttle Command Table

The Throttle Command Table has the following columns: In addition to the commands you entered from the throttle, a marker when each block is entered is also recorded. A marker row in the table has the elapsed time from the last throttle command, the command name "NoOp" (i.e. no command was send to the train), the value "Enter Block" and the block name being entered. These rows help to synchronize the running of the train to keep to its recorded schedule.

All of the columns in the Throttle Command Table can be edited. Perhaps you want to touch up the horn blasts or modify the speeds. Just enter the data you want.

Synchronizing Commands to Block boundaries.

The "NoOp" markers attempt to shorten or lengthen the elapsed time to synchronize the entry into each block at the same time as was recorded. If the consist of a train changes, or if power is changed, the recorded elapsed times may not allow the throttle commands to execute at the same points on the route where the "Learn Mode" train recorded them. The "NoOp" markers can usually correct this. However, in extreme cases or for commands issued within the block sychronization may still be uncorrected.

If this is the case, a Throttle Adjustment can be entered to multiply the throttle setting to supply more or less power.

Editing Throttle Commands

The values in the Throttle Command Table can be changed by typing new entries into cells of the table. Rows may be inserted or deleted form the table using the buttons to the right of the table. Note that an inserted row has 0 elapsed time from the previous command so you may want to adjust this by taking time away from either the previous row or the following row and entering it into the inserted row. Also, when a row is deleted, its elapsed time is added to the time of the following row. These default elapsed times for inserting and deleting rows are entered to keep the total elapsed time in the block constant.

Triggering External Events From Scripts

External animation or other events may be triggered by entering a "Sensor" command. To do this, insert a row with the word "Sensor" in the Command column and a valid sensor name in the Block column. The Value column should have the action you want the sensor to take at its execution time - the words "active" or "inactive".

Running Trains on Dark Blocks

The Learn mode and Run Mode functions can be used on blocks that do not have detection sensors. However, without detection, other than the initial setting of turnouts, the warrant cannot reset the turnouts or modify its speed while the train is enroute. This means there is no protection from rouge trains fouling the route or from turnouts being changed while the train is enroute. Therefore run trains with caution over dark blocks.

Run Mode

Pressing the Run button in the Run Train box will send the throttle commands to the train specified in the warrant. The Run Train box will display each block entered by the train as it traverses the route. Each time an auto running train enters a block it check the succeeding two blocks for occupancy. Depending on what is detected, signals are set for clear, approach or stop and the current speed is modified accordingly (normal, limited or stop). This check for occupancy will also reset the turnouts for the route, if they have been inadvertently changed from another source.

The occupancy detection and synchronized commands used to notify a train when it enters a block depends on accuracte occupancy detection. If the layout does not have reliable occupancy detection, automated trains may run with unexpected consequences. Trains may wait indefititely when false detection occurs. The block protection done when entering a block can be disabled. The following radio buttons set this:

Controls

The Run Train box also is a drop down ComboBox that has the following commands that can be sent to the train.

Save Etc.

There are three buttons at the bottom of the window.