Priorities in S³ Logic

Priorities in S³ Logic

Priorities in S³ Logic

When a device has multiple "lines" of logic controlling it, they are processed in sequence from first to last (top of the list to bottom). As soon as a condition is found to be true, the state of the device is set and the remainder of the lines are ignored. In effect, the logic lines are prioritized from highest to lowest.

This can be very useful as a way to simplify the logic when a number of possible conditions are being tested. In the diagram shown here, Signal 1 controls the route over the main line (Block 4), while Signal 2 provides control over the siding (Block 3).

A detailed rendering of the logic for Signal 1 would be as follows:

  • Red when Turnout 1 is Reversed
  • Red when Turnout 1 is Normal and Block 4 is occupied
  • Yellow when Turnout 1 is Normal, Block 4 is Vacant, and Turnout 2 is Reversed
  • Yellow when Turnout 1 is Normal, Block 4 is Vacant, Turnout 2 is Normal, and Block 5 is occupied
  • Default to Green if none of the above

However because of the priority scheme, portions of this logic are redundant. For example, line 2 need only read:

  • Red when Block 4 is Occupied

This is because line 1 has already determined that Turnout 1 is Normal (if it wasn't, the signal would be set Red and no further processing would take place). Likewise, line 3 need only specify "Yellow when Turnout 2 is Revesed" because the other two conditions have already been eliminated, and line 4 need only specify "Yellow when Block 5 is Occupied", because the other three conditions have been eliminated.  

Think about priorities and you may greatly simplify your logic.

P.S. See the blog section on "Signals Controlling Signals" to see how you could reduce the last two lines to simply:

  • Yellow when Signal 3 is Red.

Let's Engineer Your Vision Together!

Have a question about our model railroad control systems? Want to discuss a customized solution for your layout? Whether you're just curious or ready to embark on a railroading adventure, drop us a line! We're here to bring your model railroad dreams to life.

Get in Touch