SourceForge.net Logo
  Home Experiment Download Project Page at SourceForge  

The Experiment

Distributed Control Lab

In coordination with the Institute of Computer Science at University of Potsdam the Hasso-Plattner-Institute is integrating a Märklin Model Railway into his lab. Within a lab experiment an user can pratice the implementation of parrallel and fault tolerant control applications.

 

The experiment compares two implementations of the control of the Märklin Model Railway. The first apllication was written in .Net with remote access and the second, our solution, use a realtime OS (QNX) and the rogramming language C/C++. For the source code look at the download section. The Märklin hardware is from the late 80's and consist of S88 Controller and other old periphery. The track is build with H0 rails.

Test Setup

To compare the both implementations we accelerate one locomotive to the maximum speed of 14 and in the second try of speed level 12. After the train pass over a contact, the program should instantly stop the engine. The results as shown in the table, demonstrate the braking distance of both applications.

Shell script

This code runs automatically the test.

rem initial assumtions:
rem train 1 is at sensor 0-7/9
rem current direction of the train is clockwise

changetraindirection 1
settrain 1 12
waitfor 3 15 1
stop

wait 10000
go
changetraindirection 1
settrain 1 12
wait 5000
settrain 1