NXWarrantsAn NXWarrant is a computer generated warrant. Rather than recording speed changes and other locomotive commands from a throttle where the recording notes the elapsed time between commands, an algorithm generates the speed changes and elapsed times for a smooth start up and slow down to a stop. To review information about warrants see About Warrants. In order to determine correct elapsed times and the blocks where the speed changes should occur, the block lengths must be known. Additionally, the proper scale must be known. Nevertheless, even if OBlock lengths are not specified, the algorithm makes a best effort to generate a usable warrant.
Launching an NXWarrantAfter selecting the menu item Create NX Warrant from the Warrants menu of the Control Panel Editor, or by clicking on the Create NX Warrant button in the Warrant List window, the Create eNtry/eXit Warrant window is displayed.
Set the RouteFirst establish the route for the train by entering OBlocks in the following fields.
- Choose an Origin block, a starting Path and Portal to exit the originating block.
- Choose a Destination block and a Path on which to end the route and Portal where is enters the block.
- (Optionally) Chose a Via block, that is, a block that route must include.
- (Optionally) Chose an Avoid block, that is, a block the the route must not include.
To specify a warrant route by mouse clicks, simply click on a track icon. The mouse clicks move successively through the Block Name fields of the Create eNtry/eXit Warrant window. If you mis-clicked on an icon and/or want to change the block in one of the fields, just double-click the field and click on another icon. Note, the icons must be Indicator Track Icons.
A computer algorithm determines all the intermediate blocks and paths to make the route. If more than one route meets the criterion, you are presented with a list to review and select the route you want. Note, the Via and Avoid location fields may be used to restrict the list.
Another parameter to use in specifying a warrant route is the Max Number of Blocks in Route field at the bottom of the window. This number puts an upper limit on the length of the route the algorithm computes. If your layout contains loops, then an infinite number of routes can be be counted. To minimize computation time, you need not use a number that is much larger than the number of blocks in the longest route. However, using too small a number can terminate the search prematurely before the route is found.
The Script AlgorithmThe NX warrant script sets the direction, turns the light on, blows two horn/whistle blasts and starts to ramp up speed. It is highly desirable to have a reasonable estimate for block length entered for each OBlock, but not absolutely necessary. If the length of the route is known, the algorithm will ramp up to the last speed that allows enough room to ramp down to a stop in the last block. After stopping in the last block the script blows one horn/whistle blast and turns off the light.
The algorithm calculates the speed changes assuming the train starts at the middle of the Origin block and stops at the middle of the Destination block. If the starting block or ending block has length 0, it will assume literally that its length is zero and will only do one speed setting in the block, i.e. at the start set the minimum speed or at the end set the speed to 0. If any of the intermediate blocks have length 0, the algorithm assumes the length is long enough to complete a full ramp up or ramp down. So while not necessary, it is advisable to enter block lengths on the OBlock Table at Add Item->Occupancy Blocks.
A further parameter the algorithm needs to know is the scale. Choose the correct scale of your layout by selecting it from the Preferences Warrants panel. The warrants panel at Edit->Preferences->Warrants is where this and other warrant parameters can be edited.
Set the Algorithm ParametersAt the bottom of the NXWarrant window are the following items.
- Max number of blocks in route Maximum number of blocks the route algorithm should go before stopping.
- Max Throttle Setting - Throttle setting for the top speed the warrant will reach.
- Ramp Step Interval Time - Throttle setting for the first speed step when starting. (Default from Preferences Warrant panel, but can be modified for this NXWarrant only.)
- Ramp Step Throttle Increment - Throttle setting for the first speed step when starting and each speed step until the Max Throttle Setting is reached. (Default from Preferences Warrant panel, but can be modified for this NXWarrant only.)
- Train Name - Indicator Track icons set to display train names will show this name when the train occupies the OBlock the icon represents. If left blank, the locomotive address is displayed.
- Engine Roster - Pick a train from the Roster from this drop down combo box. The locomotive address and train id will be displayed.
- Address - The decoder address of the locomotive of the train. This is a required field.
- Radio buttons Forward and Reverse Set the direction of the locomotive.
- Checkbox EStop at Destination Block Emergency stop the train upon entering the last block. Rarely Needed.
- Checkbox Halt Start at Origin Block Allocate and set the warrant, but don't start the train until the user issues a Resume command to the warrant from the Warrant List Table or via a Logix Warrant Control action.
- Checkbox Compute Throttle Factor Calculate a Speed Profile throttle factor during this NXWarrant run.
- Buttons Run NX Warrant and Cancel
- Radio buttons Run Auto for an automated warrant. and Run Manual to dispatch a route for a manual operator
Running the WarrantPressing the Run NX Warrant button computes the route and runs the addressed train at the specified speeds and direction. If more than one route meets the criterion, you are presented with a list to review and select the route you want. The Via and Avoid location fields may be used to restrict the list.
Calculate a Speed Profile Throttle FactorWhen the Compute Throttle Factor checkbox is selected running the warrant will compute Speed Profile throttle factor. The "Via" block is used as a speed trap to determine the track speed and compare it to the throttle setting. When the Via block is crossed the warrant will report the speed and Throttle Factor. The Factor can then be saved into the Speed Profile to be used in any warrant where this engine address is used.
Choose a Via block of accurate length, reasonably long, where the train can fully reach the maximum speed set and exit the block before ramping down. Generally the factors calculated for the mid and high ranges of speed are relatively constant. Typically, the factors diverge at slow speeds. For a given throttle setting, Speed Profile factors can vary due to temperature changes, consist load and other conditions. Getting reproducible factors from day to day within 10 to 15 percent is satisfactory.
Saving NXWarrants to make them Permanently SavedIf you press the Edit button on the Warrant List Table of the NXwarrant while it is still executing, the Create/Edit Warrant Window for the NXWarrant will open. Use the Copy button to make a permanent warrant that can be edited later.
Some Tips for Smooth Start Up and Slow DownIt is good practice to have a length specified for each block. A rough estimate is better than letting it be 0. If the second block has length 0 any remaining speed steps not done in the starting block will be put in that block. Lengths can be set for individual paths within a block in the CircuitBuilder should that be desirable.
If the next to last block has length 0 you should input its length, so the algorithm can start the ramp down in the previous block (block before the next-to-last). Although a zero length last block will set speed to 0 immediately, momentum could cause the train to overrun if the next-to-last block hasn't completed the ramp down. Or in this case, use the E-stop option, but that could be rather abrupt.
For a series of short blocks with length specified the ramp up and ramp down is distributed over the blocks as needed. Also, for short routes, the algorithm calculates only enough ramp up so the ramp down can finish without overrunning the last block.
The script's block synchronization will adjust the the elapsed times. Note! if the route includes a Dark block, i.e. no occupancy detection, it is very important it's block length is known since in this case, synchronization cannot be done.
For locos with no momentum, short times make smoother ramps. For locos with lots of momentum, longer periods should be used. The defaults are set for a modest amount of momentum, i.e. perhaps less than prototype but visually OK. Observe how the train behaves and adjust accordingly.