Content → Hardware → CTC Modules → CTC Rocrail Configuration
This documentation is based on Rocrail Version 2.1.4034 dated 09.01.2024 .
Update: 25.03.2024 Rocrail Version 2.1.4365
Update: 10.04.2024 Rocrail Version 2.1.4441
Update: 17.04.2024 Rocrail Version 2.1.4471
Update: 01.05.2024, Rocrail Version 2.1.4542, ctc_accessory-126-off "Buffer" expanded to "Buffer with Always ON"
The development is still "Work In Progress" (WIP).
This description may be changed without notice.
ctc-rrconfig-en
A CTC board (CTC = Centralized Traffic Control) may be designed and simulated with Rocrail. Therefore for nearly each Rocrail plan object a corresponding CTC object can be found.
By editing the track plan CTC objects can be selected out of the "Add item" list and than can be dragged into the track plan.
Any CTC object at first gets a standard ID like "sw02".
A good practice will be to change the ID by using a prefix of "ctc_" and the ID of the corresponding Rocrail Track object for example:
- switch "sw01" and CTC object "ctc_sw01".
This can be done by editing the properties of the CTC object (not the properties of the track object).
Some CTC properties are stored in the Rocrail Properties / Automatic / CTC:
With Rocrail Verion 2.1.4454 a change of the CTC properties will become affective immediately - without a restart of Rocrail.
CTC events | OFF | default |
ON | is required for CTC button simulation in the Rocrail plan; - if this option consumes too much CPU load switch it off! |
|
CTC occupancy priority | OFF | default; CTC track elements will show route color |
ON | CTC track elements will show block color if they are bound to a block | |
CTC black on free | OFF | default |
ON | CTC track elements will show in black color (LEDs are off) |
The Rocrail workspace .
A link between the track object and the CTC object has to be configured.
For that edit the properties of the track object and klick the button "Pixel CTC…".
Please remember:
to simulate clicks to the CTC buttons inside the Rocrail plan
- Rocrail Properties / Automatic / CTC / CTC events must be activ !!!
Otherwise you may leave CTC events inactive to avoid unnecessary communication traffic.
![]() | For a Rocrail output the "accessory-120" is used as a CTC-Module. Open the output properties and then open the "Pixel CTC…" properties and configure it equivalent to this: |
![]() | A detailed example can be found at the next point in CTC_1Button_2Leds. |
![]() | A detailed example can be found in CTC_1Button_2Leds. |
![]() | This example CTC_2Buttons_1Display uses an XMLScript. |
The CTC modules are using LEDs of type WS2811/WS2812. These LEDs are addressed in a sequence of addresses starting with LED number 1. The LED configuration assists the user to calculate these LED addresses.
Configuring the LEDs in most cases is done by clicking the button "Preset". The checkboxes for the 6 LEDs fitting to the CTC object will be setup automatically. The LEDs will illuminate the track portion of the CTC module.
Some objects may show additional lights in addition to the track LEDs. This LED must be defined with its "Function" LED number.
This example shoes a signal with two track LEDs number 2 and number 5 and the signal "Function" LED number 3.
The Buffer object shows an optional "Always ON LED" ("AON"). This LED must be defined with its "AON" LED number.
An "Always ON LED" may be configured in all CTC-Modules.
Simulation is done if the Rocrail SVG symbol shows a configured LED number.
This example shows the Buffer with one track LED number 2 and the "AON" LED number 5.
The color of the AON LED is defined by the bottom right color of the Color setup.
The old behavior of the CTC-Module is given with:
- LED5 not aktive
- AON = 0
If special CTC modules are used each of the 6 LEDs can be setup manually:
This example uses a blinking additional LED and is controlled by an external action/script.
The configuration just takes care of the LED numbering.
The additional LED will not have any effect during the simulation of the CTC modules.
Starting with Rocrail Version 2.1.4470+ the CTC LEDs can be testet.
Only the selected LEDs can be testet; in this case LED2, LED3 and LED5.
The LEDs can be toggled ON and OFF.
The color used is the "Default" color.
Update: a black color will be replaced by the white color to make the LED visible. (RocrailVersion 2.1.4471+)
Configuring the colors of the LEDs in most cases is done by clicking the button “Preset”. The colors for the states of the object are handed to the CTC object.
The general preset colors are defined in the CTC Preset section.
The intensity of the light of the LEDs is setup by the value of "Brightness".
- The default value of "17" is given to keep the power consumption small and to keep the users eyes save.
The checkbox at the right of each color offers a "blinking" option for that color.
- The frequence of blinking can be controlled by the value of "Delay".
- The "Delay" value may vary between 0 and 15; the default value is 1.
– value 1 = low frequency of blinking;
– value 15 = high frequency of blinking;
– a value of zero will be corrected to 10 internally.
The "Delay" value is valid for all colors of this CTC-Module if blinking is on for this color.
The "Brightness" value is valid for all colors of this CTC-Module.
"Delay" and "Brightness" together are responsible for blinking;
- the intensity of the light of the LEDs is dimmed up and down between 0 and the "Brightness" value;
- the increment of dimming is done with the "Delay" value;
With "Copy" and "Paste" the color setup values can be transported from one CTC-Module to another CTC-Module.
With "Preset" the color setup values of the preset color are filled in the fields of this color setup.
The "state color" is mostly used for routes and blocks. The color values are predefined for RGB-LEDs.
![]() | - an example can be found at – CTC State Color Runtime Example - use a low value for the "Brightness" to protect the spectators eyes! - "Delay" for blinking |
The user should use the color picker to select a specific color.
The "aspect color" is mostly used for signals. The color values are predefined for RGB-LEDs.
![]() | an example can be found at CTC Aspect Color Runtime Example |
The user should use the color picker to select a specific color.
The “output/sensor color” is mostly used for outputs and sensors. The color values are predefined for RGB-LEDs.
It is quit common to use the colors for outputs and sensors in an inverse way:
Sensors | Outputs | |||
---|---|---|---|---|
![]() | ON = red OFF = green | ![]() | ON = green OFF = red | an example can be found at CTC Output Sensor Color Runtime Example |
Hint: if there are more CTC outputs used (than CTC sensors) change the preset to the colors of a CTC output.
To let Rocrail calculate the LED addresses the buttons "Up", "Down" and "=" can be used.
Move the first CTC-Module with the "Up" button into the first position and press the "=" button afterwards. The LED addresses of this selected CTC-Module becomes the next (or first) address and the LED addresses of all following CTC-Modules will be updated. Cool!
Continue with the next (and all other) CTC-Module the equivalent way.