Lights

Aim - this section provides an overview of the typical operation of the light system, and describes the "best" brake settings for Open Rails (OR) WAG and ENG files.

If you wish to provide any feedback on this page, please use the contact page. It would br great to have some feedback as this helps to ensure the accuracy of the information and models.

Index

Introduction

Overview of Lights on NSWGR Steam trains

Light Code - Structure and layout in Open Rails

Sample Light Code - Wagon Section

Useful References


Introduction

The use of lights on trains to improve a trains visibility is an important safety feature.Typically on trains operated by the NSWGR the following lights were carried by trains that were in service:

  • Headlight - most modern locomotives were fitted with electric headlights, whereas older locomotives may have had acetylene or kerosene lights, or none at all.
  • Marker Lights - typically located at the front and rear of the train.
  • Cab Lights - On all the older engines with the protal, type cabs, 30cl & 35cl etc, there was a light behind the lubricator, to illuminate the small glass view holes to set the oil flow, on engines without a dynamo, a flare lamp was set behind the lubricator. Lights were behind the water gauges & a cab light. To turn the cab light off, you unscrewed it until connection was broken.
  • Cab roof light - On 36, 38, 57, 58 and 59 class engines, in addition to the normal cab lights, there was a light under the cab roof lip, (ceiling) just behind the main cab frame.

top


Overview of Lights on NSWGR Steam trains.

All modern locomotives were fitted with 2 marker lights on the locomotive and tender. These were of a metal box type, with a single light globe inside. A turn down type lever was located on the outside of the light, in order to turn the marker light off. A square, brass handle was under the box which was turned to bring a red shade across the bulb when required. Red lights were always set on the rear of the engine, in which direction the engine was travelling when working as a light engine, to and from a depot, and on to its train.

Red lights all round were shown on shunting engines in all yards, as per diesels.

When working trains, the marker lights on the end attached to the train were to be turned off at all times. When double heading, all marker lights on the 2nd engine were also to be turned off.

On single lines where steam operated, and hand changing of staff tokens were taken whilst the train was in motion, marker lights were to be turned off and only the locomotive headlight, with the light turned to dim, inside station limits. This was because the marker light level on the engines smoke box was generally in line with the signalman's eyes, and the reflection from the marker lights could cause a temporary blindness, and had been known to cause the signalman to drop the staff.

top


Light Code - Structure and layout in Open Rails

In OR, code to define the light capabilities of the rolling stock is defined in the WAG file or wagon section of the ENG file.

Note: It is good practice to put notes into the WAG and ENG files to act as reminder for any assumptions made. These notes can be made with comment statements as shown below:

Comment ( Rear Marker Lamp - Left - Player operation )

The light consists of a number of individual lights which have been defined. These individual lights are then groupd within a "Lights" section with a number indicating the number of individual lights included. Each light may have a number of different states, which allows for the creation of strobe or blinking lights if desired.

Within each individual light the following sections are defined:

  • General - general conditions describing the light.
  • Control - how and when the light will be turned on.
  • State - the form of the light at any given time. The light can cycle through a number of different states.

The key parameters that define lights on a steam locomotive are described on the following web page.

Standard Light Parameters for WAG and ENG files (updated Jul 21 2015)

The typical structure of the lighting section for a WAG file is as follows:

Lights ( 1      Comment ( Number of lights defined )
   Light (
                  General Parameters
   Conditions (
                  Control Parameters
                     )
   States ( 1      Comment ( Number of states defined )
         State (
                  State Parameters
                   )
               )
           )
       )

Note: It is important to ensure that the opening and closing brackets for the light section match up, otherwise errors maybe generated.

Various different lights can be modelled in Open Rails in addition to the above, these include glow from firebox, glow form chimney. It may also be necessary to create lights that work only when the player is in command of the train, when it is an AI train, or in some circumstances lights that work for both the player and AI train.

Impact of direction of locomotive on lights

