User Tools

Site Tools


stepbystep-en

Step-by-Step Tutorial

ContentGetting Started



The Gateway to Rocrail

About this tutorial: Alls steps necessary for a successful start with Rocrail will be described. These steps should be completed in the sequence presented as they build on each other.
Overview:

Rocrail can now control locos on a layout. Tracks, switches and signals are added to the track plan in the next steps:

The layout is now fully controlled by Rocrail. Missing objects for automatic mode and its configuration follow in the last steps:


Further Tutorials

  • Language Versions (click on flags to access pages):
    • This tutorial is also available in German Deutsche Version, Italian Versione Italiana, French Version Français Dutch Nederlandse Versie


:!: 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)


Preface

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.


Tips Using Wiki Pages

  • For quick navigating on large pages use the Table of Contents in the top right corner of each page
  • For quick navigating between the last visited pages use the Trace Bar found at the top of each page
  • Printing of wiki pages is usually done easily using the print function of the browser. If possible, the scaling should be set to "shrink to page size", "fit to page" or equivalent. (However, be careful there are a lot of pages.)


Getting Help

  • First of all: Read the Wiki! There is no classical user guide available. All information is in the wiki. Once familiar with this type of instruction it will be of great help.
Tip: Almost every dialogue features a Help button which directly links to the relevant wiki page (internet connection required)

The information is right there!
  • Got stuck? Feel free to ask the Rocrail Forum! There are many people from around the world willing to help with beginner and advanced questions.
    • Please,
      • use the correct language forum (currently available: English, German, Dutch, Italian, French)
      • use an appropriate sub forum
      • use a significant subject which describes the problem ("I have a problem" is not a good subject…)
      • provide the Rocrail files. This is very easy using the built-in Create an Issue function
      • once the problem is solved mark the topic as solved.


1.0 Basics

This section describes the very basic steps: Downloading, program installation, starting Rocrail for the first time and learning the concept from the wikidemo track-plan.

Rocview common buttons dialog: Common Buttons


Here is some basic information:

  1. Rocrail is not "installed", but is a simple zip which is extracted to any arbitrary storage location.
  2. The zip contains the correct shortcut for starting ROCVIEW (there is no server to start!)
  3. As a rule, there are no individual (plan) files in Rocrail, but WORK AREAS (called workspace) to be opened (created and saved). The main reason for this is that a Rocrail working environment not only consists of the plan, but also the rocrail.ini with the essential definitions for controllers, automatic operation, locomotive occupancy, etc.

This concept enables the users to exchange the respective workspaces with each other, to test each other's plans virtually without affecting their own installation in any way. An excellent support concept.

So:

  1. Start Rocview
  2. Open a (new) workspace. The workspace starts the server with the correct parameters and definitions i.e. rocrail.ini
  3. Create a plan (it can still be called "plan")
  4. Make the settings for the controllers and automatic system etc.
  5. Save the workspace [this workspace may be anywhere (you should remember where) - when you open it again, Rocrail follows the (Windows) paths].

1.1 Download

Rocrail can be downloaded from the download portal (all operating systems).


1.2 Installation

As already mentioned above, Rocrail is not installed "classically". Instead, a ZIP file specific to the operating system is unpacked into a folder or directory previously created for this purpose.


OS-dependent information is found here (return to this page after the software was installed and proceed with section 1.3):


1.3 The First Start

Start Rocview. To do this, double-click on the corresponding icon on the desktop.

If no desktop link has been created yet, first open the folder in which the previously unpacked files are located. Then with double-click on the file desktoplink.cmd2) a link on the desktop is created3). The icon is called Rocview. Double click on this icon to start Rocview.

Note: It is important to always start Rocview using this desktop icon, otherwise dependencies may not be resolved correctly and malfunctions may occur.

Rocview opens and two pop-up dialogues show up:

SupportKey Dialoge
Info dialogue. Copyright and disclaimer SupportKey dialogue


The one shown on the left is the Info dialogue. It appears only at the very first start of Rocrail. The terms and conditions have to be accepted and confirmed in order to use the program.

