Skriv ut

Short about messages on the network

When multiple decoders are used together, they are linked together to form a network. On this network, messages are sent.
Everything that the different decoders perform, are announced on the network and other decoders can listen and act. So, for example, when a turnout announces a change of state and that means that all control panels and computers will find out the new state and can update their display.

MGP's decoders follow the LocoNet standard and there are many different types of messages defined but many of them are about driving handles and the like.
A subset of the LocoNet messages is used for track control and these are summarized here.

Addresses

All items on the track are identified with addresses. So each turnout, signal, track detection, etc. gets an address.
The addresses should be in the address range 1-2048 for turnouts etc., while track detection can be between 1-4096.

Change orders turnouts and other items

"Switch order" is used to give orders to turnouts and other items to change their state. A "switch order" is sent to an address and with the position you want the recipient to assume.
For example, a turnout with address 100 would get the order: "Switch Order 100, Closed position".

A turnout that changes it's state, send information about that with a message of the type "Switch feedback".
The turnout in the previous example will  send "Switch Feedback, 100, Closed position", when it has changed it's position. Should the turnout, for some reason, not change, the message would instead be the current state, e.g. "Switch Feedback, 100, Thrown position".

Other items than turnouts are also controlled by "Switch order". signal can be set to STOP with "Switch order, signal address, STOP".

Status Messages

Track occupancy detectors and similar things report events with status messages.
So, if a track section with occupancy detection with address 1400, and the track section becomes occupied, the message "Status, 1400, Occupied" will be sent.

Safety Messages

Signals announce their states with safety messages.
If a signal, with the address 800, changes the mode and displays "Go 40", the message "Safety, 800, Go40" is sent.

Intelligent decoders utilize messages

Turnouts, signals and other items are connected to a decoder, and the decoder handles the messages for the item.
The decoder has a description on how the item is affected by various events in the surroundings.

Example: distant signal

The task of a distant signal is to prepare the train driver for what a coming signal will show. In the decoder that manages the distant signal, the address of the next signal is entered.
When a messages about the state of the next signal is heard, the aspect of distant signal can be adjusted to show the train driver what is coming.

Example: automatic turnout.

A turnout could be made to automatically adjust its position when a train approaches, to allow the train to pass through the turnout. For this the decoder of the turnout would listen for track occupancy messages and adjust the turnout to the correct track when a messages is heard.
If the turnout is changed, then it will also announce the change with another message, so for example a nearby signal could change from "Stop" to "Go".

Example: Control panel

Building a control panel becomes very easy.
The brain of the control panel are one or more panel decoders, whit connected buttons and LEDs.

For a button, you define in the panel decoder, what should happen when the button is pressed, for example, When the button is pressed, a "Switch Order" message is sent to the network. Switch 100 hears the message and changes it's position.

The control panel can indicate the state of turnouts with LEDs. So to show that turnout 100 is set to the side position. a LED can be lit on tha panel. The definition for this LED would be to lit up when "Switch 100 is thrown", so when the panel decoder hears the corresponding message "Switch Feedback, 100, Thrown position", this LED will light up.

Note that the order for switching turnout 100 does not need to come from this switchboard to change our LED.
No matter why the turnout got changed, the message "Switch Feedback, 100, thrown position" will be heard and our LED can be updated to the correct view.