Element Controller

The purpose of the EC is to:

  • Provide an electrical interface to track side elements like points and signals
  • Control the connected elements according to orders received from the Interlocking
  • Provide actual status of the connected elements back to the interlocking

Orders received from the Interlocking includes throw order for points, order for semaphore signals, light signals and road signal to show a specific aspect and orders to close or open road barriers. Status provided to the Interlocking includes e.g. whether a road barrier is in position open or closed or is on its way to the end position (moving).

A special version of the EC is the EC/LINK, which in addition to the above, has a RF12 radio module, enabling it to communicate with the OBU of the trains. This includes receiving train position reports and sending movement authorities and mode authorities to the trains.


Element Controllers for the Winter Train version 5 must be able to control and supervise (at least) following types of track side elements:

  • Point Machine
  • Semaphore Signal
  • Light Signal, with optional route indicator
  • Road level crossing with road signals and optional barriers
  • Generic element

The various elements are described in the section Track side elements


The EC design will focus on a generic approach, providing a kind of “maximum” design, able to handle all mentioned types of elements. The design must be able to handle various combinations of types of elements, as each realized instance of the EC may be differently equipped with input and output hardware. This approach will allow different configurations of hardware to be controlled by the same generic software.

Depending on the actual hardware configuration, an EC will typically be able to control more that one element of the same type, e.g. two points or three light signals. This leads to the need for addressing of the hardware within each EC. As the various types of (input and) output hardware often can be used for more than one type of element (not at the same time, though), a way to specify the element type is also needed.

For each specific setup of points, signals etc., addressing and type specification could be achieved by individual software configuration of each EC. However, in order to simplify handling of SW for the EC, configuration management will be shifted to the RBC/IL. Based on configuration files in the RBC/IL, the RBC/IL will transmit configuration data to the EC's whenever either the RBC/IL or an EC restarts.


Points and semaphore signals in the LGB world are powered by the same type of step motor. This allows the same type of output driver (hardware) to control both points and semaphore signals. Barrier drives are using another type of motor (AC motor), but can be controlled by the same type of output hardware by means of different wiring.

Light Signals, route indicators and Road Signals will all be realized by LEDs and can hence be controlled by the same type of output hardware.

In order to handle the above listed elements, following types of output devices will be included in the design:

Name Device description I/O
P-device Driver for point motor and semaphore signal motor (two position step motor) and for barrier motor (AC motor) O
L-device Driver for one LED (on or off) O
U-device Binary universal device. “Push-pull” driver for one or two LED (one is on while the other is off) or binary input (active or passive/not connected) I or O

If an EC is equipped with more than one input or output device of a given type (P, L or U), each device will be identified by a number. Numbering of devices will start from 1 within each type of device. A maximum of 16 devices of the same type can be addressed.

The hardware details behind the various element types and devices can be found in the implementation section.

Given these types of devices, elements can be controlled as follows:

Element type Required hardware devices
Point Machine, without end position detector 1 x P-device
Point Machine, with end position detector 1 x P-device, 2 x U-device
Semaphore signal 2 aspects (“STOP”, “PROCEED”) 1 x P-device
Light Signal, 2 lanterns (“STOP”, “PROCEED”) 1 x U-device or 2 x L-device
Light Signal, 2 lanterns, 3 aspects (“STOP”, “PROCEED”, “PROCEED, expect PROCEED”) 2 x L-device
Light Signal, 3 lanterns, 3 aspects (“STOP”, “PROCEED”, “PROCEED, expect PROCEED”) 3 x L-device or 3 x U-devices
Route indicator, 2 segments 2 x U-device or 2 x L-device
Route indicator, 3 segments 3 x U-device or 3 x L-device
Level crossing with barrier and road signals *) 1 x P-device
1 x L-device or 1 x U-device
Level crossing with road signals only 1 x L-device or 1 x U-device

*) As road signals and road barriers are not to be activated at the same time, a road level crossing with barriers and road signals will be seen as two independent elements.

A route indicator is seen as an independent element as well.

Device configuration

Each EC will be dynamically configured by the RBC when either the EC or RBC is restarted.

Configuration of each element connected to an EC will be specified as follows:

<element type> <major device number> <minor device number>

where <element type> specifies the type of element connected to the EC. <major device number> and optionally <minor device number> identifies which particular device(s) the element is connected to. For a point machine with feedback, the major device will be controlling the motor, while the minor device will receive the position feedback from the point machine.

If the element requires more devices of the same type, e.g. two inputs, the next device(s) must be following immediately next to the first device specified. This will be the case for e.g. a point having end position detectors, as one P-device and two U-devices will be required.

Given the type of element, the type and amount of input/output devices is also known. Hence configuration is unambiguous within an EC.

Element type will be specified using following codes:

Code Element type Device type
Major device Minor device Remarks
0 No element connected
10 Point Machine, without end position detector 1 x P-device
11 Point Machine, with end position detector 1 x P-device 2 x U-device
21 Semaphore signal, two aspects 1 x P-device
30 Level crossing, road signal 1 x L-device
31 Level crossing, road signal 1 x U-device
32 Level crossing, barrier 1 x P-Device
40 Light Signal, 2 lanterns, 2 aspects 2 x L-device
41 Light Signal, 2 lanterns, 2 aspects 1 x U-device
42 Light Signal, 2 lanterns, 3 aspects 2 x L-device
43 Light Signal, 2 lantern, 3 aspects 2 x U-device
44 Light Signal, 3 lanterns, 3 aspects 3 x L-device
45 Light Signal, 3 lanterns, 3 aspects 3 x U-device
50 Route indicator, 2 segments 2 x L-device
51 Route indicator, 2 segments 2 x U-device
52 Route indicator, 3 segments 3 x L-device
53 Route indicator, 3 segments 3 x U-device

