Is there a Leave trigger Driver Command?

davidbird

ex-Chilwellian
As the title says, is there (for TRS19) a Driver Command, similar to the built-in "Wait for trigger", that can be set to activate when a train leaves the trigger?

I need one to de-activate a level crossing (gated road crossing) just after the train has crossed, but that will cope with different lengths and speeds of trains. The existing one will activate when the train first reaches it, so a long, slow train will open the crossing whilst it is still trundling across, while a short fast passenger train will be a long gone before the crossing even starts to open.

And yes, it does need to be a Driver Command...
 
A tall order. The problem is that triggers are normally activated when a consist reaches them, not when it leaves them.

The only way around this that I can think of is to use Session Rules - which places it outside your criteria. It is possible to set the Trigger Check Rule to activate when the trailing wagon reaches it.
 
Thanks pware.

I may just have to set up the trigger for the longest/slowest trains and just put up with the fast ones being well past the crossing. It will not be obvious from the point of view of a player/driver anyway.

Actually, I would prefer to use Session Rules, if the "Reset List" rule would work. Which it doesn't.
 
I have never tried the Reset List Rule, so i will give it a go at some stage.

From my understanding of those types of rules (Simultaneous, Ordered, etc) they will wait until all their child rules have been completed. So, theoretically, the Reset List Rule will not repeat until all its child rules have been completed. So if one of those child rules is waiting for an event (a trigger, a set time, a consist to be formed, etc) that never happens then the Reset List will never "reset". Could that be the issue?

I must try it - but now it is getting late and tomorrow is promising to be a record breaking hot day.
 
No, it's not that. I've tried to use the Reset List rule before, in a different situation. I couldn't get it to reset and do it's child rules more than once. It has also been covered several times in these pages, but with no resolution.
So I'm using an invisible loco with Driver Commands, which do repeat reliably.
 
This can be achieved with ATLS. You don't say how the crossing is set up. ATLS in a 4 trigger mode set up will allow 2 triggers to be placed on the track on each side of the crossing. These 2 triggers will end the activation of the gate. You will need 2 or 3 triggers on the approach to the crossing on each side. ATLS triggers can operate on train priority so an express on priority 1 can trigger a priority 1 trigger while a priority 3 would pass without triggering it until it got to a priority 3 trigger.
 
Actually, I would prefer to use Session Rules, if the "Reset List" rule would work. Which it doesn't.

I've tried to use the Reset List rule before, in a different situation. I couldn't get it to reset and do it's child rules more than once. It has also been covered several times in these pages, but with no resolution.

I just ran a test of the Reset List Rule and it worked perfectly. The child rule consisted of a Message Popup Rule which does not terminate until the popup browser window is closed, As soon as it was closed, the child rule had been executed and terminated so the Reset List Rule reset (started again) ... and the popup message appeared again ... and as soon as its browser window was closed the Reset List Rule was reset ... and the popup message appeared again - ad infinitum until I terminated the session.

So my original theory still holds. There must be a rule in the Reset List Rule set of child rules that is not terminating so the Reset List Rule cannot execute a second time.
 
This can be achieved with ATLS. You don't say how the crossing is set up. ATLS in a 4 trigger mode set up will allow 2 triggers to be placed on the track on each side of the crossing. These 2 triggers will end the activation of the gate. You will need 2 or 3 triggers on the approach to the crossing on each side. ATLS triggers can operate on train priority so an express on priority 1 can trigger a priority 1 trigger while a priority 3 would pass without triggering it until it got to a priority 3 trigger.

It's a re-visit of the short section/crossing/long section problem you helped me with a long time ago! How to prevent a second train from opening the crossing until the previous train has cleared the long section following the crossing. Achieved with an Invisible Train and messages. The re-visit was following the uograde to TRS2019 and a change to get trains on two converging paths to both operate the crossing.

I just ran a test of the Reset List Rule and it worked perfectly. ...

Yes, so it does, with a message popup. I will revisit the Reset List Rule and report back.
 
Last edited:
Not sure if this helps you but you can use Variable Modify to check when a train leaves a trigger. Set that to update the variable on trigger check but undo the alteration if the rule is stopped. When the train leaves the trigger the rule is stopped and the variable is reverted. You can then use Variable Check, evaluating once a second to start other processes.
 
... I will revisit the Reset List Rule and report back.

Unfortunately level crossing control by ATLS is not achievable by rules, but...

Not sure if this helps you but you can use Variable Modify to check when a train leaves a trigger. Set that to update the variable on trigger check but undo the alteration if the rule is stopped. When the train leaves the trigger the rule is stopped and the variable is reverted. You can then use Variable Check, evaluating once a second to start other processes.

I have used a Modify Variable DriverCommand in the list of commands for the Invisible Train to set a variable to value=1 when the crossing is activated, and the "Check Trackside - Any Train - Leave Trigger - Reset when completed" rule to set it to 0 and release the crossing.

Works a treat, thanks to all for your help.
 
Back
Top