This article is outdated with version 4 of CTC. You can find the follow-up article here.

Note: This article was updated on 02/05/2021 to be compatible with version 3 of CTC.

This article is a continuation of A CTC Model Railway Emerges and delves into the automation of this model railway.

The CTC app basically only offers some simple automations. Anyone aiming for more must wait a little longer until we have created an interface to model railway control software like iTrain.

The foundation for automation always consists of suitable sensors. With CTC-IR-Balises on the track and corresponding receivers in the locomotive, CTC is well equipped here. Because, unlike classic sensors with switching tracks, light barriers, or reed relays, the CTC app not only knows that something has passed by but exactly which locomotive.

Automatically stopping before a red signal

The simplest automation can be solved in CTC without any intervention by the app. The IR-balis informs the locomotive that and at what distance it should stop. We set the necessary link between the signal and the IR-balis in the configuration of the CTC turnout module to which the IR-balis is connected.

To do this, we search for the relevant CTC turnout module in the configurator and click on the pencil icon. The “Edit Control Box” dialog opens. There, we add the IR-balis via the product catalog and then switch to the “Actions” tab.

There, we select the trigger under the IR-balis in “connected products.” The “Action Details” appear. There we click on the button to the right of “Trigger” and select the corresponding signal:

Edit Signal

The necessary scripts and commands were already created when importing from the product catalog. We just need to enter the correct distance to the stopping point in the scripts:

Edit Signal Actions

After clicking on “Upload,” we can test if our configuration works: As soon as a locomotive passes the appropriate IR-balis before a red signal, it begins to brake. At the latest, when crossing the second IR-balis (with cmdDist = 0), the locomotive stops.

If we have set the braking parameters of our locomotive well enough, we can even forgo the second IR-balis.

Switching when passing an IR-balis

If we want to switch a turnout or signal when an IR-balis is passed, the CTC app must take over. How this is done is described in the chapter Linking Actions of the user manual.

At a later point, we will go into more detail on this topic within a comprehensive example.