You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This guide explains how to configure JCS for a layout and automatically run trains.
7
+
For the purpose of this guide the following Layout is used.
8
+

9
+
10
+
This layout consist out of 4 blocks and 2 switches.
11
+
Every block has 2 sensors, in total there are 8 sensors used.
12
+
What is a Block? A block is a part of track where one train can be without hindering other routes. In JCS a block is always demarcated by two sensors.
13
+
14
+
## Drawing the Layout
15
+
16
+
When JCS is started select the Edit Button to enable edit mode.
17
+

18
+
19
+
JCS will show the Edit Layout Screen
20
+

21
+
22
+
The Toolbar has the most common elements to draw a layout. A layout consist out of tiles. A Tile mimics a component like a straight, sensor, block etc.
23
+
Use the __+__ button to add a tile on the canvas. The Bin button will delete a tile.
24
+
Rightclick on a tile to see properties or rotate or flip if applicable.
25
+
When a tile is selected it can be dragged to the right position. Tiles are automatically saved. The example looks like this when all tiles are placed on the canvas.
26
+
27
+

28
+
29
+
## Configuring Accessories and Sensors
30
+
31
+
The next step is to configure the Accessories and Sensors.
32
+
Accessories Sensore and locomotive are alway linked to a Command Station.
33
+
#### Step 1 selecting the Default Command Station
34
+
For this guide the [DCC-EX](https://dcc-ex.com) Command Station is used. Feedback via [DCC-EX](https://dcc-ex.com) is not yet supported, see [issue 59](https://github.com/fransjacobs/model-railway/issues/59), hence the [HSI-S88](https://www.ldt-infocenter.com/dokuwiki/doku.php?id=en:hsi-88-usb) is used for Sensor feedback.
35
+
Use the cog button or via Menu -> Tools Command Stations to show the Command Station Dialog.
Use the Refresh button on the right side of the Serialport dropdown menu to refresh
40
+
connected serial ports. In this example the [DCC-EX](https://dcc-ex.com) is connected via the "ttyACM0" port.
41
+
42
+
Set the [DCC-EX](https://dcc-ex.com) Command Station as __Default__ and __Enabled__.
43
+
The Test Button can be used to check whether the connection can be established.
44
+
45
+
##### Setup the Feedback module(s)
46
+
In the Command Station Dialog select the [HSI-S88](https://www.ldt-infocenter.com/dokuwiki/doku.php?id=en:hsi-88-usb) in the Command Stations dropdown menu.
Do __*NOT*__ set the [HSI-S88](https://www.ldt-infocenter.com/dokuwiki/doku.php?id=en:hsi-88-usb) as *Default*, as the default Command Station is supposed to put the power on the Track. However set the [HSI-S88](https://www.ldt-infocenter.com/dokuwiki/doku.php?id=en:hsi-88-usb)__Enabled__.
51
+
52
+
For the Feedback Interface like the [HSI-S88](https://www.ldt-infocenter.com/dokuwiki/doku.php?id=en:hsi-88-usb) the number of connected S88 modules has to be specified. Set the Channel to which the S88 module(s) is/are connected and the number of Modules.
53
+
In this case one S88 module, connected to Channel 0 is used.
54
+
Click on __*Re-create Sensors*__ button to create the sensors in the system.
55
+
56
+
### Step 2 create Accessories
57
+
The Test track has two turnouts which can be added using the Accessory Dialog. This Dialog can be opened via Settings (Mac) or Menu -> Tools -> Options.
58
+
To Add a new Accessory click on the __+__ button. For a Turnout choose the right Turnout type in the __*Type*__ dropdown menu.
59
+
60
+

61
+
62
+
To save the Accessory click the Save Button. When save the Accessory will appear in the list on the left side. This List can be filtered using the 3 radio buttons on top (All, Turnouts, Signals).
63
+
64
+
### Step 3 add Locomotives
65
+
As we are in the options Dialog let's also add the Locomotives. In this Example two locomotives used. For both locomotives an icon is already put in a subdirectory .../jcs/images.
66
+
67
+

68
+
69
+
Locomotives can only commute back and forth, hence the __Commuter__ check box is selected for both locomotives. If the __Commuter__ checkbox not selected the Locomotice can __*NOT*__ change direction in Automatic mode.
70
+
71
+
### Step 4 Link sensors to their graphical representation
72
+
73
+
JCS "knows" where a locomotive is by monitoring the sensors on the track. Every sensor has to be linked to the location in the schematic layout. As already mentioned a block allways needs two sensors. When a train arrives in a block (enter) the enter sensor detects this. When the train reaches the destination, a.k.a. is fully in the block, this is detected by the occupation (in) sensor.
74
+
When a sensor is active JCS will "see" this as occupied and in automatice mode will not plot a route to this block.
75
+
To link a Sensor, right click on a sensor.
76
+
77
+

78
+
79
+
Click on Properties and select the pysical sensor.
80
+
81
+

82
+
83
+
If you do no exactly know which sensor is at this location, you can use the Sensor Monitor. Click on the Sensor Monitor button to activate.
The Sensor Monitor will appear. When the sensor is activated (pre condition is that the HSI-S88 is connected), it will be visible in the Sensor Monitor as active.
Select the Sensor with the right name in Sensor Properties dialog. Repeat this for all sensors in the layout.
92
+
93
+
### Step 5 Trace the layout
94
+
Trace the layout. This will generate all the driveways from block to block. Click on the __*Trace*__ button.
95
+
96
+

97
+
98
+
Left of the Main JCS Window the Routes Dialog will Appear.
99
+
Click in the __*Trace*__ Button in the *Routes Dialog* to generate all possible routes.
100
+
101
+

102
+
103
+
When a route is selected in the list it is displayed in the main screen.
104
+
105
+
### Step 6 Configure the Blocks
106
+
Configure the Block properties.
107
+
First Restart JCS. This is due to a [known issue 78](https://github.com/fransjacobs/model-railway/issues/78).
108
+
109
+
The Sensors must be linked to a block. The side of the Block with the __Bold__ line is the __+__ (plus) side of the Block. The Sensor can be automatically linked.
Experiments wich should eventually lead to automated rail road control.
14
-
15
-
## Why?
16
-
To have fun!
17
-
I know there are ready to go products on the market. This project is not an attempt to compeat with any of them,
18
-
hence this project is Open Source so anyone can benefit.
19
-
11
+
***
20
12
## About The Project
21
-
JCS is an application to control a model railway. It is in an early stage of development.
22
-
The project mostly contains my experiments to automate my model railway.
13
+
JCS is a hobby project of me where I try to automate my Model Railway. The past year I have on and off worked on several aspects or modules of the software whic are needed to finally drive automatically. A short summary of the topics which are needed and used to finally be able to drive a train automatically:
14
+
- Connectivety to the Command Station hardware. (DCC-EX,HSI-S88, Marklin CS2/3)
15
+
- Edit and display graphically a layout
16
+
- With the layout be able to route all the possible drive ways
17
+
- Show the routes and driveways in the layout screen
18
+
- Graphically feedback events on track to the layout screen
19
+
- Input dialogs to setup Accessories, Locomotives, Command stations, etc
20
+
- Locomotive Drive Cap so tha you can manually run you locomotive
21
+
- Virtual Command Station, to ease testing and simulate automatic driving
22
+
- Monitor Sensor events
23
+
24
+
I created a [short video](https://youtu.be/xP6eUdScMY0) demonstrating automatic running of locomotives. Also a [video of pysical locomotives running on the Test Layout](https://www.youtube.com/watch?v=CyLmGk6gfHA)
23
25
24
-
I started this project 2019 as (and still is) a hobby to automate my model-rail layout.
25
-
As I am trying to do this project beside my work, family and other hobbies it is a project with sometimes a very slow pace...
26
+
## Why?
27
+
There are already many "out of the box" working products. I wanted to create my own to learn and to have FUN!
26
28
27
-
The aim of the program is to automate the running of trains on my layout.
29
+
As I am a great supporter of Open Source I have put the project on github with the purpose for others to use it, learn from it, or improve it.
28
30
29
-
## Supported Hardware
30
-
*[DCC-EX](https://dcc-ex.com) can be connected either via serial port or network
*[HSI-S88](https://www.ldt-infocenter.com/dokuwiki/doku.php?id=en:hsi-88-usb) or the [DIY version](https://mobatron.4lima.de/2020/05/s88-scanner-mit-arduino) for feedback
31
+
So I hope you get inspired!
34
32
35
-
## NEW
36
-
* Layout router, After the layout is created automatically all driveways are calculated.
37
-
* Autopilot, automatically drive locomotives.
38
-
* Virtual Command station.
39
-
* Auto [Simulator](https://youtu.be/xP6eUdScMY0) in the Virtual Commandstation to test routes.
40
-
41
-
## Current status
42
-
Currently the following modules are build:
43
-
* A Throttle for driving locomotives
44
-
* Keyboard Screen for switching Turnouts or Signals
45
-
* Sensor Monitor to see the status of feedback sensors
46
-
* Locomotives overview (including automatic downloading of the Locomotive- and function button images) and control.
47
-
* Turnout and Signals overview (Synchronized with the CS2/3) and control.
48
-
* A Screen to edit/display de schematic Layout.
49
-
* A HAL for command Stations such that other hardware then the Marklin CS 2/3 can be used.
50
-
*[First Release V 0.0.1](https://github.com/fransjacobs/model-railway/releases/tag/V0.0.1)
*[HSI-S88](https://www.ldt-infocenter.com/dokuwiki/doku.php?id=en:hsi-88-usb) or the [DIY version](https://mobatron.4lima.de/2020/05/s88-scanner-mit-arduino) for feedback
71
+
72
+
## Current status
73
+
Currently the following feature are in development:
74
+
* Internationalization enable multiple languages
75
+
* Add support for ESU ECOS
76
+
* Show Signal aspects in automatic driving
77
+
* Document
78
+
78
79
## TODO's (and there are still a lots of todo's...):
79
80
Currently the following features are under active development:
80
-
* Configuration screens to edit the Locomotives, Accessories and Sensors. [more or less done :)]
81
-
* Add deployment configuration for MacOS, Windows and Linux an App [more or less done :)]
82
-
* Automatically route the Layout. [more or less done :)]
83
-
* React on relevant CS-3 events like start/stop, Sensor events, Loco, Accessory, power etc events. [work in progress :)]
84
-
* Automatically run trains. [Work in progress]
81
+
* Documentation
82
+
* Enhance GUI
85
83
* Add more Unit tests
86
84
* ...
87
85
88
-
So I hope you get inspired!
89
-
90
-
Frans
91
-
92
86
## License
93
87
[LICENSE](LICENSE.md)
94
88
@@ -111,7 +105,6 @@ Frans
111
105
</tr>
112
106
</table>
113
107
114
-
115
108
** Copyright 2019 - 2024 Frans Jacobs **
116
109
117
110
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
0 commit comments