The Gateway to Rocrail
This page as downloadable PDF: Rocrail Step-by-Step (Version of March, 2014)
- Language Versions (click on flags to access pages):
- The Russian version of the StepByStep: https://launchpad.net/rocrail/sunrise/2.0/+download/Rocrail_step-by-step_RU.pdf
| Please note: This tutorial is based on an unaltered first-time installation of Rocrail.
If changes of settings were made prior to reading this instruction success is not guaranteed!
A simple de-installation / re-installation of Rocrail will not help in this case! See footnote1)
This page aims to facilitate the first steps of beginners especially. It will guide the user from software downloading and installation through adding of locomotives and the creation of a track plan to a fully automatic control of the layout. By this it may offer valuable suggestions even to the advanced user.
This tutorial is kept as general as possible, i.e. it should apply equally to all operating systems and command stations. Thus, dialogues and settings pages will, depending on the operating system and personal settings, eventually look slightly different from the figures presented here. The contents remains the same, though.
An explanation of settings of all command stations supported is beyond the scope of this general introduction. The steps necessary to set up your individual command station are found on the wiki page of the respective command station.
- For quick navigating on large pages use the Table of Contents in the top right corner of each page
This section describes the very basic steps: Downloading, program installation, starting Rocrail for the first time and learning the concept from the demo track-plan.
Rocrail can be downloaded from the download portal (all operating systems).
OS-dependent information is found here (return to this page after the software was installed and proceed with section 1.3):
Rocview (not Rocrail!) is started from the start menu or the place where the OS holds the program links. Rocview opens and a pop-up dialogue shows up.
This is the Donation Dialogue. It will appear every time Rocview is started as long as no donation key was loaded. The window is closed by pressing OK.
Note: Rocrail is developed and maintained entirely on volunteer labour. However, some money is needed to run the project, e.g. for purchasing hardware for testing purposes and to cover other expenses like domain and server hosting.
It is thus left to the user to make a small contribution as a donation if the program should be liked and be used in the long term.
The pages Donation Dialogue and Donating inform about how to make a donation.
After closing the Donation Dialogue Rocview shows the user interface in English language setting. The language can be changed by choosing Language from the View menu and the desired language as shown on the picture below.
Note: The language does not need any change if the desired language is English.
Tip: If this tutorial is not available in your language it may be wise to stay with the English user interface for the time being as the following explanations are based on screen-shots from the English GUI.
A dialogue appears which is confirmed by pressing OK.
|Prompt to restart Rocview in order to use the new language setting|
Rocview has to be closed and restarted again in order the changes to take effect. A fresh, empty Rocview looks like this:
|Empty Rocview: No track plan and off-line (no connection to a Rocrail server)|
A workspace is opened from the File menu. This starts Rocrail (Server) and connects it to Rocview (Client) in order to control the layout.
|Opening a workspace|
A new window will open (appearance and functions depending on the relevant operating system) where the workspace folder
Rocrail is chosen from. This folder is found in the user folder, i.e. under “My Files” (older Windows), “Documents” (Windows) or “Home” (Linux) directory. This folder not the one of the same name in the program folder is highlighted and opened.
In the background the Rocrail server opens.
Note: On some operating systems (Linux, OSX, …) the server starts as an invisible background process, on other operating systems (Windows, …) the server is visible as a terminal window as described below.
The server window must not be closed during the whole session because the server is the component of Rocrail communicating with the command station. Again, do not attempt to close the server window!
|Example Server Window on a Windows Machine|
Tip: To facilitate the opening of the workspace in future choose Rocview properties… from the File menu then select the default workspace in the dialogue.
Note: Do not check the Use workspace at startup option for the time being because Rocview in some cases has to be started without server connection during the set-up.
In the standard configuration Rocrail uses the Virtual Command Station. A track-plan with two locomotives, E03 and V200, should appear as shown in the figure below. This virtual layout does not need any connection to a command station or a layout. It is meant as an example to learn about Rocrail's basic functions. The next chapter will explain how to work with the demo-plan.
| The Demo-Plan (plan.xml). The most relevant controls and indicators are described.
*: Track current display is working only if supported by the command station
**: For details regarding the status indicators see Command Station Status
To get a better overview the plan can be enlarged using the zoom.
|Using the Zoom|
The demo-plan is consisting of four blocks, eight sensors (green circles), two switches (points) and the connecting tracks. The direction tracks (green arrows) are for the orientation of the user only. Switches can be switched by clicking on their symbol. The sensors can be activated by clicking them. They are deactivated by a second click.
Note: Sensor simulation is working with the Virtual Command Station. Only a few other Command stations do support sensor simulation. See Supported Command Stations for a list.
On the demo layout each block is equipped with two sensors. Each time the first one, lying in front of the block symbol seen in driving direction is the enter sensor, the second one is called in. The enter sensor informs Rocrail that a locomotive has entered the block, the in sensor is the signal that the loco has now completely moved into the block. It will be explained later on that blocks can also be equipped with only one sensor or with additional sensors.
Loco E03, already present in block 04 (Step 1, see figures below), is started by double clicking on the block symbol of block 04. Now block 01 is marked as destination block and its colour changes to yellow (Step 2). With a click on the sensor symbol in front of the destination block seen in driving direction the enter sensor of block 01 is virtually triggered.
Tip: The names of the plan objects are shown if the mouse is moved over them. The correct sensor is
Block 01 now has changed to blue showing the loco has entered it. At the same time the route to block 03 and block 03 itself have been reserved as the loco can pass block 01 without stop (Step 3). The loco still continues to drive towards the end of the block where the in sensor is placed. To simulate this event the next sensor has to be activated:
fb1b. The block colour changes to red showing the block is now occupied. Block 04 lost its occupied state and appears in white (Step 4).
The sensors now should be deactivated again. In the example E03 continues to block 03 which was a random choice between blocks 02 and 03. The switch is always set according to the destination block. In block 03 (or 02 if this was chosen) the enter and in sensors have to be activated one after another (Steps 5 and 6). After a short stop the loco continues its journey back to block 04. The switch, again, is set to its correct position automatically. In this way the locomotive can, on the virtual layout, be driven around in a circle.
|1. The Demo-Plan||2. Loco started by a double click, destination block 01|
|3. Simulating enter of block 01||4. Simulating in of block 01|
|5. Simulating enter of block 03||6. Simulating in of block 03|
|7. The next destination is block 04|
To end the automatic session auto mode is switched off once the loco is standing in a block.
The command station (CS) and the computer are connected as described in the manual of the CS. Contact the manufacturer of the CS in case of any doubts and read the Rocrail Wiki page on the relevant Command Station.
Open Rocrail properties… from the File menu:
|Menu File / Rocrail properties|
The Controller tab is brought to the front, then the virtual CS (
vcs-1 - virtual) is highlighted and subsequently deleted by pressing Delete:
|Rocrail: Controller. Highlight and delete the virtual CS|
The desired CS is chosen from the drop-down menu New and added by pressing Add.
Note: Most command stations are not listed directly from drop-down menu. Often the protocol the CS uses to communicate with the computer has to be chosen instead. Which protocol applies to your CS is found on the wiki page of the Command Station.
The new CS is highlighted and configured after pressing Properties. The CS has to be configured following the instructions for this CS found on the wiki.
Example: The owner of a Uhlenbrock Intellibox “Classic” follows the link to Command Stations looks for the manufacturer Uhlenbrock, then clicks on Intellibox. On this page the two possible protocols p50x and LocoNet are explained. In the above dialogue p50x, as an example, is chosen and added. The new CS named
New - p50xis highlighted and the set-up dialogue is opened by pressing Properties. The dialogue itself is explained on the Intellibox page.
Generally at least the interface ID (a new CS gets the ID
NEW) and the baud rate as well as a port, bus or device the CS is connected to have to be specified.
Note: Rocview and Rocrail have to be closed and restarted in order the changes to take effect.
The command station has to be started up according to its manual. Then Rocview is started and the workspace has to be opened. Once Rocview and the server are running track power can be switched on and off using the symbol of Rocview. It should be verified the command station is responding to the command. Mostly this can be done by watching the track power indicator of the command station.
The plan-file contains all objects managed by Rocrail, including e. g. locomotives. The plan-file thus is a vital part of Rocrail.
If Rocrail was freshly installed and the standard workspace was opened the demo track-plan shows up. The name of the track-plan file is
In order to create an own track-plan Rocview is started and the standard workspace is opened in a first step. From the File menu Rocrail Properties… is chosen.
|Opening Rocrail Properties from the menu|
In the dialogue (see figure below) the name of the track-plan is changed from
plan.xml to a name of the user's choice, for example
Tip: The name of the file will be used in the next step again, so keep it in mind or copy it to the clipboard.
|Changing the name of the track-plan|
The dialogue is closed by pressing OK, then Rocview is closed. Rocview is restarted but at the moment no workspace is opened.
A new plan is created by selecting New from the File menu. The message window anouncing a missing server connection is confirmed by pressing OK.
|Creating a new track-plan||Confirm Message|
The window title now reads
Rocrail: New Plan. The new plan is saved using Save As… from the file menu. A dialogue or file manager opens pointing to the directory with the plan files. The file of the demo track-plan
plan.xml has to be present in this directory. The new plan is saved with its desired name (the name used before), in the example
|Saving the track-plan||Saving the new track-plan|
Tip: If track-plan files are saved to this directory the file path does need no change in Rocrail as this is the standard directory.
After saving the track-plan the workspace is opened. Rocview opens the new and empty plan which was created in the above step and the window title reads
In order to control a locomotive via Rocrail the locomotive has to be created in a first step.
From the Tables menu Locomotives is chosen causing the following window to open:
Now the button New is pressed. A locomotive with the name
NEW has been created.
|New loco was created|
In the next step the General tab is chosen and the Loco's ID is entered:
|General Tab: Entering the ID|
NEW is thereby overwritten by an appropriate name.
Note: The loco ID is used as an unique identifier within Rocrail and is thus very important. Two or more locos must not share the same ID.
Some CS (e. g. ECoS) require exactly the same ID in both Rocrail and the CS. See the wiki page on the relevant CS, if applicable.
Tip: IDs should be short to fit into Rocrail's block symbols. Often the locomotive's class like
BR 298in the example is used as ID.
All other fields are optional and do not need any change for the time being. See Locomotives: General for an explanation.
If a new loco was created by pressing New as described in the previous step and the entry of this loco in the list is highlighted the Interface tab is selected and the locomotive's digital address is entered:
The address is entered here. This entry is very important as Rocrail is able to control locos with a valid address only.
Note: Some CS (e. g. ECos) use the ID instead of the address to identify a loco. See the wiki page on the relevant CS, if applicable.
Note: Marklin mfx-decoders - depending on the CS used - may require special settings regarding the address. See the wiki page on the relevant CS, if applicable.
The ID of the command station controlling the locomotive. As in most cases only one command station is used this field usually remains blank.
Some command stations (Selectrix, …) allow for separated buses for locomotives and accessories, respectively. In case of such a separation the bus used for locomotives has to be entered. Generally this field remains to the default value 0 (zero).
The protocol used to control the loco is chosen from this pull-down menu.
Tip: Generally the protocol is defined within the command station and does not need to be specified here.
Note: It is recommended to chose the appropriate protocol to keep track of the used protocols, though. Some command stations require this information. For details see Locomotives: Protocol.
Note: Marklin mfx-decoders - depending on the CS used - may require special settings regarding the protocol. See the wiki page on the relevant CS, if applicable.
This field remains unchanged generally. See Locomotives: Protocol.
The number of speed steps the decoder supports or is set up to. Values of 14, 28 and 128 are most commonly used.
Note: The number of speed steps of the decoder, the command station and in Rocrail must match otherwise the loco light (F0) may not work correctly.
The slowest velocity Rocrail uses under certain conditions in auto mode.
A medium velocity Rocrail uses under certain conditions in auto mode.
The maximum velocity of the locomotive. See also V_mode below.
Same as V_Min, V_Mid and V_Max but for reverse direction. These options are commonly used for locomotives featuring different maximum velocities for forwards and backwards driving respectively like, for example, steamers with trailing tenders.
Note: Generally it is not necessary to specify the speeds for reverse driving and the value remains to 0 (zero). V_Min, V_Mid and V_Max are then used for both driving directions likewise.
Tip: Model engines showing very different speeds in forwards and reverse driving respectively may be adjusted using V_RMin, V_RMid and V_RMax. It is, however, recommended to carry out this adjustment at the decoder level if possible.
This option is not active and greyed out by default. It can be used for old-fashioned decoders offering no regulation and mass simulation.
Note: Regulated (see below) has to be deactivated in order to enable V_Step.
V_Step uses a stepwise increase / decrease of decoder steps with an adjustable pause between consecutive steps. See Locomotives: Interface for more details.
The V_Mode can be set to either Percent or km/h.
With the check-box Percent activated velocities are in percent of the maximum decoder step. With a decoder offering 28 decoder steps as an example, 100% equals decoder step 28 whereas 50% equals decoder step 14.
Note: V_Max reduces the maximum velocity of the locomotive in percent-mode if values below 100 (percent) are entered.
Note: It is generally not recommended to reduce a locomotive's maximum speed by only V_Max as the number of available decoder steps would be reduced.
Example: A locomotive equipped with a Motorola decoder featuring 14 decoder steps has a maximum velocity of 200 km/h but the maximum velocity of the original engine is 120 km/h. Reducing V_max to 60%, which is decoder step eight, leaves eight speed steps for the 120 km/h range. This will lead to an increase / decrease of 15 km/h (120 km/h : 8) per decoder step. It is thus favourable to adjust the decoder itself to the desired maximum speed if possible leaving V_Max to values around 100%. Decoders without any internal speed setting, however, may be adjusted by decreasing V_Max if necessary.
Unchecking the check-box Percent activates the km/h mode.
Note: The locomotives maximum velocity is not influenced by V_Max in km/h mode.
V_Max has to be set to the velocity the model engine gains at the highest decoder step. This value is the basis for Rocrail's calculation of all other velocities. Example: If a model engine was adjusted to 80 km/h maximum speed
80 has to be entered into the field V_max. If, for example, 35 km/h is the desired speed for V_Mid
35 has to be entered there.
Note: A linear speed curve is a prerequisite for a working km/h mode, e.g. a V_Mid of
35indeed yields 35 km/h. If this condition can not be fulfilled it is recommended to use percent mode instead.
Used by the command station Dinamo only.
Defines the running direction of the locomotive. Mostly placing remains set to default. See Locomotives: Interface for further details.
Should remain active for all regulated modern decoders. Unchecking for decoders without regulation enables V_Step (see above).
Note: Rocrail is able to adjust the speed at inclines within certain limits for decoders without regulation in auto mode. The type of incline has to be specified in the block properties.
The state of locomotive functions (e.g. lights, steam generator etc.) are restored to the state they had at the end of the last session after a restart of Rocrail.
After finishing the settings on the interface tab the Details tab is opened.
Rocrail's basic functions do not require any settings here. The engine type, however, can be specified already.
Note: Rocrail will prevent engines of the type electric from running on tracks without overhead contact line.
Tip: If electric engines should run on tracks without overhead contact line the blocks are later on marked as electrified even if this is not the case. The type of engine can thus be specified correctly here.
As no further settings on the remaining tabs are necessary for the basic functions creating of the locomotive is completed by pressing Apply. If the General tab is brought to the front again the new loco is now listed with its correct name. If required, further locomotives can be created following the above steps.
If locomotives were created in a first step they are displayed on the loco panel on the left.
To control a loco the respective row on the panel is highlighted by clicking on it. The loco's speed is set by dragging the slider left of the clock to the desired position. The running direction can the changed by clicking the » button which then changes to «. The functions can be controlled by the buttons F0 to F4. Further function buttons are available after pressing FG (Function Group). FG has to be pressed as often as necessary to show the desired group.
The loco to be controlled is chosen from the drop-down menu.
The running direction can be changed by pressing the steamer pictogram.
Stop is used to decelerate the loco to a hold whilst B R E A K is an Emergency Break or a Power Off in case the Command Station does not support it.
A throttle window allows for direct access to the functions F0 (called Fn here) to F12.
Tip: Multiple throttles controlling multiple locos can be displayed at the same time. Note that a new throttle window is placed above the last active one and has thus to be moved.
The track-plan of Rocrail is used for visualisation and graphical switching of, for example, switches and signals. Loco speed commands and automatic control of the layout can, however, take place even without a track-plan via the connection of blocks through routes.
The track-plan is not to scale and thus can and should be abstracted or symbolic. Rocrail's track-plan is lifelike and allows for the representation of large layouts within the limited space of a display.
Note: Rocrail is not a track-planning program! Every object in the track plan will use resources from the underlying Operating System. Objects without any functionality for controlling the layout should be avoided for optimal performance.
A new panel is added choosing Add track panel… from the Track plan menu:
|Adding a track panel|
In the dialogue a name has to be specified for the new panel, e. g.
Main for the main line or the name of a location etc. The level may stay at the pre-set value 0 (zero).
Tip: If more lines, locations etc. shall be separated to show up on different track panels the panels get different levels.
Note: A level can not be shared by two or more panels. If the level-number is already in use no new panel will open.
|Track panel properties|
After closing the dialogue by pressing OK the new and empty white panel shows up. In order to draw the track-plan edit panel has to be chosen from the Track plan menu.
Tip: For a better overview choose Show grid from the View menu.
If not done already, Edit Panel in the Track Plan menu has to be activated.
The right mouse button is clicked while the pointer is at the position where the new element should be placed. The desired item is chosen from the menu.
Note: For a trial only items from the tracks menu should be used as most other elements start queries which will be explained in the next chapter.
Every item can be rotated once it was placed on the plan. Clicking the element with the right mouse button opens a menu from which Orientation → Rotate is chosen. This action has to be repeated until the item has the desired orientation.
Items can be moved by clicking them and holding the left mouse button. With the left mouse button still pressed the item can be moved to the desired position and placed there by releasing the button.
The item is selected by clicking it with the right mouse button and choosing select from the menu. In the dialogue copy is activated and the dialogue is closed by pressing OK. The copied item is placed right above the original one and thus has to be moved in order to see both the original and the copy.
Items are removed from the track-plan by clicking them with the right mouse button and choosing Delete from the menu.
The elements described in this chapter are necessary for basic train operations. With tracks, switches and signals trains can be operated manually already. Additional elements required for Rocrail's Auto Mode will be described in the next chapter.
In this tutorial a small layout in the style of the demo layout is designed as an example.
The small example should start with a curved track in top left corner. The mouse pointer is placed where the curve should appear and the right mouse button is pressed. From the menu Tracks →Curve is selected. (Step 1 in figures below).
As the orientation of the curve is not correct the element is clicked with the right mouse button and orientation is changed by choosing Orientation → Rotate (Step 2).
Tip: Rotating elements is much faster using the hot key Alt+R
|Step 1||Step 2|
12 straight tracks now should be added right from the curved track. The first track is placed by right clicking the track-plan right of the curve and choosing Tracks → Straight (Step 3).
As the last used element was a straight horizontal track, the remaining 11 tracks can be added by simply clicking with the left mouse button (Step 4).
|Step 3||Step 4|
In the same way three straight tracks are plotted below the curve (Step 5).
Each of those three tracks has to be rotated by choosing Orientation → Rotate from the menu after right clicking the respective element or by using the Alt+R combination after clicking once on the respective element (Step 6).
Tip: If the first track is rotated right after it was placed the remaining two tracks can be added by a simple left click. Rocrail remembers the last orientation.
|Step 5||Step 6|
Below these tracks a curved track is added as described in step 2 (Step 7).
This track has to be roted, too. Using Orientation → Rotate twice results in the correct orientation (Step 8).
With this knowledge base the track circle can be completed now by adding further straight and curved tracks (Step 9).
As a small exercise each central vertical straight track should now be removed. Clicking on the element with the right button, then choosing Delete from the menu is the only action to be performed (Step 10).
|Step 7||Step 8|
|Step 9||Step 10|
The gaps should be closed with direction tracks displaying the wanted driving direction of the trains. Clicking into one gap and choosing Tracks → Direction fills it up with the direction track. The track has to be rotated accordingly and the second gap is closed in the same way (Step 11).
Note: The direction tracks are for the users orientation only. They have no influence on the running direction of the trains.
The plan of an oval-shaped track circle has been created and finished with the last step. It will be the basis for the extensions following in the next paragraphs.
After the oval shaped track was created in the last paragraph it is now extended with a parallel track and the required switches.
At first two tracks are deleted from the track plan and a parallel track is drawn as shown in the figure below (Step 12).
After a right click on the left gap in the track circle Switch → Right Switch is chosen from the context menu. The following dialogue asks for the ID of the switch which in this example is to be
Sw01 (Step 13).
|Step 13: Entry of the Switch ID and result|
In the same way the right gap is filled with a Left Switch named
Sw02. In addition two curves have to be added and rotated to the correct positions. This will complete the extended demo plan for the moment (Step 14).
Two switches have been added in the last paragraph. To be able to operate them, they have to be configured as a next step. A right click on the left switch (
Sw01) opens the context menu from which Properties is chosen. The following dialogue opens:
|Switch Dialogue, General Tab|
Since the ID is already set nothing has to be changed on this tab for the time being. The respective options are explained on page Switches: General. The Position tab is skipped and tab Interface is selected:
|Switch Dialogue, Interface Tab|
The following options are available:
The Interface ID specifies the CS controlling the particular switch. The name of the CS (see chapter 2.2) is entered here.
Tip: As in general only one CS is used, the Interface ID may remain blank
Note: If the field Interface ID remains blank, the first (topmost) CS from the list (see again chapter 2.2) is chosen in case of more than one CS
With CS featuring more than one bus (e. g. Selectrix) the correct bus controlling accessories has to be specified here. See also Switches: Interface.
Tip: In general the bus number remains to 0 (zero).
With some CS the protocol used has to be chosen from the drop-down list. See Switches: Interface for details.
Tip: Generally it is not necessary to chose the protocol as it is defined by the CS. The protocol field can thus remain to default.
These two fields contain the most important information necessary to control a switch. The address of the decoder and the output (port) of the decoder the switch is connected to have to be entered in these fields.
In the example switch
Sw01 will get the switch address 1 (see figure above).
Tip: With many CS it is possible to use PADA. In this case Address remains to 0 (zero) and Port is set to address of the switch (see comparison table below)
Note: Some CS do not support PADA
Note: There are additional kinds of addressing which are described on page Addressing.
Addressing Comparison Table:
In case the position of the switch does not match the position displayed in Rocview the box Invert can be checked.
In most cases no further action in required to set up a switch. The meaning of all options is described on the page Switches: Interface.
The configuration of the first switch is thus completed and can be confirmed by pressing Apply. After selecting tab Index both switches are listed. Switch
Sw02 is highlighted as shown below, afterwards again the tab Interface is selected.
|Dialogue Switches, Index Tab|
Sw02 in the example shall get the address 2 (Address=1 + Port=2, or Address=0 + Port=2).
Note: It remains to the reader which address to choose. Of course addresses used on the own layout allowing to test the result can and should be used.
After finishing the set-up of the second switch the changes are confirmed by pressing Apply and subsequently the dialogue is closed by pressing OK.
To test switches the CS has to be powered up and the track power has to be switched on. With a click on each switch symbol on the plan displayed in Rocview the position of the switches change. The position of a switch on the track plan must match the position of the respective switch on the layout. If the positions do not match the Invert option of the respective switch has to be checked or unchecked (see above chapter).
Tip: To prevent the switch symbols from being moved accidentally while clicking on them choose Operate from the Track plan menu.
If the switches on the layout do not switch positions at all it should be checked whether the track power has been turned on and if the CS can be controlled trough Rocview. If the switches can be controlled via the CS directly but not using Rocrail the address(es) (and possibly Interface IDs and Protocols) have to be checked again.
If the configuration of the switches was successful on the small layout trains can be driven and directed using the switches. To achieve a more realistic train operation signals are added in the next chapter.
In this chapter the example layout of Step 14 in the previous chapter is extended by three signals.
From the menu Track plan the option Edit panel has to be activated again, if applicable. Afterwards three tracks are deleted from the plan as depicted in the figure below (Step 15).
Right clicking on the upper gap in the track circle opens the context menu from which Signal is chosen. A dialogue opens asking for the Signal ID. The signal shall receive the ID
S01. The gap below is now filled with a signal named
S02 and the remaining gap is closed by adding signal
S03. The signals should be rotated to fit the driving direction as shown below (Step 16).
Like the switches, signals have to be configured prior to use.
In a first step the signal on the top right position is right clicked and Properties is chosen from the menu. The following dialogue opens:
|Dialogue Signals, General Tab|
No changes are necessary on the General tab for the time being.
In the example it is assumed that a simple two-aspects semaphore signal driven by magnetic coils is used. This type of signal is usually connected to the same type of decoder as used for switches.
Note: There are many different ways to connect a signal. Some signals are connected to the same kind of decoder used for switches, others need permanent current instead of pulses and finally there are special signal decoders available. Signal decoders especially differ very much in design. Thus Rocrail offers many different ways to configure a signal. In this example the simplest case of a magnetic coil driven semaphore signal is used as this is considered to be the most common type of signal.
Note: Further information on signal configuration is found on the page Signals and its sub-pages.
Now tab Details is selected. The Signal type is set to Semaphore signal and Aspects is set to 2 as shown in the figure below.
|Signals Dialogue, Details Tab: Choosing Type of Signal and Number of Aspects|
All other options remain unchanged and the Interface tab is selected.
|Signals Dialogue, Interface Tab|
Interface ID and Bus are configured in the same way as described for switches. The Protocol is chosen according to the decoder in use. The address of the signal is set to 3 (addresses 1 and 2 on the example layout are already used by the two switches). Addressing is carried out for output RED setting the (decoder) address to 1 and the Port to 3. Alternatively, PADA can be used: Address=0 and Port=3. In addition, the option Switch is activated assuming the signal is connected to a simple decoder used for switches. Often - if the signal aspects are interchanged - option Invert has to be activated, too.
Finally the changes are confirmed by pressing Apply and the Index tab is selected.
|Dialogue Signals, Tab Index|
The index is showing all three signals available. Signal 'S02' is highlighted and tab Details is selected. The second signal could be configured in the same way as the first one.
However, as an exercise, signal
S02 should be configured using patterns.
| Configuration of Signal
On tab Details the signal is again configured as a two aspects semaphore signal. The pattern is set according to the figure above.
Note: If the signal aspects are found to be interchanged in line Green the pattern has to be changed from R1 to G1 and in line RED the pattern has to be changed from G1 to R1.
Next tab Interface is selected and the signal address 4 is entered (as shown in the figure or, alternatively, in PADA notation). Finally use patterns has to be activated.
After pressing Apply tab Index is selected, signal
S03 is highlighted and again tab Details selected.
The third signal is to be a three aspects semaphore signal. Therefore on tab Details only Semaphore Signal has to be selected.
After selecting tab Interface the address is entered: The three aspects signal will need two addresses, one for red / green and the other one for the yellow aspect. The signal in this example will receive the addresses 5 and 6. In the figure below they have been entered in PADA notation.
| Configuration of Signal
It has to be noted that the gates (red / green) have to be set according to the figure, too.
Note: If the signal aspects are found to be interchanged the gates have to be changed from red to green and green to red.
S03 could be configured using patterns as well. These alternative settings are shown in the figures below.
| Alternative Configuration of Signal
If all settings are correct Apply is pressed to confirm the changes and the dialogue is closed by pressing OK. The symbolic representations of the signals on the track plan have changed due to the settings made before: Signals
S02 are shown as two-aspects signals while
S03 is showing three aspects (Step 17).
|Step 17: Representation of Two- and Three-Aspects Signals|
The configuration of the signals is completed and thereby all elements for the manual mode are readily configured. The sample layout therefore allows driving of two alternating trains leaving it to the user to control signals and switches and to stop the trains in time. The elements missing for automatic operation are added successively in the next chapter.
With the present sample plan manual operation is possible while some essential elements for Automatic Mode are still missing. This chapter will explain how to add and configure the plan elements necessary in Automatic Mode.
Blocks, in plain language, are controlled sections where trains can stop. Blocks usually consist of sensor sections or sensor contacts informing the software about the occupancy state, tracks and signals. Rocrail uses a special block symbol to mark a block. The symbol, in addition, can show different states of the respective block, e. g. occupancy and the loco name. The block symbols, however, do not represent the physical length of a block.
Where blocks should be placed on the layout first of all depends on where trains should stop. On the sample layout this is apparent from the position of the signals already placed.
The track plan is modified by removing three times four tracks as shown in the figure blow (Step 18):
|Step 18: Removing Tracks|
The first block is placed by right clicking the topmost gap in the plan and selecting Block from the context menu. A dialogue asking for the Block-ID will open. The ID should be
01 for the first block. The dialogue is closed by pressing OK. If applicable, the block symbol can be positioned to fit into the gap.
Tip: If the right click is performed in the very left corner of each gap, the symbol will be placed correctly.
In the same manner the gap below of block
01 is filled with block
02 and block
03 in placed to fit into the remaining gap (Step 19).
Blocks do not need any complex configuration at the moment. All details are described on page Blocks and its sub-pages.
Signals, however, can be associated with the blocks now: Block 01 is right clicked and Properties is selected from the context menu. In the opening dialogue tab Signals is selected and from the drop-down field Signal from section Signals at ahead drive signal
S01 is selected. The changes are saved by pressing apply.
Note: “ahead drive” refers to the running direction in the block (from
+, accordingly, is called “reverse drive”.
In the same way block 02 is configured: From tab Index block 02 is selected, subsequently on tab Signals signal
S02 is selected from the drop-down menu under Signals at ahead drive.
The changes are saved by pressing apply and from tab Index block 03 is selected. Again on tab Signals signal
S03 is associated with the block. As block 03 is entered from the minus side this time the signal has to be selected from the list of Signals at reverse drive.
Finally the last changes are saved by again pressing apply and the dialogue is closed with OK.
Tip: The analyser is able to associate signals with blocks automatically. If this is wanted from the menu File → Rocrail properties… → tab Analyser option Assign signals to blocks has to be activated. Rocrail has to be closed and restarted in order this change to take effect. The signals are assigned to the blocks once the analysing is started as described in chapter 7.3.1.
In this section sensors are added to the plan and subsequently are configured.
The two parallel tracks which may belong to a station will be equipped with two sensors each. These sensors have the functions enter and in, respectively. Two sensors per block represent the standard configuration of Rocrail: One sensor at the beginning of a block (enter) telling Rocrail the train has arrived the block and one sensor at the end of the block (in) telling Rocrail the train has completely moved into the block. The train will be slowed down when it reaches enter if the train has to stop in the particular block. Reaching in the train will be decelerated to a halt if the train has to stop. The in-sensor also triggers clearing of the previous block.
The third block in the sample plan will be equipped with only one sensor called enter2in. The physical sensor is placed at the position or section of the block where an enter-sensor would be placed in case of a two sensor configuration. The in-event is triggered after a certain, adjustable time after the sensor was activated.
All possible sensor events and their usage are described in detail on page Sensors and Blocks.
The track plan is modified by removing five tracks from the layout as shown in the figure below (Step 20).
After right clicking on the gap left of block 01 Sensor is selected from the context menu. In the prompt the ID of the sensor has to be entered. The ID of the first sensor is to be
The remaining sensors are added in the same manner:
- right of block 01 sensor
- left of block 02 sensor
- right of block 02 sensor
- right of block 03 sensor
The modified track-plan should look like this (Step 21):
Generally sensors are configured by simply assigning address to them. To assign addresses after a right click on sensor
01_enter Properties is selected from the menu. Dialogue Sensors, tab General will open.
|Dialogue Sensors, General Tab|
Nothing is changed on this tab for the time being. The options are described on page Sensors: General. Next tab Interface is selected.
|Sensors Interface Tab|
The Interface ID is configured in the same way as for switches. The address is changed to 1 for sensor
After Apply was pressed tab Index is selected.
|Index of Sensors|
01_in is highlighted as shown in the figure above, tab Interface is selected and the address is changed to 2 for this sensor. After pressing Apply the next sensor is selected from the Index-tab and the address is again entered on tab Interface.
The sensors get the addresses 1, 2, 3, 4 and 5 in the order of their appearance in the list.
After the configuration of the last sensor Apply is pressed and the dialogue is closed by clicking OK. In the next section blocks, sensors and routes are merged.
Routes are interconnecting the blocks on a layout and define which way(s) a train can use.
Note: The track symbols apparently connecting the blocks on the layout are for the user's orientation only! Without further steps Rocrail does not evaluate these track connections. The interconnection of the blocks is solely made by routes.
Analyze is selected from the File-menu to run the analyser. In the server message window the creation of four routes will be confirmed.
|Running the Analyzer and Result|
Rocrail has to be closed and restarted after running the analyser.
Four routes have been generated because (only) these four routes are possible if the plan is used in running direction (clockwise as indicated by the direction tracks): Block 01 (minus side) to block 03 (minus side), block 02 (-) to block 03 (-), 03 (+) to 01 (+) and 03 (+) to 02 (+).
Note: The analyser uses the direction tracks to determine the wanted running direction. Without direction tracks another four routes for the opposite running direction will be generated, too.
Note: In order to achieve proper results all elements must be connected without any space in between. There must be no double elements at one plan-coordinate (no overlapping allowed).
The routes generated by the analyser can be viewed after selecting Routes… from the Tables-menu:
|Routes Generated by the Analyser|
The four routes described above are listed on the Index-tab. If, for instance, the first route (
[01-]-[03-]) is highlighted and subsequently the Switches-tab is selected, the automatically added switch
Sw02 is found in the list.
The analyser, in addition, added route IDs to each track. Route IDs are for showing locked routes using the route representation in automatic mode. The route IDs can be viewed after right clicking on a track symbol and selecting Properties… from the menu.
If the analyser was configured according to the tip in chapter 7.1.2 additionally it created the block-signal associations.
At the moment there is no need to care about those automatically generated entries but they may help to understand the underlying concept.
Note: The Analyzer was developed as a helpful tool for new users and small layouts but will not substitute creating or editing routes, signal assignments etc. by hand in every case. With complex layouts the Analyzer may fail or it may not generate all routes wanted. However, the routes and other entries generated by the Analyzer can always serve as a blueprint for own modifications.
A more detailed description of the Analyzer is found here.
Routes, in combination with Sensors, are configured in the block properties of each block.
After selecting Blocks… from the Tables-menu all three blocks of the sample layout are listed:
|Block Properties Index Tab|
01 is highlighted as shown above and subsequently the Routes-tab is selected:
|Routes of Block 01|
Three routes are listed: The general routes all and all-reverse and the specific route
[03+]-[01+] = from “03” to “01”. The specific route tells there is only one route heading towards block 01 and this route is heading towards the + side of the block.
Towards the + side means a train will enter the block at the + side and exit at the - side. The direction + to - is defined as forwards. In conclusion, from - to + means reverse. Route all is used for running direction forwards while all-reverse is used for reverse. The table below summarises the correlation between running direction and routes.
Running Direction and Routes Table:
As the running direction for this block is forwards the all-route has to be highlighted:
|Routes Configuration of Block 01|
Sensors coming from block all (all): there are several drop-down fields. It has to be specified which sensors apply to a train entering the block using route all. In block 01 these are the sensors
01_in. These two are selected from the two topmost drop-down fields below the word ID (see figure above). Finally an event has to be assigned to each sensor. Since the names of the sensors are descriptive this can be done easily:
01_enter gets enter and
01_in gets in as event. The changes are confirmed by pressing Apply.
To configure block 02 the Index-tab is selected, 02 is highlighted, then the Routes-tab is selected again.
Note: As long as no route was selected sensors and events of the route edited previously may be displayed. It has therefore to be made sure a route was selected from the list prior to edit sensors and events.
Following the table Running Direction and Routes the running direction for this block is forwards, too. Therefore route all is selected and the two sensors in block 02 are added in the same way as shown for block 01: The sensors are
02_enter (event: enter) and
02_in (event: in):
|Routes Configuration of Block 02|
After the changes were confirmed by pressing Apply block 03 is selected from the Index-tab and the sensors and events for block 03 are edited on the Routes-tab:
|Routes Configuration of Block 03|
Four routes are presented: The general routes all and all-reverse and the two specific routes, one coming from block 01 and the other one coming from block 02. Both specific routes are heading towards the - side of the block.
Following again table Running Direction and Routes the running direction for this block is reverse (because a train will enter at the - side of the block). That is, route all_reverse has to be selected in case of block 03.
03_enter2in is selected as sensor ID and the corresponding event is enter2in. Since there is only one sensor in block 03 this is the only one to be configured. The enter2in-sensor is an enter-sensor simulating an in-event after an event timer has lapsed. The time after the in-event should be triggered is entered into the field Event timer 1. In the example a value of 5000 (milliseconds) was entered exemplary.
Note: The correct value for the event timer has to be tested on the running layout. If the train stops to early the time has to be prolonged, if the train is running past the signal the time has to be shortened.
Tip: The event timer, alternatively, can be set for each loco individually using the timer found on tab Details of the loco properties. The loco-individual timer takes priority over the event timer of the block provided its value is greater than 0 (zero).
Further on, a second event timer (Event timer 2) is available which can be used for trains running in opposite direction, for example. Details are found on page Blocks: Routes.
After all settings are done Apply is pressed and the dialogue is closed by pressing OK.
Tip: The analyser in many cases can configure routes automatically. Prior to this in the dialogue available from menu File → Rocrail properties… → tab Analyser option Assign feedbacks to blocks has to be selected and Rocrail has to be closed and restarted.
Rocrail is now ready to run trains in automatic mode.
In automatic mode trains are autonomously controlled and conducted by Rocrail. It is thereby assured that switches and signals are set correctly and occupied routes and blocks are locked for further trains.
Rocrail offers two alternative methods in automatic mode:
- Trains are running from block to block via the established routes and, depending on certain criteria, are searching a random next destination block themselves (Chapter 8.1). In this way trains are running more or less aimlessly which, however, often leads to a desired diversified train movement.
- Trains are running scheduled using dedicated routes only (Chapter 8.2). Departure times are regarded provided they have been specified and the situation allows for a depart on schedule.
Tip: Both methods may be used in parallel: Some trains follow their schedules while others are running from block to block without schedule.
Running in Block-to-Block mode is immediately possible on the sample layout: At first, track power has to be switched on, then automatic mode is activated by either pressing the known symbol or using the menu Automatic → Auto mode.
If there is no loco present in a block the loco is placed now by either:
The sample loco from chapter 4.0 stands in block 01, represented by block colour red and the loco ID shown inside the block symbol (Step 22).
|Step 22. “BR 298” Was Placed in Block 01|
If the direction arrow in the block does not point to the direction shown in the figure above the loco ID on the loco panel has to be right clicked and Swap block enter side has to be selected from the menu.
|Swapping of the Block Enter Side|
Note: If the arrow is pointing to the left Rocrail will try to start the loco in counter clockwise direction which is, due to the missing route (block 01
+to block 03
+), not possible on the sample layout. When a loco is set into a block it therefore has to made sure the running direction is the desired one.
Excursus: Running direction means the direction of movement in the block as illustrated in chapter 7.3, creating the routes.
The running direction of a loco could still be reverse (tender ahead for steam engines) while the movement in the block is forward (from
If a loco was placed tender ahead (i. e. pointing to the right in the example) the placing (see also picture above) had to be swapped, too in order the loco to receive reverse commands to exit the block to the right.
Taken together, direction or running direction refers to the direction of movement in a block or on a route while placing refers to the physical orientation of a loco.
Direction and placing is a rather complex issue. For the moment it is sufficient to ensure the loco's physical orientation (placing) is correct, the loco is indeed running forwards receiving forwards commands and the arrow in the block is pointing to the wanted direction.
In this mode the loco or train is given a destination block prior to starting it. The destination block can be either the next block or a distant block. However, it has to be ensured the block can be accessed using one ore more routes.
Note: Rocrail does not necessarily take the shortest way possible if multiple route are involved.
Tip: Running to destinations is a valuable tool to help testing routes if the loco is moved one block ahead each step.
To see the loco running in automatic mode for the first time it is simply dragged to block 03 (Step 23) which will cause it to start immediately (Step 24).
|Step 23: Dragging and Dropping Loco to Block 03||Step24: Loco Heading To The Now Reserved (Yellow) Block 03|
A loco, alternatively, can be started from the context menu of a block: A right click is performed on the block symbol of block 01 and Set destination… is selected:
|Context Menu of Block 01|
A further dialogue will open from which the desired destination block is selected and confirmed by pressing OK:
|Selecting the Destination|
In the last step the loco has to be started from the context menu of block 01:
|Starting From Context Menu|
Running without destination a loco is driving to the next free block available, subsequently another free block is searched for. The choice of destination blocks, in basic settings, depends on block occupations only (an occupied block is not a valid destination). If multiple free blocks can be accessed the destination is set by random choice.
To run a loco without destination either Start locomotive is selected from the context menu of the block (see figure in the above section, if necessary) or Start all locs is selected from the Automatic menu or a double click is performed on the block symbol. Prior to that the steps mentioned in section 8.1 have to carried out, if applicable.
Running in automatic mode is stopped by either selecting Stop all locs from the Automatic menu or by pressing the corresponding button in the symbol bar. Single locos, additionally, can be stopped by selecting Stop locomotive automat from the context menu of a block the loco occupies or has reserved (block colours red, blue or yellow).
The automatic choice of destination blocks can be manipulated by means of further settings in Rocrail. E. g. certain trains will - if possible - use dedicated routes only or some routes are locked for certain types of trains or platforms in stations are used by dedicated trains only. These settings are described in detail on page Block Types and Train Types.
A schedule is a list containing all blocks which should be approached consecutively. The routes defined in chapter 7.3 are used to direct trains from one block to the other. Thus, accurate running in block-to-block mode (section 8.1) is a prerequisite and should always be tested first.
If a schedule is started the loco should reside in the first block of the schedule, if possible.
Note: If the loco resides in a block not belonging to the schedule Rocrail tries to move the loco to the first block in block-to-block mode and subsequently executes the schedule.> Note: If the loco resides in block belonging to the schedule which is not the first block all previous blocks are skipped and the schedule is executed starting with the current block.
From the Tables menu Schedules… is selected. The dialogue Schedules will open:
|Schedules, Index Tab|
After pressing New a new schedule with the name
NEW is displayed:
|New Schedule Created|
Next, tab Destinations is selected and the desired name of the schedule is entered into the field ID:
|Tab Destinations: Name of Schedule and List of Destinations|
After changing the name the starting block of the schedule is selected from the drop-down field Block: 01 (block 01) is selected and subsequently Add is pressed. Block 03 and again block 01 are added in the same way. This will result in a schedule starting in block 01, running via block 03 and ending in block 01.
The changes are confirmed by pressing Apply and the dialogue is closed by pressing OK.
In the loco settings, tab Details it has to be checked that use schedule departure time is not activated. Then, the steps described in section 8.1 have to be followed, if applicable.
From the context menu of block 01 Go with schedule → My_Schedule is selected as shown below:
|Go With Schedule|
The loco will start in block 01, will proceed across block 03 and stop in block 01.
Note: In contrast with the block-to-block mode block 01 is the final destination: The loco will not go any further because the schedule ends in block 01.
To rerun the schedule the loco has to be started again from the context menu of the block.
Note: Schedules can be repeated using the Schedule Options described in section 8.2.5 below
A location or locality consists of several blocks representing a destination site, e. g. all tracks belonging to a railway station. On the sample layout blocks 01 and 02 may represent the two tracks of a station.
The advantage of locations is trains can choose a destination block freely within the location, e. g. a train can use block 02 if block 01 is already occupied by another train.
From the Tables menu Locations is selected. The dialogue Location opens. By pressing New a location named
NEW is created:
|Dialogue Locations||Creating a Location|
NEW in the name field is overwritten by an appropriate name. In the example the location is named
Station. The name is changed by pressing modify.
By selecting blocks from the drop-down field Blocks and pressing Add blocks are added to the location. In this case blocks 01 and 02 are added as shown below. The order of blocks in the list is important because blocks are selected in the order of appearance by Rocrail. With the settings in the figure below this results in block 01 having priority over block 02: The train will always enter block 01 unless it is occupied. Only in the latter case the train will enter block 02.
As usual changes are confirmed by pressing Apply and the dialogue is closed by pressing OK.
The schedule created in section 8.2.1 has to be modified (the schedule is opened from the menu Tables → Schedules…, schedule My_Schedule is selected from the index tab and finally tab Destinations is selected):
|Location in a Schedule|
The first entry (line 1) in the list of destinations is highlighted. From the drop-down field Locality the Station is selected and from the second drop-down field Block the blank field is selected. These changes are executed by pressing modify. In exactly the same way the third entry is modified.
The loco can now be started with the modified schedule.
Excursus: As stated above the train will always run block 01 → block 03 → block 01. To see the effect of locations the loco could be moved to block 03 in block-to-block mode using drag and drop. Afterwards from the context menu of block 01 Put out of operation is selected. Block 01 is now closed (grey). If the loco is started with the schedule from the context menu of block 03 it will enter block 02 and always run block 02 → block 03 → block 02 until block 01 is Put into operation from its context menu again.
Departure times can be specified to get realistic railway time tables. Three alternatives are available:
- Absolute, i. e. departure times refer to the model time (cf. Clock)
- Relative, i. e. departure times are relative to the starting time of the schedule (a time of 00:05 means departure is five minutes after the schedule was started)
- Hourly, i. e. the schedule is started hourly within the From Hours / To Hours. Hours in departure times will ignored.
Important: To use timed schedules in the loco settings, tab Details use schedule departure time must be activated.
Example: A schedule using relative times could look like this:
|Schedule With Relative Times|
If this schedule is started the loco will wait in the starting block 01. It will depart one minute after the schedule was started and will again wait in block 03. Two minutes after the schedule was started the loco departs from block 03.
The number of times the schedule is repeated.
This function allows for delaying the in-event for a specified number of milliseconds in each location or block of the schedule. This Entry has priority over the Event timers of blocks.
The function is helpful e. g. with shunting actions controlled by schedules to achieve accurate positioning of wagons (cars) or to fine-tune the stopping point of a train.
A follow-up schedule can be specified which will be executed after the last destination of the schedule was reached (and after the repetitions - see Recycle above - were carried out.
The follow-up schedule may be a different or - to achieve an endless repetition - the same schedule:
|Specifying a Follow-Up Schedule|
After locomotives were created as well as a track plan equipped with switches and signals, all elements necessary in automatic mode were added and schedules have been created Rocrail is readily configured and can control a layout in automatic mode.
Often, however, only the very basic settings were carried out in order to come to results quickly. Many of these settings can be customised and improved.
Locomotives, for example, feature a lot of options regarding description, naming, date of purchase etc. Especially the length (of the train) can be specified allowing Rocrail to disregard blocks too short for the train. A maintenance interval specified in running hours will automatically remind that the loco needs to be serviced. There are many other details like, for example, the train type which allows Rocrail to distinguish between suitable and alternative routes.
Block properties can be adjusted to either trains waiting a specified time or, if possible, not stopping at all. Blocks further on can be locked for specific trains or types of trains using permissions.
Signals may be set to manual operation requiring the user to explicitly give clearance.
Outputs can be used to control lights, uncoupling tracks, track power for sidings and many more.
Actions can be used to automate activities triggered by events or on a time controlled basis.
The Automatic Mode can be fine-tuned for complex layouts. Namely Commuter Trains, Critical Sections, Signal Aspects and Second Next Block as well as Block Types and Train Types, among many others, may be of importance.
Have fun using Rocrail!