Most diesel and electric locomotives (and some steam locomotives) are 'double ended' so they have the same lights at both ends. In most cases we want only the front lights (usually white lights) to show when the locomotive is at the front of the train and only the rear lights (usually red lights) to show if the locomotive is at the rear of the train. Typically the This can be achieved using the appropriate settings for the Unit parameter.

The location and facing of the default drivers cab will determine how to set up the lights using the Unit parameter. If the default cab is located at the front of the locomotive in its normal orientation, then this is the "default" scenario for lights. If a secondary cab is located at the rear of the locomotive, and is facing in the "reverse" direction in relation to the default cab, then this is considered the "reverse" condition for the Unit parameter.

For example,

For a full example of the lights see some of the test locomotives, and also refer to the light test activity.

top


Code Segments for Various Light Examples

The light examples on this page represents use of the light configuration parameters described above to define different types of lights.

This type of code goes into the WAG file, or the wagon section of the ENG file.

Typically the lines shown in red text are the only ones that would need to be changed to suit individual wagons.

When adjusting the lights make small changes and test each change to confirm that the modification is working correctly.

More Info

Note: When setting lights up it is often helpful to do so in a couple of steps as follows:

  • Step 1 - set the location and colour of the lights. Leave all the Conditions parameters out, or set them to zero. This will allow the lights to be displayed without any conditions.
  • Step 2 - Once happy with the colour and location of the lights start setting the Conditions parameters. Sometimes it is worthwhile as a debugging process to do this one condition at a time.

Rear Marker Light - AI train

This is a example of a red marker light that is operates on AI trains @ night time.


Light (
Comment ( Rear Marker Lamp - Left - #1 (AI) )
   ShapeHierarchy ( "BOGIE1" )
   Type ( 0 )
   Conditions (
         Control ( 1 )
         TimeOfDay ( 2 )
         Unit ( 3 )
         Service ( 2 )
      )
   FadeIn ( 1 )
   FadeOut ( 1 )
   Cycle ( 0 )
   States ( 1
     State ( 1
         Duration ( 0.0 )
         LightColour ( 80ff0000 )
         Position ( -1.212 3.327 -3.436)
         Azimuth ( 180 180 180 )
         Transition ( 0.0 )
         Radius ( 0.2 )
         )
        )
       )

Flickering Firebox Light - Player train

This is an example of a two state flickering type light.


Light (
comment( Flickering light under firebox - front - left side (Common) )
   Type ( 0 )
   Conditions (
         Service ( 2 )
         Control ( 0 )
         Unit ( 0 )
      )
   FadeIn ( 0.5 )
   FadeOut ( 0.5 )
   Cycle ( 0 )
   States ( 2
     State ( 1
         Duration ( 0.09 )
         LightColour ( 70ff6600 )
         Position ( 0 1.0 -4.0 )
         Azimuth ( 90.0 90.0 90.0 )
         Transition ( 0.0 )
         Radius ( 2.4 )
         Elevation ( 0.0 0.0 0.0 )
         )
     State ( 2
         Duration ( 0.09 )
         LightColour ( 70ff3300 )
         Position ( 0 1.0 -4.0 )
         Azimuth ( 90.0 -90.0 90.0 )
         Transition ( 0.0 )
         Radius ( 2.4 )
         Elevation ( 0.0 0.0 0.0 )
         )
        )
       )

Example Light Condition Combinations

This light will appear on all trains that are in-service.


   Conditions (
         Service ( 2 )
         Control ( 0 )
         Unit ( 0 )
      )

This light will appear on all AI trains that are in-service, and will only appear if the wagon is the last wagon, and it is night-time.


   Conditions (
         Control ( 1 )
         TimeOfDay ( 2 )
         Unit ( 3 )
         Service ( 2 )
      )

This light will appear on all trains and will only appear if the headlight is operating on the Bright setting and the locomotive is the first wagon.


   Conditions (
         Headlight ( 3 )
         Unit ( 2 )
      )

Make sure that you test your settings in a similar fashion as shown in the lighting effects demonstration activity. The rolling stock used in this activity demonstrates how to complete a full set of lights in a WAG or ENG file.

top


Useful References

top