User Tools

Site Tools


userpages:hermannk:doubletrackcrossing1-en

Double Track Crossing 1

Userpages - Hermann (hermannk)Double Track Crossing 1

Direct jump to the Rocrail-Workspace-Download

Foreword 1:
This documentation was created with this: Status 02/13/2023

Area Details Remarks
Control Rocrail Version 2.1.3015+ (macOS "Ventura" on Apple M2 CPU)
Computers MacBook Pro (M2) macOS 13.0.1 (Ventura)

Foreword 2:
- the use of this solution is at your own risk;
- regular backups of the Rocrail workspace are recommended.

Task

A two-track railroad crossing is to be provided with a barrier control that also includes the control of a two-lane road.
It should be possible to drive on the tracks both individually and simultaneously.
There is no prioritization regarding track or road.

Solution Details

In this solution example there are:
- two tracks; they are only used in one direction;
- two streets; they are only used in one direction.
Accordingly, four level crossings are applied: "swbu11", "swbu12", "swbu21", "swbu22".

A level crossing is a "switch" of type "accessory" with the accessory number 10, 11 or 12.

The level crossing is closed to automobiles at "straight".
The level crossing is open to automobiles at "turnout".
In this documentation, each level crossing has an optically visible barrier arm to make the commands for each of the level crossings visible. In the working area only the level crossings "swbu12" and "swbu22" have a barrier arm.

a) Provide routes

a1) Set routes for locomotives

The four possibilities when locomotives are running (the routes marked in yellow are used):

none below above both
switch position, status position, status position, status position, status the locomotives are running
swbu22 turnout, unlocked straight, unlocked straight, locked straight, locked the automobiles are waiting
swbu21 turnout, unlocked straight, unlocked straight, locked straight, locked
swbu11 turnout, unlocked straight, locked straight, unlocked straight, locked
swbu12 turnout, unlocked straight, locked straight, unlocked straight, locked

As soon as a route for locomotives is provided, the routes for automobiles are blocked.

a2) Set routes for automobiles

The four options when automobiles are driving (the yellow-marked lanes are used):

none left right both
soft position, status position, status position, status position, status the automobiles drive
swbu22 turnout, unlocked turnout, locked turnout, unlocked turnout, locked the locomotives are waiting
swbu21 turnout, unlocked turnout, unlocked turnout, locked turnout, locked
swbu11 turnout, unlocked turnout, locked turnout, unlocked turnout, locked
swbu12 turnout, unlocked turnout, unlocked turnout, locked turnout, locked

As soon as a route for automobiles is provided, the routes for locomotives are blocked.

b) Dissolve routes

b1) Dissolve routes for locomotives

When dissolving a route over the level crossing, the points should be set again,
- but for locomotives only if the opposite direction is also free and
- for automobiles, the switch position can remain unchanged.

Usually the points are opened again when the route is released (unlocked). In this example, this is also done for the locomotives, but only for the turnouts in their own direction of travel!
In the case of oncoming traffic, the points in the opposite direction remain closed, so that the level crossing remains closed to automobiles.

In the following table, the lower road was set and is now resolved; two cases have to be considered:

before below after none - before both after above
switch position, status position, status - position, status position, status
swbu22 straight, unlocked turnout, unlocked - straight, locked straight, locked
swbu21 straight, unlocked turnout, unlocked - straight, locked straight, locked
-
swbu11 straight, locked turnout, unlocked - straight, locked straight, unlocked
swbu12 straight, locked turnout, unlocked - straight, locked straight, unlocked

Special treatment for routes for locomotives: the barriers may only be opened if the opposite direction is free.
In this example resetting the points
- for the lower route by actions and
- for the upper route by calling an XML script.

b2) Dissolve routes for automobiles

In the following table, the left route was set and is now resolved; two cases have to be considered:

before left after none - before both after right
switch position, status position, status - position, status position, status
swbu22 turnout, locked turnout, unlocked - turnout, locked turnout, unlocked
swbu21 turnout, unlocked turnout, unlocked - turnout, locked turnout, locked
-
swbu11 turnout, locked turnout, unlocked - turnout, locked turnout, unlocked
swbu12 turnout, unlocked turnout, unlocked - turnout, locked turnout, locked

No special treatment is required for routes for automobiles.

b11) Dissolve a route with actions

In the lower route "[bk11+]-[bk12-]" dissolving the route is demonstrated by actions:
An action was created for each point:
- "ac_turnout_swbu11"
- "ac_turnout_swbu12"
- "ac_turnout_swbu21"
- "ac_turnout_swbu22"
Definition of the action:

The action is called in the route "[bk11+]-[bk12-]" if it is released (status = unlocked), but only under the condition that the opposite direction is free (route "[bk21+]-[bk22-] " unlocked).
Application of the action:

The "Timer = 100 ms" ensures that the point has already been released so that the point can now be set by the action.

b12) Dissolve a route with XML script

In the upper route "[bk21+]-[bk22-]" dissolving the route is demonstrated by an XML script; For this purpose, the action "ac_route_state_unlock" was created, which calls the XML script "ac_route_state_unlock.xml".
Definition of the action:

The action is called in the route "[bk21+]-[bk22-]" when it is released (status = unlocked);
- the condition is encoded inside the XML script:

<if state="st [bk11+]-[bk12-] = unlocked">

Application of the action:

A "Timer = 0" is sufficient because enough time is consumed to process the XML script.

b99) Notes on the test

- only a virtual simulation was carried out with "Start all locomotives virtual";

- warnings and errors occurred during the simulation; examples from the trace file:

... r9999E tr01 OSwitch 0928 Switch [swbu12] pending operation for lock route [[bk61+]-[bk62-]]
... r4104W tr01 OLcDrive 0088 Could not lock route "[bk61+]-[bk62-]", for "tr01"...

- in principle, warnings occur for the routes for locomotives; this is normal for this solution; examples from the trace file:

... r9999W lc02 OSwitch 1286 switch [swbu12] is locked by [lc01]: reject any commands from others


The good thing:
- locomotives and automobiles have never met on the level crossing.

c) Rocrail workspace

The download workspace "doubletrackcrossing1.zip" contains the following files:

file meaning
plan.xml the Rocrail plan file
ac_route_state_unlock.xml the XML script to resolve the routes

back to the solution-details.

d) Outlook

You are welcome to implement your own ideas on the basis of this solution.
Have fun and good luck.

userpages/hermannk/doubletrackcrossing1-en.txt · Last modified: 2023/02/13 13:37 by hermannk