simulating manual interlocking Topic is solved

Post Reply
barhamd

simulating manual interlocking

Post by barhamd » 31.10.2014, 14:39

Hi

I bit of an obscure Newbie question (please be gentle with me!)

I've got a mechanical lever frame set up using MERG-CBUS. Each lever controls a signal/point and generates a CBUS event and each lever has a servo associated with it which can lock the lever, again in response to a CBUS event. I've managed to simulate mechanical interlocking using JMRI 'logix' but have failed to get this to perform adequately on a Raspberry Pi (the performance of JMRI is too slow to keep up). I'm wondering if I can implement the same thing using Rocrail and if so how?

I'm presuming that I effectively configure each lever to be a sensor (much as I have done before in JMRI) and then configure each servo lever lock to be 'a bit like a point'. Then I guess I need to build up some logic, (using 'actions'?) so that the locks unlock when certain combinations of sensors are true.

Does any of this make sense or am I completely misunderstanding what Rocrail might be able to do for me?

thanks
David Barham

rjversluis
Site Admin
Posts: 41162
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: simulating manual interlocking

Post by rjversluis » 31.10.2014, 16:02

Hi David,

you can use actions for this.
The actions must be linked to the sensor object.
And the action itself controls the servo.

barhamd

Re: simulating manual interlocking

Post by barhamd » 31.10.2014, 16:46

rjversluis wrote:Hi David,

you can use actions for this.
The actions must be linked to the sensor object.
And the action itself controls the servo.
thanks for that.

So it looks like I can.
define 20 sensors, one per lever which are either True or False depending on whether the lever is pulled or normal based on CBUS events.
define 20 switches, one for each servo lock, again controlled by CBUS events
define 20 actions, one per servo lock, each with conditions based on one or more sensors.

so for example, if I have a distance signal that can only be pulled if the home and starter are cleared, I end up with

distant-lock is a servo-lock which active (unlocking the distant level) when
home-sensor is active (the lever clearing the home signal is pulled) and
starter-sensor is active (the lever clearing the start signal is pulled)

then I have a the reverse logic...
home-lock is active (unlocking the home signal) when
distance-sensor is inactive (the lever clearing the distance signal is not pulled)
and
starter-lock is active (unlocking the starter signal) when
distance-sensor is inactive (the lever clearing the distance signal is not pulled)

sounds worth a try..
thanks
David

ron&bram
Posts: 2460
Joined: 11.06.2008, 19:34
Location: Heemskerk, Netherlands

Re: simulating manual interlocking

Post by ron&bram » 31.10.2014, 16:52

Hi David,

You probably need 40 actions, 2 actions per servo, one action to have the servo lock the lever and one action to have the servo unlock the lever. I would appreciate a picture of your signalbox leverframe.

barhamd

Re: simulating manual interlocking

Post by barhamd » 31.10.2014, 17:26

Ah, so an action which turns a switch on when some conditions become true won't in itself turn the switch off again if the conditions become false. This is actually very similar to how the logix rules in JMRI worked.

this is the frame itself, made from an etched kit available from the Scalefour society in the UK.
lever-frame1.jpg
lever-frame1.jpg (65.86 KiB) Viewed 180 times
this shows the MERG electronics underneath which makes it all talk 'CBUS'
lever-frame2.jpg
lever-frame2.jpg (93.52 KiB) Viewed 180 times
and here you can see how the top of a servo forms a lock for the lever
lever-frame3.jpg
lever-frame3.jpg (73.13 KiB) Viewed 180 times
Hope that is of some interest

David

smitt48
Moderator
Posts: 5866
Joined: 04.04.2014, 01:07
Location: Kralendijk, Bonaire - Dutch Caribbean

Re: simulating manual interlocking

Post by smitt48 » 31.10.2014, 19:13

Hi David,

Thanks for the memories! Your levers reminded me off the levers I had with my 1958 Triang train.
I used it to switch my turnouts, you had to watch out they did not hang-up otherwise the switch motor started to smell. I never burned one up, but had some plastic melt. :evil:
Triang switch actuator black.jpg
Triang switch actuator black.jpg (9.56 KiB) Viewed 172 times

ron&bram
Posts: 2460
Joined: 11.06.2008, 19:34
Location: Heemskerk, Netherlands

Re: simulating manual interlocking

Post by ron&bram » 01.11.2014, 16:28

Hi David, it looks very impressive. I can see how the servo prevents a lever from being thrown, but does it also prevent returning a thrown lever back to the normal position.
The use of actions can be a bit confusing when starting with Rocrail. When an object, like a sensor/feedback changes it state to the defined state (for a sensor eg true (on)), this will execute the action. Whenall added action conditions, such sensor 3 is false, are met, the action is executed. You can add a second action to the object, that is executed when the object changes back to its other state. I hope this helps you a bit, but when not, just ask here, there are plenty Rocrailers willing to help.

barhamd

Re: simulating manual interlocking

Post by barhamd » 01.11.2014, 16:54

but does it also prevent returning a thrown lever back to the normal position.
yes, the bottom of the lever has to pass through the slot in the collar attached to the top of the servo. By careful shaping of a little 'fan shaped' extension to the bottom of the lever it is made so the servo locks it in either the 'normal' or 'reversed' position.

thanks
David

barhamd

Re: simulating manual interlocking

Post by barhamd » 15.11.2014, 21:25

Right, so I have now got Rocrail setup with a sensor for each lever in the frame and an output for each servo which locks a lever. (the connection between the lever and the point/signal being via CBUS events from the the frame and not reliant on Rocrail.

I have set up a panel and I can see the sensor change when I pull the lever and, if I click on the lock output I can turn the servo - so far so good.

Now I'm trying to get my brain around 'actions'. Perhaps you can let me know if I'm misunderstanding things. Unlike JMRI where 'logix' works out an action whenever anything changes, actions appear to only be triggered when they are defined to by another action.
So while in JMRI I could set some logic to say
'if lever 1 is pulled and lever 2 is pulled then set lever 3 to be locked' and also the reverse
'if lever 1 is normal or lever 2 is normal then set lever 3 to unlocked'

in Rocrail the equivalent would be
to define actions 'lock lever 3' and 'unlock lever 3'
and actions on lever 1 that say
if lever 1 is pulled - conditional on lever 2 being pulled action unlock lever 3
if lever 1 is released - action lock lever 3
if lever 2 is pulled - condition on lever 1 being pulled action unlock lever 3
if lever 2 is released - action lock lever 3

alternative, I thought about having a variable 'locks-on-3' which starts off a '0'
then I have an action so that lock lever 3 happens with 'locks-on-3' > 0 and an action unlock lever 3 when 'locks on 3' = 0
then each lever that would lock 3 has to call an action that 'adds one to locks-on-3' when pulled and an action that 'subtracts one from locks-on-3' when released.

or is there a better way to do this?

thanks
David Barham

Post Reply

Return to “Signal Systems”