This text describes the configuration of the turnout modules and how the IR beacons are assigned an action.

It is assumed:

  • the track layout is set up,
  • the signals are wired to the turnout modules,
  • the IR beacons are wired to the turnout modules,
  • the power supply is complete,
  • the turnout modules have been reset,
  • the turnout drive is connected and
  • the IR beacons are connected.

As a reminder: The wiring for each of the turnout modules is as follows:

Wiring turnout, signal, IR beacons

Up to this point, the following has been completed: The wiring has been completed and the "products" (turnout drive, semaphore signal and IR beacons) are connected to their respective ports/pins of the module.

Assigning an action to an IR beacon

Basic idea

The basic idea behind the following configuration is: When a locomotive approaches a signal, it should receive information about whether the signal is displaying "stop" or "proceed" and how far the locomotive is from the signal. This information is sent to the locomotive via the IR beacons installed in the tracks.

  • If the signal is displaying "proceed", the locomotive continues unchanged.
  • If the signal is displaying "stop", the locomotive should slow down and stop before the signal.

Here is a schematic of the layout again:

Track oval basic signal, turnouts, IR beacons

In the direction of travel of the locomotives, 2 IR beacons are installed in front of each signal. As an example of a sequence, assume that the shunting locomotive BR365 is traveling towards signal "Demo-S-D1-re" and the signal is displaying "stop". The following sequence results: Passing over "Demo-W-Links". Travel over IR beacon D12. The information sent by D12 has the following content: "Here is IR beacon D12, the distance to the upcoming signal is 80 cm, the signal is displaying 'stop'." The locomotive gradually reduces its speed so that it would come to a stop after 80 cm. Since the distance between D11 and D12 is less than 80 cm, D11 is passed at an already significantly reduced speed. Travel over IR beacon D11. The information sent by D11 has the following content: "Here is IR beacon D11, the distance to the upcoming signal is 0 cm, the signal is displaying 'stop'." The locomotive immediately reduces its speed and comes to a stop.

Implementation

The following describes the configuration of the module in "Demo-W-rechts" for IR beacons D11 and D12 accordingly.

When the IR beacons are connected, the CTC app has already set up a lot internally for this purpose.

Clicking on "Settings" and "Configurator" opens the configurator. Clicking on the pencil in the SwitchBox row with the ID "Demo-W-rechts" opens the "Edit switch box configuration" window. Clicking on the "Actions" tab opens the corresponding window. Clicking on the TRIANGLE IN FRONT OF "IR beacon: D11-Conn" opens further options. Clicking on the field "Trigger: D11-Trigger" opens further options in "Action details". Clicking on the "Select" field opens the "Select trigger" window.

Configuration action IR beacon

Next, selecting the trigger: Under "Action group", select "SignalTower", under "Action", select "Demo-S-D1-re", clicking on "Apply" closes the window again.

Configuration action IR beacon

For the beacon directly in front of the signal, the action details are already correctly configured: In all cases ('42'), the state of the signal is transmitted unchanged as a command (param '?').

Configuration action IR beacon

IR beacon D12 is configured almost identically to D11. However, in this case, when the signal is red, the locomotive should not stop immediately, but slow down to minimum speed over the distance to beacon D11.

  1. Clicking on the TRIANGLE IN FRONT OF "IR beacon: D12-Conn" opens further options.
  2. Clicking on the field "Trigger: D12-Trigger" opens further options in "Action details".
  3. Clicking on the "Select" field opens the "Select trigger" window.
    1. Under "Action group", select "SignalTower",
    2. under "Action", select "Demo-S-D1-re",
    3. clicking on "Apply" closes the window again.
  4. In the "Action details" section: Clicking on the TRIANGLE IN FRONT OF "D12-Trigger" opens further options.
  5. In the "Action details" section: Clicking on the TRIANGLE IN FRONT OF "When 'Demo-S-D1-re' == '42'" opens further options.
  6. Clicking on the row "When 'Demo-S-D1-re' == '42'" displays the parameters of the if command on the right.

Configuration action IR beacon

First, the special case "signal red" should be handled. The letter assigned to this state can be found in the user manual in Chapter 4.5 "Config - Edit script" .

Alternatively, you can simply look at the signal configuration. Clicking on the TRIANGLE IN FRONT OF "Semaphore signal magnetic: Demo-S-D1-re-conn" opens further options. Clicking on "Function (Stop): Demo-S-D1-re" displays the action details. Clicking on the script "Switch to Hp0_Bar ('h')" shows the details of the state with the letter 'h'.

The symbol to the right of the script window speaks more than a thousand words.

Signal state 'h'

Back to the trigger, the state 'h' can now be entered in the if command. Clicking on "Trigger: D12-Trigger" switches back to the trigger of beacon D12. Clicking on the row "When 'Demo-S-D1-re' == '42'" displays the parameters of the if command on the right. Clicking in the field below the Remove button allows entering the letter 'h'. In the field below, enter a name matching the condition, e.g. "stop".

Trigger D12 when 'h'

Next, what should happen when 'h' occurs must be specified: Clicking on "param '?'" displays the parameters of the "param" command on the right. Clicking on the button next to '?' opens the command selection.

Trigger select command 'm'

In all other cases, the state of the signal should be adopted again. To do this, a new if command for any states must be added. Click on the top row in the script area ("D12-Trigger"). Then click on "Add".

Trigger new if

  1. Enter the asterisk ('42') as the condition for the if command.
  2. Enter a name matching the condition below, e.g. "otherwise".
  3. Change the script position below from 0 to 1.

Trigger new if

Now add the command for the new if command. Click on "Add" - the "Select new command" window opens. Click on the "setChar" command. Then click on "Apply".

Trigger new if

The line "param '?" is selected. Now enter that "cmd" should adopt the state of the signal ('?'): From the list under "Remove", select the value "cmd". Click the button to the left under the selection list - the "Select command" window opens. Select the line '?'. Click on "Apply".

Trigger new if

The script for the trigger of beacon D12 is now complete:

Trigger new if

What is still missing is the distance for braking. Since this is independent of the state of the signal, it is set as a fixed value instead of changing it in the script. Click on the line "cmdDist" under "Connections and parameters of the product". Click on the pencil symbol to the right of the selected line.

Trigger new if

The beacon D12 is now also fully configured:

Trigger new if

Clicking on "Upload" completes the changes to the triggers of both beacons D11 and D12.

Configuring a second turnout module

The second turnout module is configured in exactly the same way as the first turnout module. It has exactly the same connections: one turnout drive, one semaphore signal with magnetic drive and two IR beacons. When selecting the product, note that it is a turnout that turns left.

The assigned names are:

  • Module: Demo-W-Links
  • Signal: Demo-S-D2-li
  • IR beacons D22 (stop) and D21 (braking)

The configuration of the turnout modules is complete.