Search The Inn

Wednesday, March 25, 2026

LokSound v5 Decoder Brake Function Configuration

Apoorva, the IndianRailModeler from the groups.io forum for LokSound decoders, recently replied to an email concerning brake function configuration for v5 LokSound decoders. It is a good summary explanation of the configuration. The discussion below concerns the Brake functions settings located at the bottom of the Brake Settings sheet of the Decoder pane for the appropriate Sound file for your engine. It is shown in figure 1.
All three braking functions in Loksound 5 decoders work the same way. All three functions allow the user to set a deceleration rate by setting the appropriate value in CV’s 179, 180 and 181 (for Brake 1, Brake 2 and Brake 3 respectively). 

<Author's Note>
Brake 1 is the Independent Brake, Brake 2 the Automatic Brake and Brake 3 the Dynamic Brake. All three are installed by default in sound files, The only issue is brake 2. It is installed by default under Function 30. Most throttles can't reach that high since they only have 28 functions available. There are exceptions, e.g. the Android app Engine Driver. Brake 2 can be moved to a reachable function and that is explained here.


Figure 1 Brake function settings 

The braking rate CV value reduces the deceleration time set by CV4 based on the following formula:

Time to stop from max speed in seconds = (255 - CV)/255 * (CV4*0.879) where CV is the value set in CV179 or CV180 or CV181.

Associated with each brake function is a Max Speed CV, ie. CV181, CV182 and CV183 for Brake1, Brake2 and Brake3 respectively. When a brake function is activated, the decoder ignores the throttle speed step setting and sets an internal Speed to the value set in CV182, 183 or 184 depending on which of the 3 brake functions is activated. If the internal speed set by the throttle speed step is more than the target value in the Max Speed CV, the locomotive will slow down as per the respective brake setting.

Thus CV’s 182, 183 and 184 specify the speed (in terms of throttle Speed Steps) at which the braking will be deactivated once the speed is reached. The locomotive will continue at this constant speed as set in CV’s 182, 183 once it is reached. 

An example to illustrate the effect of CV’s 182 for Brake 1 is as follows. CV’s 183 and 184 for Brake 2 and Brake 3 function in the same manner. Assume CV182 [Brake 1] is set to 18 (equivalent to an internal Speed of 36 or Speed Step 4/28 in a linear speed curve). If the locomotive is running at a speed equivalent to Speed Step 10 (or any Speed Step higher than 4) and the Brake 1 function is activated, the locomotive will slow down up to the internal speed = 36 and hold it’s speed even while the Brake 1 function is still active (braking sound will still be playing) provided the throttle is maintained higher than speed step 4. If the throttle is reduced below speed step 4, the locomotive speed will decelerate again based on the Braking setting upto that throttle speed. Alternately, if the locomotive is already moving at a throttle setting of less than Max speed setting (ie less than speed step 4 in this example), invoking Brake 1 will have no effect on the speed, as long as the throttle setting is not changed. If the throttle is reduced to less than the locomotive speed, braking will be initiated till the speed corresponding to the new throttle setting is reached. If on the other hand, the throttle is increased to any speed step greater than 4, the locomotive will accelerate up to to the speed set by CV182, ie. speed step 4, and hold there. No further increase in speed will occur.

To be able to bring the locomotive to a complete stop when a brake function is activated, irrespective of the throttle setting, the associated CV 182, 183 or 184 has to be set to Zero or one has to reduce the throttle down to zero. If there are multiple brake functions active at the same time, the Requested Speed will be set to the lowest brake max speed control CV setting among the active brake functions.

This functionality of the Brake function gives the possibility to build braking control logics which would allow for two effects:
  1. Use the Max Speed CV as a Speed regulator to simulate a train going down hill at a constant speed either under brake application or dynamic brake application
  2. Use the throttle to function as a braking lever by setting CV182 (or 183 or 184) to 126 (maximum value). Now the slowing down of the locomotive is controlled by the throttle, and allows the user to select upto which speed to slow down to by simply setting the throttle to the desired speed step. Note: braking sound will still be active until the brake function button is active, and to get the appropriate braking sound, a slight modification will need to be made to the braking soundslot.
I am sure users will/can think of other uses of this feature.
Hope this helps explain the braking function.

Apoorva 


If you have an idea for a blog post here, let me know. If I can comment on it, I will or I'll see if someone else can and post it.  

No comments:

Post a Comment