The dialogue on the right is the SupportKey Dialoge. It will appear every time Rocview is started as long as no SupportKey was loaded. The window is closed by pressing OK.

Note: Money is needed to keep the Rocrail project alive.
It is thus left to the user to make a small contribution as a support if the program should be liked and be used in the long term.
The pages SupportKey Dialogu and Supporting inform about how to make a financial support.


After closing the SupportKey Dialogue, Rocview is displayed in the language specified by the operating system.

Tip: If this tutorial is not available in the desired 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.
The language can be changed by choosing Language from the View menu and the desired language as shown on the picture below.


Language Setting


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, so the changes can take effect.

A fresh, empty Rocview looks like this:

Empty Rocview: No track plan and off-line (no connection to a Rocrail server)


Tip: If a colourful menu is desired the appearance of Rocview can be changed by performing the following steps: From menu File → Rocview Properties… is selected. Option Gray icons (bottom middle column) is deactivated. Rocview is closed and restarted again.
Rocview with colourful menu
Note: This instruction will show figures of both settings for the time being. There are no functional differences using the one or the other design except for the zoom handling (which will be described later).


To get an impression of what Rocview looks like with a loaded plan, the wiki demo plan is now opened:

  • In the File menu, select Open Workspace, then open the wikidemo folder in the dialogue that opens.

By opening a workspace Rocrail (the server) and Rocview (the client / graphical user interface) start with a common connection to control the model railway layout.

The wiki demo workspace is opened by
selecting "Open Workspace…"


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


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 wikidemo-plan. It is intended as an example to learn about the basic functions of Rocrail.

The wikidemo-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


1.4 Working with the wikidemo-Plan

To get a better overview the plan can be enlarged using the zoom.

Using the Zoom.
With the gray default design first the magnifier symbol is clicked, then the zoom factor is set by selecting the desired value
or by using the slider. If the colourful design is used the zoom value is selected directly from the list in the menu.


The wikidemo-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 wikidemo 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.

Now the loco can virtually drive around the layout. It should be made sure that no sensors are activated. Next the track power ( or ) and auto mode ( or ) are switched on.

Loco E03 is - depending on the version of the demo plan - located in one of the blocks. In the following example, it is located in block 04 (step 1, see figures below). In other cases, the steps must be carried out from a different starting block.

The locomotive is started by double-clicking on the block symbol. Then the next one, in the example block 01, is automatically selected as destination and therefore marked yellow (status: reserved, step 2). The tracks that belong to the route from block 04 to block 01 are also illuminated yellow. 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 fb1a.

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 wikidemo-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.


2.0 Creating a New Workspace and Plan File

A workspace contains a configuration file for the Rocrail server and a plan file. In the first for instance the configuration of the command station and the auto mode settings are stored, the latter contains all objects managed by Rocrail, e.g. switches, signals, blocks as well as locomotives.

In order to use an own plan instead of a (wiki)demo plan, a new workspace is created: Rocview is (re-) started, then from the File menu Open workspace… is selected.

Note: If Rocview is not closed and restarted before opening a workspace a warning message may show up telling that this will shut down the server. This has to be accepted by clicking Yes.
Opening a workspace


A new dialogue window will open (whose appearance and functions are depending on the relevant operating system). With the help of this dialogue the folder Rocrail is chosen.

In most cases (may depend on operating system and user rights) the contents of the folder should automatically be shown. The correct folder contains (at least) these three sub-folders: decspecs, images and style sheets.

If the folder does not automatically open, it is found in the user folder, i.e. under "My Files" (older Windows), "Documents" (Windows) or "Home" (Linux) directory.

With the help of this dialogue a new sub-folder is created alongside those mentioned above. This new folder is renamed as appropriate, e.g. Test. The newly created and renamed folder is then entered (double click on it or the like to show its contents). Afterwards it is selected / opened using the appropriate button of the dialogue.

Rocview automatically writes the necessary files with default values into the new folder. In the background the Rocrail server is started to which Rocview automatically connects.

