Class Light Logic

Class lights are used by many American locomotives to indicate the type of train. The lamps usually show either green, red or white (3-color class light) or in rare cases only two colors (2-color class light). In the model, this is implemented with several LEDs that shine through the same lamp. Three function outputs are required, which are usually assigned to three function keys.

In order to save on function keys, from LokSound 5 firmware 5.8.156 the three function outputs can be assigned to the same button, which can then turn on the three outputs one after the other and change colors when the button is pressed. Assuming the F5 key is meant to cycle through the three colors, the result would look like this:

  F-Key What happens F-Key What happens  
  F5 ON Green Class Light ON F5 OFF Class lights OFF  
  F5 ON Red Class Light ON F5 OFF Class lights OFF  
  F5 ON White Class Light ON F5 OFF Class lights OFF  

Download and open any sound file that you'd like to add the class light logic to for your locomotive. In our example, we are using project S0851.

Function setup

  • Navigate to the function settings. You'll notice Class light logic sequence length [CV199]. Here you can choose if you want to have two different color class lights or three different color class lights. In our example we want to use a three color class light.
  • Then navigate to the function outputs. Here you must choose which outputs each color class light is assigned to. Each function output must be configured accordingly here. In our example, the outputs AUX3, AUX4 and AUX5 are to be used.
  • First select AUX3 from the list and assign the name "Class Light Logic Green".  Next, set it for "Dimmable Headlight" in the drop-down menu. Below that you’ll see the brightness level you want the light to be, we’ll leave it at 31.
  • Below that you’ll see a box for "Use Class light logic" along with the Sequence position. First check the box to use class light logic.
  • Then position the slider to the position that you want the green class light to illuminate when you press the function key. We’ll use position 1.
  • After that, select AUX4 from the list and assign the name "Class Light Logic Red".  Next, set it for "Dimmable Headlight" in the drop-down menu. Below that you’ll see the brightness level you want the light to be, we’ll leave it at 31.
  • Below that you’ll see a box for "Use Class light logic" along with the Sequence position. First check the box to use class light logic.
  • Then position the slider to the position that you want the red class light to illuminate when you press the function key. We’ll use position 2.
  • Finally, select AUX5 from the list and assign the name "Class Light Logic White".  Next, set it for "Dimmable Headlight" in the drop-down menu. Below that you’ll see the brightness level you want the light to be, we’ll leave it at 31.
  • Below that you’ll see a box for "Use Class light logic" along with the Sequence position. First check the box to use class light logic.
  • Then position the slider to the position that you want the white class light to illuminate when you press the function key. We’ll use position 3.

You do not necessarily have to use the AUX3, AUX4 or AUX5 outputs, any other outputs can be used. The order of the sequence position can also be chosen arbitrarily. Several outputs may also have the same sequence position if, for example, you want to control the front and rear Class Light with different function outputs.

Function mapping

Finally we have to assign a function button to operate the Class light. In Our example, it will be F5.

  • Now, navitate to the Function mapping.
  • Choose the function key that you want to activate the class lights, it can be any function key you want. For our example we’ll set them to cycle on Function 5. All function outputs involved must be switched simultaneously with the desired button.
  • Map each of your chosen AUX outputs to F5 in the Physical outputs column by using the drop-down menu in the cell. If you are using 3 class lights, all 3 AUX outputs must be mapped. If you are using 2 class lights, map the 2 outputs you’re using.

 

This completes the configuration of the Class Light logic and the decoder data can be transferred to the decoder. After that, nothing stands in the way of the - hopefully successful - test.
Customers that do not have a LokProgrammer can still accomplish this via our example by setting the following CVs with your DCC system. Note that we can only provide you with the CVs for our example.

CVValue
3116
320
29064
2911
298128
2991
306224
3071

 After this, set CV 32 = 8 first, then proceed

CVValue
353112

After this, set CV 32 = 9 first, then proceed

CVValue
2730