Skip to content
Ford edited this page Jul 12, 2014 · 3 revisions

Marklin Train System

Overview

The trains found in the realtime lab are a standard Märklin HO scale train system, controlled using a digital interface. The control unit, placed next to the track, is used to both control the trains manually and to interface with the Eos computers. This unit maintains a constant AC voltage on the track and also uses the track to transmit digital signals to decoders located on trains and switches. These decoders ensure guaranteed error free delivery of message packets across an extremely noisy transmission medium. Different interfaces could potentially be connected to the control unit. The keys on the unit itself can be used to control the locomotives. A separate unit could be purchased to control the switches, but this has not been done since control of all track activities will be performed by the Eos machines in this course. On the current track, the only interface connected to the control unit is that used for computer control.

Commands

Byte 1 Byte 2 Command
0 to 14 1 - 80 Set speed of the train.
15 1 - 80 Reverse direction of the train.
16 to 32 1 - 80 Set auxiliary function on the train.
16 1 - 80 Turn on/off train lights.
115 1 - 80 Turn off train horn.
118 1 - 80 Turn on train horn.
33 0 - 255 Set the switch to straight.
34 0 - 255 Set the switch to curved.
35 N/A Turn off solenoid.
193 to 223 N/A Read a single sensor module (1 to 31).
129 to 159 N/A Read the first N (1 to 31) sensor modules.
96 N/A Turn on train controller.
97 N/A Turn off train controller.
61 N/A Emergency stop.

Implementation Notes

  • You must turn off the solenoid after throwing a switch atleast 150 milliseconds after the last switch was thrown, and no more than 500 milliseconds after the last switch was thrown.

External Links

Clone this wiki locally