The window title now reads Rocrail: New plan. The title can be changed as needed using menu File → Plan properties…. For instance My Layout could be used. The window title changes to the new name, e.g. Rocrail: My Layout.

Notes:

  • :!: A new Workspace should not be created in the Rocrail installation directory tree.
  • To facilitate the opening of the workspace in future Rocview properties… can be selected from the File menu, then the default workspace is selected on tab Path of the dialogue.
  • It is not recommended to check the "Use workspace at startup" option for the time being as the beginner may want to experiment with different plans in different workspaces.


3.0 Adding a Command Station

3.1 Connecting the Command Station

The command station (CS) and the computer have to be 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.


3.2 Setting Up the Command Station

Open Rocrail properties… from the File menu (if the option is not available the own workspace has to be opened beforehand in order to establish the connection to the Rocrail server):

Menu File / Rocrail properties


The Controller tab is selected, 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 - p50x is 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.


3.3 Checking the Configuration

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 or 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.

Tip: Vote for the command station on the forum (requires forum subscription). This helps the developers as they can see how may people are using the particular model or protocol.


4.0 Creating Locomotives

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:

Locomotives Index


Now the button New is pressed. A locomotive with the name NEW has been created.

New loco was created


Restore functions

If this option is activated the loco's functions (e.g. lights, sounds, steam etc.) currently active will be restored after a (re-)start of Rocrail. This is often useful as it ensures the function status (on/off) is the same for both the loco and in Rocrail.

Note: If this option is activated now a pop-up window with a warning will occur. This has to be confirmed by pressing OK.

Other options do not have to be considered at the moment. They are explained on page Locomotives: Index.

In the next step the General tab is chosen and the Loco's ID is entered:

General Tab: Entering the ID


The ID NEW is thereby overwritten by an appropriate name. The ID should be short to fit into Rocrail's block symbols. Often the locomotive's class like BR298 in the example is used as ID.

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.
General note on IDs: All IDs (e.g. of locomotives, wagons, switches, signals, etc.) should not contain spaces/blanks or special characters. This is possible, but can lead to problems in connection with advanced operations (e.g. in XML scripts). For example, the underscore character can be used instead of the space character: BR_298.
It is strongly recommended to use only combinations of the following characters with a max. length of 32:

0 1 2 3 4 5 6 7 8 9
a b c d e f g h i j k l m n o p q r s t u v w x y z, or Capital letters
_ . - + [ ]

All other fields are optional and do not need any change for the time being. See Locomotives: General for an explanation.

Next the Interface tab is selected and the locomotive's digital address is entered:

Interface Tab


Address

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.


Interface ID

The ID of the command station controlling the locomotive. As generally only one command station is used this field usually remains blank.

Tip: Not selecting an Interface ID makes it easier to help in case a problem is posted on the forum.


Bus

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).


Protocol

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.


Protocol Version

This field remains unchanged generally. See Locomotives: Protocol.


Decoder Steps

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, of the command station and in Rocrail must match otherwise the loco light (F0) may not work correctly.


Options

These settings are not required for basic operation and should not be altered at the moment. See Options for details.


Acceleration

These settings are not required for basic operation and should not be altered at the moment. See Acceleration for details.


Speed

Speed Tab

Speed settings are either in percent or km/h (km/h is only a place holder for "distance per hour", thus mph values can be used as well)

Tip: All values can be left unchanged at the moment.
Important :!: If values should be changed anyway, only the left column (right of V_min, V_Mid etc.) should be used.


Mode Percent

If Percent is activated (default) all velocities (left column!) 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.
Mode km/h

If km/h is activated velocities are in km/h (mph).

Note: The locomotive's 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 35 indeed yields 35 km/h. If this condition can not be fulfilled it is recommended to use percent mode instead.


V_Min

The slowest velocity Rocrail uses under certain conditions in auto mode.

Tip: This should be a very low speed of only a few kilometres / miles per hour at which the loco is still running smooth. Even with slow deceleration the loco should be able to stop from this speed within a few centimetres (breaking distance depends on the used scale).


V_Mid

A medium velocity Rocrail uses under certain conditions in auto mode.

