User Tools

Site Tools


userpages:hermannk:demand_stop-en

demand stop

Preface

Preface 1:
This documentation was created as of: Stand 15.01.2025

Area Details Remarks
Software Rocrail Version 2.1.5423+ (macOS "Sonoma" on Apple M2 CPU)
Computer MacBook Pro (M2) macOS 14.5 (Sonoma)
- - keywords: action, platform, function, demand

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

A) User request

A certain kind of train
- should stop on demand at several railway stations.
The stop request may be given
- by a button inside the train and additionally
- by a button on each platform.

B) Solution details

The Rocrail plan


This documentation uses the Rocrail object "locomotive" for the colloquial word "train".
Translations:

englisch german
demand-stop Halt auf Anforderung; Bedarfshalt
type "Others" Typ "Andere"
type "Light" Typ "Nebenbahn"
platform Bahnsteig

The Rocrail objects

object object ID Remark Attributes
Blocks bk01, bk02, bk03 small stopping points with "stop on demand" buttons
normal locomotivs will not stop there
Block type = "Others"
Wait = no
bk04 main station platform for almost all locomotives
but not for "stop on demand" locomotives
Block type = "Others"
Wait = 3 sec.
bk14 main station platform for "stop on demand" locomotives block type = "Light"
Wait = 6 sec.
Locomotives lc_other normal locomotive
but not a "stop on demand" locomotive
locomotive type = "Others"
lc_dstop locomotive with "stop on demand" button locomotive type = "Light"
Locomotive function dstop demand-stop button inside the locomotive red = ON
Sensors fb_dstop_bk01
fb_dstop_bk02
fb_dstop_bk03
demand-stop button at the platform red = ON
Routes [bk01-]-[bk02+]_other
[bk02-]-[bk03+]_other
[bk03-]-[bk04+]
route for locomotives of standard type "Others" Route Permission
Type = Others
[bk01-]-[bk02+]
[bk02-]-[bk03+]
[bk03-]-[bk14+]
Sensors = fb_dstop_bk01,fb
fb_dstop_bk02,fb
fb_dstop_bk03,fb
if sensor is red then route is locked
Route Permission
Type = Light
Level "en" english
"de" german

- Demand-stop locomotives are of Rocrail locomotive type "Light".
- The locomotive function for a demand-stop is named "dstop".
- The blocks bk01, bk02 and bk03 are connected by two routes. One route for the standard locomotives and one route for the demand-stop locomotives.
- Stopping for locomotives is done by locking the next demand-stop route.
- The demand-stop request from inside the locomotive is done by an action that sets the platform demand-stop button to ON. The action is executed by an ENTER event from blocks bk01, bk02 and bk03.
- Resetting the buttons is executed by an IN event from blocks bk01, bk02 and bk03.

The Rocrail actions

These actions hand the internal demand-stop request to the external platform demand-stop request. This is working because the actions are executed before the next route is set.

Action condition executed by content
ac_dstop_bk01_set locomotive is of type "Light"
AND locomotive's function "dstop" is ON
block bk01 at ENTER set fb_dstop_bk01 to ON
ac_dstop_bk02_set locomotive is of type "Light"
AND locomotive's function "dstop" is ON
block bk02 at ENTER set fb_dstop_bk02 to ON
ac_dstop_bk03_set locomotive is of type "Light"
AND locomotive's function "dstop" is ON
block bk03 at ENTER set fb_dstop_bk03 to ON

This action switches off the internal demand-stop request as soon as the locomotive has stoped on demand:

Action condition executed by content
ac_lc_light_dstop_off locomotive has speed "V0"
AND sensor fb_dstop_bk01 is ON
block bk01 at IN set fb_dstop_bk01 to OFF
locomotive has speed "V0"
AND sensor fb_dstop_bk02 is ON
block bk02 at IN set fb_dstop_bk02 to OFF
locomotive has speed "V0"
AND sensor fb_dstop_bk03 is ON
block bk03 at IN set fb_dstop_bk03 to OFF

These actions switch off the external demand-stop request as soon as the locomotive has stoped on demand:

Action condition executed by content
ac_dstop_bk01_reset none block bk01 at IN set fb_dstop_bk01 to OFF
ac_dstop_bk02_reset none block bk01 at IN set fb_dstop_bk02 to OFF
ac_dstop_bk03_reset none block bk01 at IN set fb_dstop_bk03 to OFF

These actions are used to run the locomotives alternativly. Both locomotives have to be startet at first and one signal has to be set to green/yellow to run the first locomotive.

Action condition executed by content
ac_sg04_green none block bk14 at IN set signal sg04 to green
ac_sg14_yellow none block bk04 at IN set signal sg14 to yellow


C) The Workspace

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

Datei Bedeutung
plan.xml the Rocrail plan file

back to Solution details.

Open the workspace
- start automatic mode
- start both locomotives (if available in virtual mode)
- set one signal (sg04 or sg14) to green/yellow
- use one of the demand-stop buttons to check its functionality.

Have fun.
Use the Rocrail forum for any questions.

userpages/hermannk/demand_stop-en.txt · Last modified: 2025/01/16 08:56 by hermannk