Auto switch turnout

This page demostrates a script is inspired by the automatically switching back turnouts (in German: Rückfallweiche) of the HSB in the Harz, Germany.

The concept is that the turnout is in a fixed position. When a train approaches from the other side it will change the direction of the turnout what is detected and the turnout automatically tries to return to its default state after a certain period. As long as the turnout is trying to return to its default state the signal warns trains to not enter the turnout since its state will change.

Script features:

  • Triggering the script by a sensor indicating the turnout state is in the non default state

  • Setting the signal to warn and later proceed state

  • Retry mechanism for setting the turnout. If the turnout did not return to the default state (for example because there is a train positioned on the turnout) it will retry again.

  • In case the turnout is switched manually the auto switchback mechanism is not executed by conditional sections.

Demo

Last updated

Was this helpful?