Tip: This speed is used, e.g., if a train approaches a red signal or if the train is passing switches in turnout position.


V_Cru

The cruise speed Rocrail uses under certain conditions in auto mode. This speed is 80% of V_Max by default (value 0). If a value other than 0 (zero) is entered this speed will be used.


V_Max

The maximum velocity of the locomotive. See above for different meanings in percent and km/h modes, respectively.


V_RMin, V_RMid, V_RCru, V_RMax

Same as V_Min, V_Mid, V_Cru and V_Max but for reverse direction. These options are commonly used for locomotives featuring different maximum velocities for forwards and backwards driving, respectively.

Tip: All values can be left at 0 (zero) for the time being. The velocities specified above will be used for both directions in this case.


As no further settings on the remaining tabs are necessary for basic operation, creating of the locomotive is completed by pressing Apply.

Attention :!:: If on tab Details the engine type is set the following is very important:
Rocrail takes care that no electric engine is running on tracks without catenary in automatic mode.

Therefore in all blocks which should allow electric locomotives block option Electrified has to be enabled. Otherwise the loco will neither start or run in automatic mode.


If the General tab is selected again the new loco is now listed with its correct name. If required, further locomotives can be created following the above steps.


Tip: See also Speeds in Automatic Mode.


4.1 Controlling a Locomotive

If locomotives were created in a first step they are displayed on the loco panel on the left.

Loco Panel


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+ / FG- (Function Group) buttons, respectively. If four or less functions are defined the FG buttons show no effect.

Alternatively, a loco can be controlled via a throttle window. A throttle is opened by clicking on the or symbol on the symbol bar or by double clicking the loco in the loco panel.

Throttle Window


The title bar of the throttle window shows the ID of the controlled loco. In case another loco should be controlled, a single click on the image (above F1) opens a new window Mobile selection. The loco to be controlled is chosen from list, then the image is clicked again.

The running direction can be changed by pressing the >> (or <<) button.
Stop is used to decelerate the loco to a stop while B R E A K is an Emergency Break (if supported by the command station) or a Power Off.
A throttle window allows for direct access to the functions F0 to F14. Further functions, if any, are visible after pressing FG.

Tips: 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 aside.

The buttons with the Latin numbers (I, II, III, IIII) set the loco speed to one of the programmed velocities V_Min (I), V_Mid (II), V_Cru (III) and V_Max (IIII), respectively.

The size of the window can be changed as required, making the buttons larger and easier to read.


5.0 The Track-Plan

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.

5.1 Creating An Own Track-Plan

A new track plan was already added automatically when the workspace was created. The plan has the title Level 0. The title can be changed as needed, for instance to Main Line or the name of a location. This is done by renaming the title using menu Track plan → Panel properties….

Tip: If more lines, locations etc. shall be separated to show up on different track panels new panels can be added using Track Plan → Add track panel…. Each should be named as needed and has to get different level. Beginners, however, should start with a simple track plan using only one level.
"Level" is not meant physically, i.e. levels can represent different sections of the layout, regardless whether they are on different heights or whether they are arranged side by side.
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.


5.2 Editing the Track-Plan

Tip: For a better overview choose Show grid from the View menu.

In order to be able to edit the plan Edit Panel from the Track Plan menu has to be activated. A new dialogue opens allowing to place items by "drag & drop":

Add item dialogue A single click on an item reveals its name
in the bottom line. Here a right turnout
was selected


The dialogue can be closed at any time if it is not needed and be reopened from the Track plan menu (Add item…). It is used for adding items to the plan:

Adding Items

Note: For a trial only items of the tracks type should be used as most other elements start queries which will be explained in the next chapter.

Using the above dialogue, at first, from the left column an appropriate object type (track, switch, signal etc.) is chosen. Then the desired item is clicked with the left mouse button and while the mouse button is kept pressed the item is dragged to the desired position and then dropped by releasing the mouse button. If the newly placed item does not have the wanted orientation it can be rotated (see below).

