Warrants
A Warrant is a collection of information sufficient to run an automated train. It will set the turnouts for a specified route and detect whether there are any other trains occupying it. A JMRI Warrant is suggestive of what a warrant does on a prototype railroad, but there is no intention to replicate any particular railroad's mode of operation.Warrants depend on having an accurate description of the layout in terms of OBlocks, Portals and OPaths. These elememts are created using the Occupancy Block Tables that you will find under the Tools menu in the PanelPro window. Their definitions and how to use them are described in The Occupancy Block Tables.
It may be easier to define OBlocks, Portals and OPaths using the Circuit Builder tool found in the Control Panel Editor. The Circuit Builder will also convert the track segments and turnout icons of your layout to Indicator Track and Indicator Turnout icons. These icons display by color the status of the OBlock they represent - whether the track circuit of the OBlock is occupied or unoccupied, whether a warrant has allocated it or whether a train under warrant currently is proceeding over the circuit. The Circuit Builder is accessed under the File menu of the Control Panel Editor. Choose the "Change View to Circuit Builder" menu item. Instructions for use are found in The Circuit Builder.
Creating a Warrant
In order to create a Warrant you must first have created two or more OBlocks. These blocks don't have to be fully defined, but their existence indicates that you are interested in using Warrants. When two or more OBlocks exist the Panel Editor will display a Warrants menu with three menu items. Otherwise, this menu is not displayed. The Warrant menu items are:- Warrant List: - Opens a table of warrants from which you can control warrant routes and dispatch trains. It is not meant to be a dispatchers panel, but its intended use is testing warrants. You are encouraged to develop your own dispatchers panel using the Warrant state variables and actions in Logix. The operations of this table are discussed below.
- Edit Warrant...: - Shows the list of existing warrants. Selecting one will open a Warrant Editing Window. The operations of this frame are discussed in Creating and Editing Warrants.
- Create Warrant: - Opens a blank Warrant Editing Window to create a new warrant. The operations of this frame are discussed in Creating and Editing Warrants.
Functions of a Warrant
Creating Routes
Routes are created from the Define Route tab.A warrant route is a series of block paths linked together so a train may travel over it. A warrant route is created by first choosing an origin block, a starting path and a portal to exit the orginating block. Then, destination block is chosen and a path on which to end the route. Blocks are chosen either by typing in the block name or dragging it from a displayed OBlock table. A computer algorithm will determine all the intermediate blocks and paths to make the route.
The origin block is obviously where a train given this route will start and the starting path within the origin block is the track it is on - e.g. "Departure Track #3". Choosing the portal of the path where the train should exit, determines the direction of the train on the route. From here on, the computer algorithm will find portals, paths and blocks to take the train to the destination block and path - e.g. "Arrival Track #1" in the destination block.
There may be more than one way to get from the origin track to the destination track. The computer presents you with a list of all the routes it finds - some of these may be quite lengthy. You may review and choose the route you want to use from the list. If the list is too lengthy, you may restrict the number of routes found by specifying an intermediate via block and path that must be included in the route. The computer will re-calculate the route with this restriction and present you only with routes through the specified "Via" block and path. Creating and Editing Warrants. has more information about this.
The computer may not find a route from the origin track to the destination track that you believe is there. When this occurs, you may request the computer to display the routes the algorithm has attempted. As you trace the attempted routes you may find that you have forgotten to enter a path or miss-labeled the correct portal to a path. (or, heaven forbid! found a bug.)
When you are satisfied with the route, select the Record/Playback Script tab.
Tables on the Record/Playback Script Tab
Radio buttons on this tab allow you to select either the Route Table or the Throttle Command Table. The Route Table shows the track circuits (OBlock, Portals and Paths) the warrant defines. The Throttle Command Table shows each throttle command that is recorded in "Learn Mode". After recording, the table can be edited - changing values, inserting or deleting rows. Also, a sensor can be added to the commands to trigger an external event.Choosing a Train
Inside the Choose Engine Consist box you will find a drop dowm 'combo box' labeled Engine Roster that displays all the trains listed in the Roster. Selecting one will assign a train to the warrant.If you do not have a Roster defined then you may enter a locomotive's DCC address in the Address text field and a train responding to this address can be 'taught', the commands it should issue, and later, 'run'.
The Train Name test field is used to enter the name of train when the commands are played back. This name will appear in a Loco Marker icon that is displayed in indicator track as the train travels along the warrant route.
Creating and Editing Warrants. has more information about this.
Learn Mode Throttle
If a train has been assigned, that is, has a valid train Id or valid DCC address in the warrant, then a throttle can be aquired by pressing the Start button. This throttle will operate the acquired train and all the throttle commands will be recorded until the Stop button is pressed. Creating and Editing Warrants. has more information about this.Recorded Throttle Commands
The throttle commands recorded in Learn Mode can be edited, however, caution should be taken to only make modest changes since new commands when executed in playback could cause dramatic events. It may be wiser to re-record the commands in a new Learn Mode session if major changes are made. Creating and Editing Warrants. has more information about this.Running Automated Trains
The recorded throttle commands can be played back to run the train. When in Run Mode, additional control of the train can done through three choices: Halt, Resume and Abort. As suggested by the names, these command stop a running automated train, restart it or stop the train and abort the remaining throttle commands.Although there are separate operations to reserve a warrant route (Allocate) and set turnouts and signals (Set Route) these operations do not have to be done to run an automated train. A Run operation can begin without them. The train will seek allocation and set turnouts and signals as it proceeds on the route. When confronted with an occupied block, the train will stop and wait until the block clears. When the next block is clear but the block beyond the next block is occupied, the train will approach at reduced speed. An automated train will attempt to secure allocation of the next two blocks each time it enters a block. Creating and Editing Warrants. has more information about this.
Editing Throttle Commands
The recorded throttle commands execute according to the elapased time between commands. The elapsed time (ET column) may be modified and even the command may be changed. Rows may be deleted and additional rows added.Changing the consist of a train or perhaps even a temperature change between recording and playback, may result in the train not performing a throttle command at the same place on the layout each time. The Throttle Adjustment text field can be used to modify the throttle setting by a fixed ratio for all speed commands. - or individual commands may have their throttle setting or elapsed time value changed.
The "NOOP" commands with value "Enter Block" should not be removed. These rows are used to synchronize the automatic running of a train to the recorded elapsed time in the block, by either extending the elapsed time if the train has arrived too soon or shortening the elapsed time of the following commands if it arrived too late.
The run protection discussed in the previous section and synchronizing commands depends on reliable occupancy detection. If the layout is prone to have spurious false detection signals, then automated running will be unsatisfactory - trains may wait indefinitely for phantom trains to release occupancy or run indefinitely by not receiving a synchronizing signal. The train can be run using the elapsed times between commands only and skip the block protection mentioned above i.e. "Run with Blocks Dark".
Using the Warrant List
The Warrant List menu item opens the Warrant Table. Each row is a warrant that has been created. Warrant routes can be reserved, the turnouts and signals set and trains run and controlled using the columns in the table.Columns in the Warrant Table
- Warrant: - The name of the warrant.
- Route: - The route of the warrant is listed in a drop dowm combo box.
- Train Name: - The Train Id, as stated in the Roster.
- DCC Address: - The DCC Address of the locomotive or consist.
- Allocate: - A button that reserves the route for the warrant.
- Deallocate: - A button that removes the reservation for the warrant.
- Set: - A button the sets the turnouts for the warrant route.
- Run: - A button that runs the train over the route according to the automated throttle commands. The recorded speed of the train will be modified according to the occupancy and signal aspects encountered on the route.
- Control/Status: - The status of the warrant is shown. It also has a drop down combo box that
can send the following commands to a running train. Note: This column has two functions -
Status messages and control buttons.
- Halt, Resume and Abort commands to an automated running train.
- Edit: - A button that opens an editing window for the warrant,
- Delete: - A button that deletes the warrant.
Using Warrants in Logix
Several of the operations that can be done from the Warrant List and Warrant Editing frame can be done with Logix Conditionals. You may design and implement a dispatcher's panel using the Warrant state variables and actions found in Logix.Warrant State Variables
When a warrant has been allocated or is in effect, the following state variables can be tested in a Logix conditional.- Route is Free: - True when all blocks in the warrant route are not allocated to anyone and are not occipied. False otherwise.
- Route is Set: - True when all blocks in the warrant route are allocated and the turnouts set for this warrant. False otherwise.
- Route is Allocated: - True when all blocks in the warrant route are allocated to this warrant. False otherwise.
- Route is Occupied: - True when none of the blocks in the warrant route, other than the origin block, are occipied. (Assumes the train of this warrant is occupying the origin block). False otherwise.
- Train Running: - True when the train specified in the warrant is running either in Learn Mode or Auto Run Mode. False otherwise.
Warrant Actions
- Allocate: - Allocates the route to this warrant.
- Deallocate: - Deallocates the route of this warrant (only). This will not deallocate the route of a different warrant.
- Set Route: - Sets the signals and turnouts for the route as far along the route that it can until it reaches an occupied block or a block allocated to another warrant.
- Run: - Issue the throttle commands to the train in the warrant. This should only be done when the train occupies the Origin block.
- Set TrainId: - Set the engine consist to be used in the warrant from a trainId in the Engine Roster. Alternatively, the DCC address can be used to identify the engine.
- Set Train Name: - Set the name of the train to display in the loco marker indicating the current position of the train when running.
- Control Train: - Send a control command (Halt, Resume or Abort) to a running train under warrant.
- Set Throttle Factor: - Set a multiplier for the recorded throttle setting. When the engine or consist of the train is changed, more or less power may be required.