Ditch Lights explained. Here are the GCOR rules for using headlights :

5.9 Headlight Display
Turn the headlight on bright to the front of every train, except when the light must be dimmed as outlined in Rule 5.9.1 (Dimming Headlight) or turned off as outlined in Rule 5.9.2 (Headlight Off).

5.9.1 Dimming Headlight
Except when the engine is approaching and passing over a public crossing at grade, dim the headlight during any of the following conditions:
1. At stations and yards where switching is being done.
2. When stopped close behind a train.
3. When stopped on the main track waiting for an approaching train. However, when stopped in block system limits, turn the headlight off at the radio request of the crew of an approaching train, until the head end of the train passes.
4. When approaching and passing the head end of a train on the adjacent track.
5. At other times to permit passing of hand signals or when the safety of employees requires.
6. When left unattended on a main track in non-signaled territory.

5.9.2 Headlight Off
Turn the headlight off under either of the following conditions:
1. The train is stopped clear of the main track.
2. The train is left unattended on the main track in block system limits.

5.9.4 Displaying Headlights Front and Rear
When engines are moving, crew members must turn on the headlight to the front and rear, but may dim or extinguish it on the end coupled to cars.

5.9.5 Displaying Ditch Lights
Display ditch lights, if equipped, to the front of the train when headlight is on bright.
Locomotives must not be operated as the lead unit out of a train’s initial terminal unless both ditch lights are operating. However, if no units are equipped with ditch lights, do not exceed 20 MPH over public crossings until occupied. How to use ditch lights with TCS decoders:
Wire color: Description: CV Used:
White Head light 49
Yellow Rear light 50
Green Ditch light A 51
Purple Ditch Light B 52
Ditch Lights Wires.
CV Default CV Light Effect Forward CV Value Reverse CV Value Both Directions CV Value
51 32 Ditch Light (Left or Right) 10 26 42
52 32 Ditch Light (Other Side) 11 27 43
Ditch light control.
CV Default CV Value Description
63 64 Ditch Light Blink Holdover Time (12 = 1 Second, 64 = 5 Seconds)
117 3 Ditch Lights Blink Rate (1 = Slowest, 12 = Fastest)
Headlight Dimming Control.
CV Default CV Value Description Options
61 0 Automatic Dimming option CV61= 0 (not used) CV61 = 16 (Dims when stopped) CV61 = 32 (Opposite light is dimmed) CV61 = 48 (Dim when stopped + Opposite Dim)
64 15 Dimmed Brightness (Value between 2-6 for LED, and value between 12-18 for Bulbs)
Function Mapping.
Head lights Ditch Lights Functions used
Off Off None
On Off F0
Dim Off F0 F5 and
F0 + stopped
On On F0 F1 F3
On Flashing F0 F1 F2 F3
Ditch Light Remapping. Be default the green wire comes on with button one. To make the purple wire come on with button one as well enter the value 4 (the button one value) into CV 35 (the 0-6 CV from the red column for the purple wire). Now your ditch lights will come on in forward direction when function button one is turned on and blink when button two is pressed. To operate ditch lights : • To have ditch lights operate in forward direction only, select CV 51 and enter 10 and select CV52 and enter 11. • To get both the ditch lights to turn on with button 1, select CV 36 and enter 4. CV35 should already be a value of 4. To get both the ditch lights to turn on with button 3, enter 16 in both CV35 and CV36. The ditch lights will flash when you push button 2 or 5. • The ditch light blink holdover time is preset for 5 seconds. Select CV 63 and increase or decrease the time. A value of 12 equals 1 second. The buttons that control the ditch lights ( CV35 and CV36) can be remapped to any button using our Function Remapping table.