As an alternative, adding items can also be done by means of the context menu:
The right mouse button is clicked while the pointer is at the position where the new element should be placed. The desired item is then chosen from the menu.

Rotating Items

Every item can be rotated once it was placed on the plan. The fastest way to rotate an active item is using the Alt+R hotkey. A newly placed item is active by default. Other elements have to be left clicked first in order to set them activate (only one at a time).

As an alternative, rotating items can also be performed by means of the context menu:
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.

Moving Items

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 experienced user may also move several objects at once or even an area of the track plan as described on page Select.

Copying Items

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.

Removing Items

Items are removed from the track-plan by clicking them with the right mouse button and choosing Delete from the menu.


6.0 Basic Plan Elements

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 wikidemo layout is designed as an example.

6.1 Plotting Tracks

The small example should start with a curved track in top left corner: In the left column of the Add item dialogue (see chapter 5.2) Track is selected then the curved track (second item in the right column) is moved to the desired position. (Step 1 in figures below).
As the orientation of the curve is not correct it is rotated by once using the hotkey Alt+R (or the item is clicked with the right mouse button and orientation is changed by choosing Orientation → Rotate from the context menu) (Step 2).


Step 1 Step 2


Now 12 straight tracks should be added right from the curved track. The first track is placed as explained above (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


Thereafter three straight tracks are plotted below the curve (Step 5).
Each of those three tracks has to be rotated as shown above (Step 6).

Tip: If the first track is rotated right after it was placed the remaining two tracks can each 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 rotated, too (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. The tracks have to be rotated accordingly. (Step 11).

Note: The direction tracks are for the users orientation only. They have no influence on the running direction of a manually driven train. Direction tracks can be used to influence the automated generation of routes, which will be explained later.


Step 11


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.

6.2 Switches

After the oval shaped track was created in the last paragraph it is now extended with a parallel track and the required switches.

6.2.1 Plotting 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).

Step 12


The left gap is filled with a right switch which is selected from the Add item dialogue: At first, from the left column Switch has to be selected and in a second step the right switch (see screenshot in chapter 5.2) is placed in the plan.

Note that newly placed objects are automatically named by default. That is, every object will get it's own unique ID. The first switch object will get the ID sw1, the second sw2 and so on.
Automatic IDs can be renamed later on, however, it is recommended to either keep them or to rename them as soon as possible. Renaming at a later date, for example, when a switch has already become part of a route, is not recommended. In some cases this may result in invalid references.
If individual IDs are preferred, this can be set in the Rocview options: FileRocview properties… → Tab GeneralPopup ID Dialogue. After activating this option, a dialogue will be opened for newly added objects in which the automatic ID is displayed and can be changed if necessary. Individual names should be short in any case. The dialogue, if displayed, has to be confirmed by pressing OK (Step 13).

Step 13: ID dialogue (optional) and result


In the same way the right gap is filled with a Left Switch, sw2. In addition two curves have to be added and rotated to the correct positions. This will complete the extended wikidemo plan for the moment (Step 14).

Step 14


6.2.2 Configuring Switches

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 (sw1) 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. Pressing Help opens the wiki page describing all options. Next, tab Interface is selected:

Switch Dialogue, Interface Tab


The following important options are available:

Interface ID

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

Bus

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).

Protocol

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.

Address and Port

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 sw1 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:

Rocrail-Standard PADA
Switch Address Address Port Address Port
1 1 1 0 1
2 1 2 0 2
3 1 3 0 3
4 1 4 0 4
5 2 1 0 5
6 2 2 0 6
etc.


Invert

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. Further information is available from the wiki by pressing Help.

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 sw2 is highlighted as shown below, afterwards again the tab Interface is selected.

Index (List of Switches)
Dialogue Switches, Index Tab

sw2 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.


6.2.3 Testing Switches

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.


6.3 Signals

Signals generally are very important in railroading, but for the operation with Rocrail they are not required. Therefore, is not mandatory to set them up and they can also be supplemented at a later time. If no signals are desired, this part of the manual can be skipped (continue chapter 7.0).

In this chapter the example layout of Step 14 in the previous chapter is extended by three signals.

