The S³ Logic Engine

The S³ Logic Engine

The S³ Logic Engine

Control logic consists of a sequence of one or more “Logic Lines”, each of which contains a set of conditions that affect the state of a device. For example, a logic line may state Signal 3 is Red when Block 1 is Occupied and Turnout 7 is Reversed. Any number of logic lines may be listed for a single device, although it would be rare to need more than a handful for any one device.   

Each line may consist of up to 8 logical terms. These terms are “anded” together – i.e. all terms must be “true” to consider that line of logic as “true”. The logic lines are created via a simple point-and-click method with little typing required and all entries are immediately validated.

When a line of logic is found to be true, the condition selected for that line is set (the “Resulting State”) for that device. The state of any device on the layout may be set based on the condition (state) of any other device or combination of devices, regardless of where they are on the layout. 

In effect, the logic you define “wires” the devices on your layout together, so that any device can have an effect on the operation of any other device, regardless of where it is located or the card to which it is attached. One advantage of this is that wiring can be localized by placing I/O cards close to the devices, so that wiring length is minimized. This is especially useful on modular layouts, when building a layout as separate sections, or when setting up control panels which are located remotely from the devices being monitored or controlled.

The logic engine recognizes default states, so that if none of the listed logic lines are true the device reverts to that state. For example, a signal may default to red unless one of the logic lines specifically sets it to green, yellow, or some other state. If no default is specified, the device will remain in its previous state until some logic changes it.
Examination of the logic is repeated continuously as long as the controller is running, looking for any changes on the layout that may cause a device to be set to a new state. When a change is found, the updated state is sent to the appropriate device via a message on the network, and the resulting state will be displayed (if a signal or indicator) or otherwise cause some operation to take place (like moving a turnout). This cycle is repeated dozens of time per second for every defined device for which control logic has been specified, so there are no noticeable delays regardless of layout size or complexity.

(Pictured Above: A large control panel operated via the S³ Master Controller)

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