Entry Exit and InterlockingThis brief tutorial is designed to explain how the Entry Exit and Interlocking is set up and works within JMRI. It is based upon the signal mast logic clinic held in the UK and follows on from that.
The panel file for this tutorial was taken from the "Logix and Feathers" section of the signal mast tutorial, the only difference, is that the signal mast logic has been removed from all the signal masts apart from the "up outer mast" and the "down platform mast" as these are used to represent signals in automatically controlled areas.
In addition the file has been modified to use Internal Sensors and Turnouts only, thus allowing it to be opened with any system configured in the preferences.
As a prerequisite the clinic on Signal Mast Logic should be followed before attempting this one as it provides the foundation on how to build your panel ready for use with the signal mast logic and also Interlocking.
The track plan for this is the same as in the Signal Mast Logic and could be considered a typical scenario where the Down Approach, Up Platform and Bay Signals would be under the control of the SignalMan, while the Up Outer and Down Platform would be automatically controlled.
The panel file for this tutorial can be found here
The NX buttons all work in pairs and must be selected in the correct order, also it is not possible to leap-frog a NX button to set a route between two non-adjacent buttons. Ie if you have buttons A—B—C it is not possible to set a route from A to C, the order of selection must be A-B B-C.
Setting up the layout editorIn the Signal Mast Logic tutorial each block was configured with a different colour to show occupied and unoccupied (Building a Layout). In addition it is possible to assign an alternative colour to each block. When using Full Interlocking, this alternative colour is used to highlight routes that have been set, when a block is using the alternative colour it also prevents another route from being set using that block.
The eNtry eXit (NX) utilises sensors for each NX location, typically associated with a signal or an End Bumper/Buffer stop, these sensors would act in the same way as a button on a physical panel, setting the button active to start the selection with the setting active of a second sensor completing the route or path selection. If a matching sensor is not activated within 10 seconds then the initial sensor will be reset back to inactive.
A sensor needs to be configured for each NX location. As a suggestion to help keep track of things prefix the user name with “NX” followed by the associated signal. So for example if the NX sensor will be associated with the “Down Appr” signal, then make the sensor username “NX Down Appr”.
Once the sensors have been created they can associate and positioned with locations on the layout editor, in the same way that the signal masts were done in part 6 of the signal mast logic clinic. Bring up the context menu (right click) on the block boundary and select “Set Sensors”, from the next window,
Remember that the block which the sensor is assigned to will determine the direction of travel, if the sensor is assigned to the incorrect block then it will not get picked up and the interlocks will not work.
The panel file with the sensors already assigned can be found here
Creating the NX Rules.Open up the Entry Exit window, which can be found in the tools option of the layout editor. This will bring up a window like the following..
This window allows you to see which NX pairs have been created and the state of each pair. From this window we can get the system to automatically generate the pairs or we can manually define them.
- Select the layout editor panel file that you wish to create the NX on.
- If you are going to create the pair manually then select the Entry and Exit Points from the respective drop down lists, or leave them as is.
- Select the type of interlocking that we are going to use.
- Set Turnout Only - This will only set the turnouts to the correct state between the NX sensors.
- Set Turnouts and SignalMast - This will do as above, but also generate the SignalMast Logic at the same time
- Full Interlock - This will do all of the above and also lock the path and prevent another clashing one from being selected
Set Turnout OnlyIf to start with you select "Set Turnout Only" and press "Auto generate Entry Exit Pairs", it will end up generating a list with four pairs like the following
The four paths generated are all valid NX pairs based upon the direction of travel. For the NX to be set you must first select the Entry sensor, followed by the Exit sensor. If they are selected in the reverse order the path will not be set.
You can see that if you were to set a route from the down appr to the bay buffer stop, the turnouts get automatically set. The sensors will also flash while the route is being set up.
If you then set a route from the "bay mast" to the “up appr”, again the turnouts will automatically be set.
With the Turnout Only interlock type, as no further logic or interlocking is done, it is possible to allow the interlock to be set-up no matter which way round the NX buttons are selected. This can be done by selecting the "Both Way" flag in the table against an entry. You can then set the path in reverse, eg "NX Up Outer" to "NX Bay Mast".
In addition to this with a "Turnout Only" set you can also create NX pairs that go against the normal direction of travel, for example from "Bay Mast" to "Down Appr"
Turnouts and SignalMastsIf "Set Turnouts and SignalMasts" is selected and then the "Auto Generate" button is pressed, the same four interlocks will be generate, with the NX type set to "Signal Mast".
This time when you set the route between two NX sensors, it will set the turnouts and if SignalMasts are placed at the same location it also configures the logic from the signal mast at the source.
The SignalMast Logic, will appear in the signalmast logic table, this logic is not saved when the panel file is saved.
If you set a route from down appr into the bay buffer stop, you will see that the turnouts get set and the signal changes to the correct state. If you then change the state of the turnout or block on the path, you will see that the source signalmast will change state appropriately.
Full InterlockIf "Full Interlock" is selected and then the "Auto Generate" button is pressed, again you would end up with the four interlocks as before.
With SignalmastsWhen a full interlock is configured and there are Signal masts placed at the NX locations, it will place the signal mast at the source location into a held state until a path has been set, which will in turn releases the signal. This is working on the basis that these signals are now under the control of a SignalMan who has to set the appropriate route before releasing the signal.
The full interlock will also set the state of the blocks to use the alternative colour, and the NX sensor buttons will remain in a solid active state.
If you try and set a conflicting path, then an error message will be displayed and the path will not be set.
As the route gets cleared down by a train occupying the blocks, so does the interlock.
If you re-select an active interlock, the NX sensors will start to flash, and you get the option to either "Cancel" the route, "Clear Down" or "Exit".
- Cancel will de-activate the route
- Exit will just the message on the screen and do nothing else.
- "Clear Down" will manually simulate a train traveling over the blocks and move any values assigned against the block to the end block.
Without Signalmasts.If no signalmasts are configured between the two points the interlock will work in very much the same way as it would with SignalMasts, it just doesn’t setup or release any signals.
With all the Entry Exit methods the system will try to set the route with the lowest cost. Each layout block has a cost assigned it is the sum of all the block costs in a route that determine the overall route cost. By default a Main Track is assigned a value of 50, while a side track has a value of 200. These values can be changed by the user, by editing the layout block. If the route with the lowest cost has either another entry/exit point in the same direction, or a block that is already set Occupied or reserved, then it will try and find an alternative route if one is available.
Uni-directional Blocks - It is possible to set the relationship between adjacent blocks, to prevent routes from being setup from one block to another or vice-versa. This is set when editing the layout block, you have the option for both way, to only send or only receive.
To view how a particular block connects to other blocks, with costs and valid paths, right click on a track segment or turnout roundel and select "View Block Routing"