6.3.1 Plotting 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).

Step 15: Deleting tracks
Step 15


Right clicking on the upper gap in the track circle opens the context menu from which Signal is chosen. Of course it is also possible to use the Add Item dialogue again. The signal automatically receives the ID sg1 (see again chapter 6.2.1 for more information on automatic IDs; what is written there applies here accordingly). The gap below is now filled with a signal named sg2 and the remaining gap is closed by adding signal sg3. The signals should be rotated to fit the driving direction as shown below (Step 16).

Step 16: Adding Signals
Step 16


6.3.2 Configuring Signals

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.

Details: Choosing type of signal
Signals Dialogue, Details Tab: Choosing Type of Signal and Number of Aspects


All other options remain unchanged and the Interface tab is selected.

Interface Configuration
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.

Signal Index
Dialogue Signals, Tab Index


The index is showing all three signals available. Signal sg2 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 sg2 should be configured using patterns.

Configuration of Signal sg2 Using Patterns


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 sg3 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 sg3


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.

Alternatively sg3 could be configured using patterns as well. These alternative settings are shown in the figures below.

Alternative Configuration of Signal sg3 Using Patterns


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 sg1 and sg2 are shown as two-aspects signals while sg3 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.


7.0 Plan Elements in Automatic Mode

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.

7.1 Blocks

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.


7.1.1 Plotting Blocks

The track plan is modified by removing three times four tracks as shown in the figure below (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).

Step 19


7.1.2 Configuring Blocks

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. Because the signal of block 01 is located at the - side of the block signal S01 is selected from the drop-down field Signal in section Minus(-) side signals. The changes are saved by pressing apply.

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 Minus(-) side signals.

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 the signal of block 03 is placed at the + side of the block this time the signal has to be selected from the list of Plus(+) side signals.

Finally the last changes are saved by again pressing apply and the dialogue is closed with OK.

Tip: The router is able to associate signals with blocks automatically. If this is wanted from the menu FileRocrail properties… → tab Router option Assign signals to blocks has to be activated. Rocrail has to be closed and restarted for this change to take effect. The signals are assigned to the blocks once the Router is started as described in chapter 7.3.1.


7.2 Sensors

In this section sensors are added to the plan and subsequently are configured.
Some sensor configuration options:

You can use all three variants without any problems.
Option 1: This variant does not offer continuous electrical detection. But this is not necessary for the operation of Rocrail.
Option 2: This variant is only suitable for one-way trains (each track for one direction) because of its asymmetry.
Option 3: This variant is good if you want maximum flexibility use it with a third, middle sensor with the event 'OCCUPIED'. It can easily be converted to the second variant by connecting the middle section to the 'ENTER' sensor.

We now continue with the demo plan.
All blocks 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.

All possible sensor events and their usage are described in detail on page Sensors and Blocks.


7.2.1 Plotting Sensors

The track plan is modified by removing six tracks from the layout as shown in the figure below (Step 20).

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 01+. The remaining sensors are added in the same manner:

  1. right of block 01 sensor 01-
  2. left of block 02 sensor 02+
  3. right of block 02 sensor 02-
  4. left of block 03 sensor 03+
  5. right of block 03 sensor 03-

The modified track-plan should look like this (Step 21):

Step 21


7.2.2 Configuring Sensors

Generally sensors are configured by simply assigning addresses to them. To assign addresses after a right click on sensor 01+ 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.

Interface tab. Add address here
Sensors Interface Tab


The Interface ID is configured in the same way as for switches. The address is changed to 1 for sensor 01+.

After Apply was pressed tab Index is selected.

Index of Sensors


01- 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, 5 and 6 in the order of their appearance in the list.

Tip: A faster way to assign the addresses is to click the arrowhead button pointing to the right immediately after typing in the address of the first sensor:

This will call the next sensor in list showing again tab Interface where the next address is typed in and so on. When the last sensor was configured, after pressing Apply, the result can be viewed and be verified on tab Index.

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.


7.3 Routes

Routes are interconnecting the blocks on a layout and define which way(s) a train can use them.

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.


