Complex Controller Track

Home Forums Building layouts Creating automatic controls Complex Controller Track

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #170
    Anonymous
    Inactive

    Hi all,

    I thought I’d share some ideas I’ve had with a more complex version of controller tracks. I’ve been exploring ways of implementing a form of conditional ‘scripting’ that doesn’t appear as easily done in the linear ‘scripting’ I’ve used in the past. I’ll illustrate my thoughts with the examples shown below.

    This first example shows two versions I’m working on.

    [img]http://www.rtrfan.us//RTR/Technique/rtr_093528.jpg[/img]

    The first, the simple ‘Y’ in the left foreground, is a boolean pass-through which allows only one passenger train into the passenger siding at a time (based on engine ID). Each branch past the switch has a control that returns the engine back to the starting point (curve would be false) or opens the siding switch as well (straight would be true).

    The second, middle foreground, is the controller track that controls when the train can safely leave the siding. The control engine is staged in front of the switch that is used for this function. The curve (false) contains the logic to return the engine back to the staging point as well as sets a timer to repeat the action. The straight (true) contains the logic to power the engine and set switches and blocks appropriately.

    The first example is simpler because it is triggered by only one control on the mainline so the engine has sufficient time to return to the staging point without the switch being thrown beforehand. The second is more complex because there are a number of triggering controls on the mainline so it is possible that a switching accident could occur. This track structure permits the control engine to return to the staging point without reentering the switch.

    The next example is more complex. It is used to control the reentry of a freight consist back onto the mainline. There are three conditions that must be met.

    1. First switch: The freight must be staged correctly (at the end of the siding).

    [img]http://www.rtrfan.us//RTR/Technique/rtr_093759.jpg[/img]

    2. Second Switch: I’ve determined that passenger trains have priority over freights. Therefore, a freight cannot enter the mainline when a passenger train is approaching.

    [img]http://www.rtrfan.us//RTR/Technique/rtr_094256.jpg[/img]

    3. Third Switch: The freight must obey block signalling on the mainline so it cannot enter an occupied block.

    [img]http://www.rtrfan.us//RTR/Technique/rtr_094316.jpg[/img]

    The control engine can be powered by three controls, two on the mainline and one on the siding. Passenger trains can ‘pull’ the freight onto the mainline while other freights can ‘push’ it onto the mainline.

    In programming, this would be written as the following pseudocode:

    IF

    the engine is staged

    AND

    the preceding block does not contain a passenger train

    AND

    the mainline block to be entered is empty

    THEN

    do those actions that power the freight, properly power blocks, properly set switches

    ELSE

    restage the control engine

    Since all conditions must be met before the freight can reenter the mainline, the control managing this is located just once following the third switch.

    This controller track structure could also be used for a situation where any one of the conditions could power the freight.

    In programming, this would be written as the following pseudocode:

    IF

    the engine is staged

    OR

    the preceding block does not contain a passenger train

    OR

    the mainline block to be entered is empty

    THEN

    do those actions that power the freight, properly power blocks, properly set switches

    ELSE

    restage the control engine

    In that case, an instance of the control powering up the freight would be located on the curve side of each of the three switches.

    The next step would be to add cut-outs to prevent the controller engine from entering a switch incorrectly – a switch cannot be ‘thrown’ once the controller engine is powered up.

    I’d love to hear any ideas that would help me improve on this.

    Regards, Chris

    #1824
    Anonymous
    Inactive

    Hi Chris

    Now thats got me scratching my head.

    Dave

    #1825
    Anonymous
    Inactive

    Hi Dave,

    I’ve sent the latest ‘draft’ version of the layout to you through e-mail. I’d be happy to discuss the nuts and bolts of it with you once you’ve seen it in operation.

    Regards, Chris

    #1826
    Anonymous
    Inactive

    Hi Chris,

    I can’t tell wether you’ve had lots of experience programming in BASIC

    or program PLCs or both or neither! I can, however, tell that Thats a pretty impressive application of controll logic! Boolean Algebra.Wow,

    Could it be from solid state circuit design?

    Also, those are pretty snappy looking stations you have there.

    Nice going!!!

    Mark

    #1827
    Anonymous
    Inactive

    Hi Mark,

    Thanks for your comments. I’ve worked as a software engineer for a number of years.

    I’ll do my best on modelling a station based on those examples. Brainbom is over-commited at this point so I can’t give you any idea when it might be introduced into the game.

    Best regards, Chris

    #1828
    Anonymous
    Inactive

    Hi Map,Chris and Dave,

    It´s not only in BASIC on pc,the sps is the same. And Chris is creating a sps with these tracks. See what brainbom says to this pics and explantation.

    may be bb will implement a ec as tiny BASIC 💡 :?: 8)

    #1829
    Anonymous
    Inactive

    Hi Chris,

    No hurry on the stations. I’ve seen your work and know that it is worth waiting for. I’m just having fun posting pictures. If they can be of any use to someone, so much the better! As I said, if there is anything up at this end of the country that you’d like to model and need a picture of, let me know.

    As for the controll, have you considered developing a flowchart & logic/truth table for planning a control point. If predetermined control sets for specific movements could each be assigned a “command” each compex routine would only need to be worked out once and then individual “commands” could be linked into a program of sorts.

    But my guess would be that You’ve allready been there!

    Thanks and have fun…

    Mark

    #1830
    Anonymous
    Inactive

    Hi Mark,

    Formalizing it as you’ve suggested would ease layout modification/expansion not to mention making it clearer to someone seeing the operation for the first time. Right now there are about 21 blocks on the mainline (a block is about the length of the longest train on the layout). Since each train modifies the three trailing blocks – off, a percentage of the ‘legal’ limit, and the ‘legal’ limit – I should be able to have seven trains operating on the main line at any one time with a train waiting in each siding.

    There’s a certain randomness to the operation – adding or removing freights and passenger trains seem to change whatever pattern establishes itself. That randomness is something I’m going for since it helps maintain my interest.

    I’ve left myself some expandability as well. I’ve thought of putting in an interchange that would lead into a local short line for switching operations.

    Thanks for your suggestions.

    Best regards, Chris

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.