User Tools

Site Tools


block-en

Blocks

What is a Block?

A Block is a single place on the layout, where trains should stop or are at least allowed to stop. Only one locomotive or train at a time can be in a block. It is usually a group of track sections with no turnouts in them, and at least one sensor.

A Rocrail block does not exactly match a railway block of the prototype: Whereas, for example, the section between two block signals on a line is called block, this section in Rocrail is divided into the route to the block and the block itself. Generally the Rocrail block thus starts from the spot where the train has to start breaking if it has to stop and ends at the stopping point or signal. The route and the block together have the same capacity as the block of the prototype.

The Block is the basic part of automating a Rocrail layout, and they must be set up when you lay your track by placing Sensors that Rocrail can read while it is running.

On the layout, you need at least 3 pieces of track to make a block: two regular sections with a Sensor section in between them. When a locomotive triggers the Sensor in the middle, Rocrail will know something is in that track.

Using more Sensors to define a block will give better results.

A better solution is to use 2 Sensors, one at either end of the block. This would be 5 pieces of track: regular, Sensor, regular, Sensor, regular. The Sensor on one end can tell Rocrail that something is coming into the Block, and the sensor on the opposite side can tell Rocrail that it has actually arrived.

3 sensors (one on each end, and one in the middle) can make a locomotive stop in the middle of the block instead of running out to the end of the Block. More complex sensor arrangements can allow for slowing and stopping a locomotive as it enters a block.

How Blocks Work

Blocks are the important prerequisite to running in Automatic Mode. When Rocrail is running in Automatic Mode, all locomotives are assigned to a Block, and only one locomotive may be in a single block at a single time.

As Rocrail moves your locomotives around the layout, it uses the blocks to keep track of where the locomotives are. Each block displays the name of a locomotive assigned to it when it is in use.

When a moving locomotive crosses the in sensor for a block, an event is triggered that tells Rocrail that the block is now occupied. If Rocrail is expecting this event (because it sent a locomotive to that block), it will display the locomotive's name in the block. If Rocrail was not expecting the event, it will display GHOST in the block and trigger a Ghost Train exception.

(Note: This will probably cause Rocrail to turn off the power and stop the whole layout, unless you have configured your layout to allow ghost trains.)

When Rocrail tries to move a locomotive from one block to the next, it will check to see if the next block is empty. If it is, it will display the locomotive's name in that block and then start sending move commands to the locomotive.

As the locomotive moves from one block to the next, the locomotive's name is displayed in both the start block and the destination block. When the locomotive triggers the in event in the destination block, Rocrail will remove the name from the starting block. That block is now considered empty and another locomotive can move into it.

Important

You must have at least one empty block for Rocrail to be able to move your locomotives around your layout. If your layout has 5 blocks, and you put a locomotive in each block, then you have filled all the blocks and there is no empty block for Rocrail to use as a destination.

How Blocks Are Linked

Blocks cannot work alone, you must also define Routes to connect the Blocks together.

Blocks define the different places on a layout, and Routes define how to get from one block to the next.

A Route links two blocks together, and defines what sensor events each block must use to know a locomotive is arriving from another block. It is also used to set the direction for any turnouts between the blocks in the route.

After you create the blocks for your layout, you should create routes that link each block with the other blocks around it. Then you should go back to each block and set the events for all the routes that are linked to this block.

The Routes tab in the Tables > Blocks dialog shows the list of routes that use this block. You should select each route in turn, and then use the drop downs to select a sensor for the in event. This tab will be empty until you define your routes.

How Blocks Use Sensors

After you create a block, you must tell Rocrail which sensors will send events to Rocrail for this block. This is done with the Routes tab in the Tables > Blocks dialog box.

You must define what events are sent by each sensor based on the originating block.

Block State

Color and state of Blocksymbols Color
Block is free. White
Block is reserved. Yellow
Loco triggered the ENTER sensor. Blue
Loco triggered the IN sensor; Block is occupied. Pink
Block is ready to accept a BiDi-Loco. Green
Block is closed. Grey


Fonts
Color Attributes Loco state Block symbol

Blue

Bold

Manual mode

Block ID color

Normal

Non manual mode
block-en.txt · Last modified: 2024/01/25 14:42 by rjversluis