7.3.1 Creating Routes

The preferred method of creating routes is very easy by using the Router. It will find any possible route and create it automatically. This chapter describes how the Router is used, the next chapter will briefly describe how routes can be created by hand.

Router → Routing is selected from the Track plan-menu to choose options and run the Router. In a server popup message window the creation of four routes will be confirmed.



Running the Router and Result


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 Router 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 Router can be viewed after selecting Routes… from the Tables-menu:

Routes Generated by the Router


The four routes described above are listed on the Index-tab. If, for instance, the first route ([01-]-[03-]) is highlighted and subsequently the Commands-tab is selected, the automatically added switch Sw02 is found in the list.

The Router, 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 Router was configured according to the tip in chapter 7.1.2 additionally it created the signal to block 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 Router 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 Router may fail or it may not generate all routes wanted. However, the routes and other entries generated by the Router can always serve as a blueprint for own modifications.
A more detailed description of the Router is found here.


7.3.2 Creating Routes Manually

This section describes how routes are created manually. In most cases the Router can be used to create routes but sometimes it is good to know how to do this manually. This section can be skipped if not of interest (continue 7.3.3 below).

An existing route created be the Router will be used to explain the course of action.

First, Tables → Routes is selected from the menu. The Index tab is shown. The first route in the list ([01-]-[03-]) is highlighted (instead, if a new route was to be created, the NEW button had to be clicked). Now tab General is selected.

Tab General of the existing route from block 01 (minus side) to block 03 (minus side)


For a newly created route first of all the ID had to entered. Here, the ID was created by the Router which is indicated by the description *Generated by the router.

Note: It is recommended to provide a description (e. g. "manual") for manually created routes.

For a manually created route the ID could be simply [01-]-[03-] or 01-_to_03- or something else which is found to be self explaining.

Very important are the lines From block and To block, respectively. The question is where (which block and block side) does the route start and where does it end.


Note that a route always connects one block's exit side to the very next block's enter side in the From blockTo block direction only and with no other blocks in between.


In this case the route starts from the minus side of block 01. Thus, from the drop down list in line From block 01 (block 01) has to be chosen. Then the block side is selected: Either plus or minus. The check box + (plus) at the end of the line is not checked which means - (minus).

The route ends at block 03, minus side: From the drop down list To block 03 (block 03) is chosen and the checkbox + is again not activated.

All other options are of minor importance and can be skipped (they have not been altered by the Router, too). As usual, the Help button opens the wiki page with descriptions of all options available.

Tab Speed is also not important at the moment. The next thing to consider is which switches are involved in the route, if any. In the example case switch Sw02 is located between blocks 01 and 03 seen in driving direction. It has to be set to the correct position if the route is used. The switch commands are configured on tab Commands:

Commands tab


On this tab, after the first and only entry Sw02 was highlighted, it is shown what the Router did: It selected Sw02,sw and activated Command Straight.

If this was to do by hand, the ID of the relevant switch had to be chosen from the list, then the appropriate command (Straight or Thrown for simple switches) had to be selected and last the Add button had to be pressed. If there were more switches in the route, these steps had to be repeated for all these switches.

All other options and tabs are of minor importance and the dialogue can be closed by clicking Cancel. Of course, if a new route was created first the changes are saved by pressing Apply and, if no other routes should be created, the dialogue is afterwards closed by pressing OK.

This ends the small excursus on how to create a route manually.


7.3.3 Configuring Routes

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


Block 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 enter + and all enter - 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. For direction + to - route all enter + is used. In conclusion, all enter - is used for direction - to +. The table below summarises the correlation between running direction and routes.


Running Direction and Routes:

From To Route
+ - all enter +
- + all enter -


As the running direction for this block is + to - the all enter + route has to be highlighted:

Routes Configuration of Block 01


