Table of Contents
Light in the freight yard
Userpages - Hermann (hermannk) → light in the freight yard
direct link to the Rocrail Workspace-Download |
Preface
Preface 1:
This documentation was created as of: date 12.06.2025
Area | Details | Remarks |
---|---|---|
Software | Rocrail | Version 2.1.5828+ (macOS "Sequoia" on Apple M2 CPU) |
Computer | MacBook Pro (M2) | macOS 15.4.1 (Sequoia) |
- | - | keywords: locomotive, block, properties, action, action control |
Preface 2:
- use this solution at your own risk;
- regular data backups of the Rocrail workspace are recommended.
A) User request
Switch on the lights of a freight yard whenever one of the blocks of the yard is in use.
B) Solution details
This principal Rocrail plan is used for this documentation.
The "freight yard" is constructed by the block bk01 and block bk02.
The output "co_Freight_Lights" will control the lights of the freight yard.
B1) Action definition
Two actions are defined to switch the output "co_Freight_Lights" ON or OFF.
Action ID | Type | Type ID | Command |
---|---|---|---|
ac_Freight_Lights_ON | Output | co_Freight_Lights | on |
ac_Freight_Lights_OFF | Output | co_Freight_Lights | off |
B2) Action control
Configuration of block bk01:
- the lights will go ON when the block bk01 is reserved or occupied;
- the lights will go OFF when the block bk01 is free and the other block bk02 is free as well.
Action control bk01 | Conditions | |||||
---|---|---|---|---|---|---|
ID | State | Conditions | ID | Type | State | Must be true |
ac_Freight_Lights_ON | reserved | |||||
ac_Freight_Lights_ON | occupied | |||||
ac_Freight_Lights_OFF | free | X | bk02 | bk | free | X |
Configuration of block bk02:
- the lights will go ON when the block bk02 is reserved or occupied;
- the lights will go OFF when the block bk02 is free and the other block bk01 is free as well.
Action control bk02 | Conditions | |||||
---|---|---|---|---|---|---|
ID | State | Conditions | ID | Type | State | Must be true |
ac_Freight_Lights_ON | reserved | |||||
ac_Freight_Lights_ON | occupied | |||||
ac_Freight_Lights_OFF | free | X | bk01 | bk | free | X |
C) The Workspace
The download workspace " Light_in_the_freight_yard.zip" contains the following files:
File | Remark |
---|---|
plan.xml | die Rocrail-Plan-File |
rocrail.ini | the Rocrail initialization file (for the necessary configuration of the status signals) |
back to Solution details.
Open the workspace;
- place locomotives into different blocks to test all the different situations;
- or
- start all locomitves (optional virtually) and check if the lights are switched correctly.
Have fun.
Use the Rocrail forum for any questions.