Elements using combinations of U- and L-devices are in principle possible, but are not foreseen.

Hardware capacity

As each realized EC might be equipped with different amount of device drivers, each EC will be statically configured according to the connected hardware. This include number of each type of devices (P, L and U) and the maximum number of devices, the EC can handle. The EC will report error, if these capacity limitations are violated during dynamic configuration.

Element addressing

When an EC is configured to handle more than one element (given it has devices for this), it must be possible to address each element within that EC. This will be achieved by an index defined by the order in which the elements are configured. First element configured will get index 0, second element configured will get index 1, etc..


An EC, which has hardware for two output devices of type P-Device (#1 and #2) and three output devices of type L-device (#1, #2 and #3) would provide following possible configurations:

Element type Configuration Addressed Output device
Point Machine 10, 1 P-device #1
10, 2 P-device #2
Semaphore Signal 21, 1 P-device #1
21, 2 P-device #2
Road level crossing, road signal 30, 1 L-device #1
30, 2 L-device #2
30, 3 L-device #3
Light Signal, two aspects 40, 1 L-device #1 and #2
40, 2 L-device #2 and #3
Light Signal, 2 lantern 40, 1 L-device #1 and #2
40, 2 L-device #2 and #3
Light Signal, 3 lantern 44, 1 L-device #1, #2 and #3

Configuring elements outside this space will be reported as an error, but will otherwise have no effect.

EC Order and Status

The EC will accept following main orders:

  • Status request, EC
  • Element order and status request: Send order to and request status for one specific element
  • Status request, all elements
  • Configuration order: Add or delete configuration data

Status Request, EC

This order will request the EC to transmit internal status information

Element Order and Status Request

This order will send an element order to a specific element and request the EC to transmit the current status of that element.

The EC must be able to handle following element orders depending on the type of element to be controlled:

Element type Element Order Code Order type 2)
(reserved) 0
Point Machine Throw right 11 Single
Throw left 12 Single
Throw right and hold 1) 13 Single
Throw left and hold 1) 14 Single
Release 1) 19 Single
Level Crossing, Barrier Close Barrier 21 Single
Open Barrier 22 Single
Semaphore Signal Show STOP 31 Single
Show PROCEED 32 Continuous
Light Signal, two or three aspects Show STOP 31 Single
Show PROCEED 32 Continuous
Light Signal, three aspects Show PROCEED, expect PROCEED 33 Continuous
Level Crossing, Road Signal Show PASS 41 Single
Show STOP 42 Single
Route indicater, 2 segments Show segment combination 0..3 0..3 Single
Route indicator, 3 segments Show segment combination 0..7 0..7 Single

1) Normal throw order for point machines will result in a single pulse of power to the motor sufficient to throw the point. The throw and hold orders will result in the motor being powered continuously. The motor will hence provide a stronger holding force. In order not to overheat the motor, the power will automatically be switched off after a specific time (30 s). The release order will switch off the power immediately.

2) Orders can be send as either single orders or continuous repeated orders. The order for signal aspect “PROCEED” and “PROCEED, expect PROCEED” must be repeated continuously in order keep these aspects. If orders marked with continuous are not repeated, the EC will after a few seconds change the signal aspect to “STOP”.

For each element type following element status must be handled by the EC:

Element type Element Status Code Description
Point Machine Unsupervised 0 Actual position of point is neither right nor left or is unknown
Supervised Right 1 Feed-back: position right
Supervised Left 2 Feed-back: position Left
Supervised Right, holding 3 Feed-back: position right, holding
Supervised Left, holding 4 Feed-back: position left, holding
Unsupervised, right 5 No feed-back; previous order right 3)
Unsupervised, left 6 No feed-back; previous order left 3)
Unsupervised, right, holding 7 No feed-back; position right, holding 3)
Unsupervised, left, holding 8 No feed-back; position left, holding 3)
Road Barrier drive Unsupervised 0 Barrier position is unknown
Closed 1 Barrier is in position closed (down)
Open 2 Barrier is in position open (up)
Moving up 3 Barrier is opening
Moving down 4 Barrier is closing
Semaphore and Light Signal Unsupervised 0 Signal aspect is unknown
STOP 1 Signal is showing STOP
PROCEED 2 Signal is showing PROCEED
Light Signal, three aspects PROCEED, expect PROCEED 3 Signal is showing PROCEED, expect PROCEED
Road Signal Unsupervised 0 Signal aspect is unknown
STOP 1 Signal is showing STOP
PASS 2 Signal is showing PASS
Route indicator, 2 segments Combination 0..3 0..3
Route indicator, 3 segments Combination 0..7 0..7

The status “Unsupervised” will reflect any situation, where the physical position or state of the element for what ever reason is unknown to the EC. For elements without feedback, this is probably only relevant during start-up.

3) Point motors can be equipped with a position detector (e.g. a switch), providing feed-back information of whether the point is in position right, left of unknown. If a point is not equipped with such detector, point status will be based on the latest executed order.

Status request, all elements

This EC order will request the EC to transmit current status of all configured elements. For each configured element, the EC will transmit element status as listed for Element Order and Status Request

Configuration order

This order will request the EC to either delete the current configuration or to add configuration of one element.

it/wintertrainv5/design/ec/start.txt · Last modified: 2022/11/08 13:28 by jabe