Below line Sensors coming from block all (+ enter): there are several drop-down fields. It has to be specified which sensors apply to a train entering the block using route all enter +. In block 01 these are the sensors 01+ and 01-. 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: enter is assigned to sensor 01+ and in is assigned to sensor 01-, because a running train will trigger 01+ first (enter) and 01- will be the second sensor triggered (in). 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. Alternatively, the arrowhead button can be used again as described in the tip concerning the addressing of sensors.

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 editing sensors and events.

Following the table Running Direction and Routes route all enter + has to be used for this block, too and is thus selected. The two sensors in block 02 are added in the same way as shown for block 01: The sensors are 02+ (event: enter) and 02- (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 enter + and all enter - 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 this time route all enter - has to be used because a train will enter at the - side of the block. That is, route all enter - has to be selected.

The sensors for this route are 03- with event enter and 03+ with event in.

After all settings are done Apply is pressed and the dialogue is closed by pressing OK.

Tip: The Router in many cases can configure routes automatically. Prior to this in the dialogue available from menu Track planRouter → tab Routing option Assign feedbacks to blocks has to be selected.

Rocrail is now ready to run trains in automatic mode.


8.0 Using 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:

  1. 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.
  2. 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.


8.1 From Block to Block

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:

  1. right clicking on the block symbol (which is to be block 01 in the example) and selecting Select locomotive assignment…. In the following dialogue the loco ID is double clicked.


  2. or by dragging the loco ID from the loco panel and dropping it on the block symbol.


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 + side to - side):
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.


8.1.1 Running To Destination

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.

The following applies:

  • Rocrail does not necessarily take the shortest way possible if multiple routes are involved. The destination block is reached reliably only if no turnoffs are present between the starting block and the destination block or these turnoffs have been locked beforehand.
  • If the selected destination is occupied or otherwise unavailable a random destination is chosen. If all destinations have to be approached, schedules must be used.


8.1.1.1 Using Drag and Drop

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


8.1.1.2 Destination By Menu

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


8.1.2 Running Without Destination

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.

In the forum this mode is often referred to as "Aquarium Mode" because trains move somewhat unpredictable like fish in an aquarium.

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.

To stop automatic mode see 8.3.

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.

8.2 Scheduled Service

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.

The following describes the very basic steps only. See the wiki page on Schedules and its sub pages for more details.


8.2.1 Creating Schedules

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.


8.2.2 Starting Locomotives With a Schedule

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 tour or 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


8.2.3 Locations

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.


8.2.3.1 Creating Locations

From the Tables menu Locations is selected. The dialogue Location opens. By pressing New a location named NEW is created:

Dialogue Locations


The name 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:

Creating a Location


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.

Adding Blocks


As usual changes are confirmed by pressing Apply and the dialogue is closed by pressing OK.


8.2.3.2 Locations in Schedules

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.


8.2.4 Timed Schedules

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.


8.2.5 Schedule Options

Recycle
The number of times the schedule is repeated.


In Delay
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.


Follow-Up Schedule
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



8.3 Stopping Automatic Mode

To stop the automatic mode one of the following can be done:

  1. Switch Auto Mode off (button / )
  2. Wait until the trains stop running into the next block

or

  1. Select "Stop all locs" in "Automatic" menu (or use button /
  2. Wait until the trains stop running into the next block
  3. Switch Auto Mode off

or

  1. Double click on all running trains to stop them
  2. Switch Auto Mode off

These methods prepare Rocrail and the layout for the next session.

Tip: To exit Rocrail either ctrl-D or the "close window" button (depending on the operating system, e.g. "X" in the top right corner on Windows) can be used to close the window and both Rocview and Rocrail.
There is no need to click Save as the layout is saved automatically by exiting Rocrail.


9.0 Additional Steps

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!

1)
To bring back the initial settings of Rocrail first the application has to be de-installed if offered by the operating system. Afterwards the Rocrail folder (My files/Rocrail, Documents/Rocrail, home/Rocrail, depending on the operating system) has to be deleted manually. Backup your files before doing so! Afterwards Rocrail can be installed again.
2)
depending on operating system settings, the extension .cmd may not be displayed
3)
a window that opens and closes briefly is of no importance
stepbystep-en.txt · Last modified: 2023/09/01 11:23 by rjversluis