Skip to main content Skip to search Skip to main navigation

Lenzxicon

Gerade dem Einsteiger in die Welt der digitalen Modellbahnsteuerung stellen sich viele Fragen, oft schon bei der Planung seiner Anlage. Aber auch alte Hasen sehen sich gelegentlich mit Fragen zu neuer Technologie konfrontiert.

Einige Fragen werden in den FAQ beantwortet. Das eine oder andere Thema wollen wir etwas ausführlicher behandeln, und dafür gibt es dieses Lexikon von Lenz, das Lenzxikon.

Using CVs (configuration variables), you can adjust a range of parameters that define a decoder's behavior under certain circumstances and in specific areas. Even with so-called register programming, nothing more is changed than the respective CV. Direct CV programming (bit by bit or byte by byte) offers far more precise possibilities.

What is a CV?

Let’s imagine we know nothing and say, "a CV is first and foremost a filing card..."

The number of functional outputs of a decoder cannot be changed, as they are determined by the hardware. Similarly, for example, the maximum load capacity is a characteristic that cannot be altered.

However, there are a large number of characteristics that are not determined by the hardware of the decoder but by the software running on it. These characteristics can be widely modified. The most important ones for regular operation include the locomotive address, acceleration delay, and braking delay.

For each of these characteristics, there is a memory location inside the decoder where a number is stored. These memory locations can be compared to cards in a filing box. Each decoder contains such a, admittedly microscopic, "filing box." On each of the "cards" is written a property of the locomotive decoder, for example, the locomotive address on "card" number 1, the acceleration delay on "card" number 3. So, each property of the decoder corresponds to a card. Depending on the number of properties available in this decoder, the "filing box" is larger or slightly smaller.

Certain CVs must be present in every decoder to meet the NMRA standardisation criteria. These CVs are a prerequisite for obtaining the "Conformance Seal". Examples include CV1 (decoder address), CV7 (version identifier, immutable), CV8 (manufacturer identifier, immutable), and CV29 (decoder base configuration).

Other CVs may be used by a manufacturer in their decoder but are not mandatory. However, if these CVs are implemented, their function must comply with the standard. Lastly, there is a range of CVs whose purpose can be freely defined by the manufacturer.

Most modern decoders support more than the mandatory CVs, including all current Lenz decoders.

Different Representations of a Numerical Value: The "Bits" in the CVs

CV1 stores the base address of the locomotive decoder. This is straightforward, as you can simply enter this address as a numerical value. However, some CVs may control various properties. For instance, turning regulation or conventional operation on and off. It would be cumbersome to enter a unique numerical value for every possible combination.

It's easier to imagine the relevant CVs as having 8 switches that can be toggled on or off. These switches are called "bits". If a switch is on, we say "the bit is set" or "the bit is 1"; if off, "the bit is cleared" or "the bit is 0".

This is merely a different way of writing numbers, known as binary representation. Here, numbers are represented not in decimal (0-9) but using only 0 and 1—binary = two values.

Counting Bits

In technical contexts, counting bits typically starts at 0. Since this is not common in everyday language (e.g., would you count train cars as "0, 1, 2...?"), Lenz counts bits starting at 1. This counting method applies to all Digital plus devices and decoders. When programming decoders with devices from other manufacturers, you may need to use the 0-based numbering, indicated in parentheses next to the bit number.

Example:
Bit 2 (1): The number before the parentheses is the bit number in the "1-based" count, and the number in parentheses is the bit number in the "0-based" count.

Binary Representation

Let's illustrate binary representation with CV29:

In CV29, various settings are stored. Each of the 8 switches (bits) determines whether a particular setting is on or off. If the switch is on, the bit is set, so its value is "1". Conversely, if off, the bit is not set, and its value is "0".

Switch No
(Bit No)
Switch ON =
Bit set "1"
Switch OFF =
Bit cleared "0"
1 (0) Loco moves in reverse when the direction switch points 'up/forward' Loco moves forward when the direction switch points 'up/forward'
2 (1) Loco operates in
28/128-step mode
Loco operates in
14/27-step mode
3 (2) Loco can also operate in analogue mode Loco cannot operate in analogue mode
4 (3) Not used
5 (4) Decoder uses customised speed curve Decoder uses default speed curve
6 (5) Loco is controlled with extended address
from CV17 and CV18
Loco is controlled with base address
from CV1
7 (6) Not used
8 (7) Not used

Settings can therefore be turned on or off by simply setting or clearing a bit in the CV.

The LH100 (version 2 and above), LH200, and LH90 controllers make toggling individual bits convenient via a dedicated menu. For older LH100 controllers (pre-version 2) or devices like "compact", binary mode programming is not supported. In such cases, you must enter the corresponding decimal value (byte value) for the desired bit combination in the CV.

For users of the Digital plus system connected to a PC via Lenz components, a user-friendly CV editor is available on the screen to facilitate CV adjustments. Learn more at PC Connection.

Let’s Get Started!

Grab your decoder's manual and explore the extensive CV programming possibilities. Don’t worry, you can’t do much harm, as the decoder can always be reset to factory settings if needed:

Simply write the value 33 to CV8. Note that custom speed curve CVs are not reset, but CV29's bit 5 will be cleared, reverting the decoder to the factory speed curve. CVs of connected S.U.S.I. modules are also unaffected!

A quick tip:

A common beginner mistake is mismatched speed step settings between the command station and the targeted decoder (CV29). Mismatched settings can lead to issues such as:

  • Unable to turn the locomotive's lights on
  • Lights flickering during speed step changes (on-off-on-off...)
  • Locomotive not responding to commands from the station

If something doesn’t work as expected, double-check CV29...

When building a reversing loop in two-rail systems, a short circuit occurs where the reversing track rejoins the "main track," as the previously right rail now connects to the left. This short circuit can only be avoided by separating both sides (see "A" in Figure 1).

Reversing Loop Image 1 A single separation at the entrance of the loop is not sufficient, as the wheels reconnect the separated tracks when passing over them, thus re-establishing the short circuit. Therefore, a double separation is also required at the exit. The result is a completely isolated area within the reversing loop, called the reversing loop section, where the polarity is switched. This section is powered via the LK100 or LK200 reversing loop modules.

The reversing loop module automatically ensures the correct polarity in the reversing loop section when crossing the separation points.

The Simple Functional Principle

Reversing Loop Image 2 If the polarity in the loop (Point "A" in Image 2) is incorrect at entry, the short circuit caused by the wheels is detected by the LK200, and the polarity is immediately adjusted. This happens so quickly that no changes are noticeable during operation, nor does the system shut down. The short circuit is eliminated, allowing the train to enter the loop.

When crossing the separation point at the exit of the loop, another short circuit occurs, prompting the LK200 to switch the polarity again. The train can then exit the loop.

The LK200 reversing loop module operates based on the leakage current principle, detecting as little as 100mA of leakage current. Polarity switching in the LK200 is electronic rather than mechanical, ensuring extremely fast switching speeds and eliminating mechanical wear.

Two points to keep in mind:

  • Only one train may be in the reversing loop section (not the entire reversing loop!) at any time.
  • The reversing loop section must be as long as the longest train that will pass through the reversing loop.

The Dogbone

To create the popular double-track "parade route," start with the basic oval shape, extend it, and "compress" the parallel straight track sections. The result is a track layout resembling a bone, hence the name "dogbone."

Reversing Loop Image 3 Adding a track connection within this dogbone (e.g., for a station) creates a situation where two different polarities meet in the track connection:

Reversing Loop Image 4 In this illustration, one side of the track (polarity) is shown as dotted, and the other as solid. Without double separations in the track connections, a short circuit would occur. However, with the separations, switching between the tracks is not possible, as any wheel crossing the separation point would cause another short circuit.

!Our Tip: The solution lies in a fundamentally different "wiring strategy" (compared to analog operation): Start wiring from the station and connect the tracks as shown in Image 5:

Reversing Loop Image 5 Remember that polarity and travel direction are unrelated in digital operation!

Reversing Loop Image 6 The "ends" of the dogbone present the same issue as a "normal reversing loop" (see previous section). Place a reversing loop section (shown in gray) at an appropriate location:


Hidden Station in the Reversing Loop

Only one train at a time is allowed in the reversing loop section. If you want to build a hidden station within a reversing loop, the entire hidden station must not be the reversing loop section.

!Our Tip: Position the reversing loop section (A and B in Image 7) before or after the fan of tracks in the hidden station:

Reversing Loop Image 7 Remember that the reversing loop section must always be as long as the longest train on your layout! If necessary, position the reversing loop section in the visible part of the track.

So, what exactly is a "programming track"?

The programming track is a section of track electrically isolated from the rest of the model railway system, where locomotive decoder settings can be configured. The existing settings can also be read from the locomotive decoder without removing it from the locomotive.

On the LZ100 / LZV100 / LZV200 command station, there is a dedicated connection for this track: the terminals P and Q.

The primary purpose of the programming track is to set or read the locomotive address. However, all other settings (CVs, see here) in the locomotive decoder can also be read and modified.

For convenient handling of the programming track, you can build a "magic switching board."

Modern digital model railway control is no longer a one-way street: Information flows not only from the central unit to the decoder but also back and can be used in many ways.

With the development of RailCom® by Lenz Elektronik, bidirectional communication for DCC has outgrown its infancy. Several significant manufacturers in the DCC sector have joined forces for this development, thereby avoiding redundancies and incompatibilities through mutual coordination.

What can RailCom do?

RailcomRailCom sends data from the decoder back through the track. For example, this enables the quick identification of a locomotive (reporting the locomotive address) at any desired location on the layout. For instance, in a stop section, the address of a locomotive can be displayed using the address display LRC120; the first graphic on the right shows a connection example.

RailCom is also suitable for "Programming on the Main" (PoM), allowing the locomotive to confirm the receipt of a programming command.

Moreover, RailCom also provides other data from the decoder, such as speed, CV content, and more.

Which decoders are RailCom-compatible?

First and foremost, all Digital plus locomotive decoders (those with the +), where the RailCom function is already factory-enabled. Additionally, the predecessor models of the Gold series support RailCom. However, in these models, the RailCom function must first be activated by setting bit 4 in CV 29.

You don't need to dive into the depths of CV programming to create double or multiple tractions. It's very simple. With the LZV200, LZV100, or LZ100 and the hand controllers LH01, LH90, LH100, or LH101.

What's the difference between double and multiple tractions? After all, "just" two locomotives are also a multiple traction. Answer: there's really no difference, except one key point: a double traction (DTR) can be created with almost all, even older DCC decoders, because the information for a DTR is stored exclusively in the central unit, not in the decoder.

In contrast, with a multiple traction (MTR), information is also stored in the decoder. The decoder knows, for example, that it is part of an MTR and what the address of this MTR is. However, the decoder must support this functionality—all current Digital plus decoders do!

Conclusion: If you're only using "smart" decoders, you can forget about DTR and focus solely on MTR.

Double Traction:

The central unit ensures that both locomotives involved in the DTR receive the same driving data. Why is this limited to two locomotives? Simply because the locomotives receive their driving data sequentially. With more than two locomotives, there could be a delay in response.

How does it work?

Detailed instructions and additional helpful tips for double traction can be found in the manuals for the LH01, LH100, and LH101.

Requirements for a DTR:

  • Hand controllers LH01, LH100, or LH101, central unit LZ100/LZV100, or LZV200
  • Both locomotives must be controlled via the same hand controller
  • Each locomotive must have received a driving command (e.g., changing speed level or direction, or toggling one of the functions on/off)
  • The speed level of the locomotives must be 0 when setting up the DTR.

Multiple Traction:

The locomotive decoder knows that it is part of an MTR and what the (freely configurable two-digit) MTR address is. This is defined by the MTR address in CV19. The central unit stores in an internal database which locomotive (address) belongs to which MTR. Thus, the hand controller display can indicate locomotives in an MTR with a small "m" and the MTR address(es) with a capital "M". These database entries are only deleted when the MTR is disbanded. If the system is turned off for a break, all entries naturally remain.

In an MTR, all participating locomotives receive driving data simultaneously, as this data is sent only to the shared MTR address. This eliminates any delays in response and minimizes data transmissions, which is beneficial for track transmission bandwidth.

One important note: if a locomotive is no longer on the track or loses contact when disbanding an MTR (though this can be mitigated with our clever USP circuit!), the decoder won't receive the disbanding command. As a result, the locomotive might not respond to its "normal" address anymore—it still believes it's part of the MTR...

How does it work?

Detailed instructions and additional helpful tips for multiple traction can be found in the manuals for the LH01, LH100, and LH101.

The LH01 can operate an MTR but cannot assemble or modify it.

An MTR is operated like a single locomotive, either using the MTR address (display shows "M") or the address of one of the locomotives in the MTR (display shows "m").

The functions of each locomotive in an MTR can be controlled individually. Simply select the "normal" address of the desired locomotive (e.g., turning on the headlight of the first locomotive and the taillight of the last one in a train).

Requirements for an MTR:

  • Hand controllers LH90, LH100, or LH101, central unit LZ100/LZV100, or LZV200 with version 3 or higher
  • DCC decoders that support MTR
  • Locomotive decoders must be set to operate with 28 speed levels

Note: Analog/conventional locomotives (address 0) cannot be included in DTR or MTR!

With the constant braking distance, the locomotive covers a predefined distance during braking—regardless of the speed. This is particularly useful for shuttle train operations with ABC modules and wherever precise stopping is required. The constant braking distance is also applied when transitioning from any speed level to speed level 0.

In locomotive decoders up to version 9.x (value in CV7), the constant braking distance (if activated) is applied both when transitioning to speed level 0 and when entering an ABC braking section.

For locomotive decoders of the + series (starting from version 9.x in CV7 and service number >3 in CV128), you can choose how the constant braking distance should function:

  • Only on ABC braking sections
  • Only when setting speed level 0
  • On ABC braking sections and when setting speed level 0

This more convenient setting option will also be available for decoders from version 7.x (value in CV7) and for decoders in our Lenz Spur 0 locomotives through a software update. You will be able to download this update for free from the website and conveniently install it at home using the Decoder Programmer.

We are currently programming the new software; when the update becomes available, we will prominently announce it on the website.

Enabling Constant Braking Distance

How to enable the constant braking distance depends on the version number (in CV7) of your decoder.

For decoders prior to version 9.x in CV7:

The constant braking distance is enabled by Bit 1(0) in CV51 (if the decoder in question is not ABC-capable, the constant braking distance will naturally only be applied when transitioning to speed level 0). If this bit is not set, the decoder will execute the speed-dependent braking delay defined in CV3!

For all decoders from version 9.x in CV7 (+ series),
for Digital plus decoders from version 7.x after a software update,
for decoders in Lenz Spur 0 locomotives after a software update:

Until now, the constant braking distance was generally applied, which could be impractical during shunting operations without activating the shunting mode. For the + series decoder generation or after the software update, it is adjustable how the constant braking distance should function:

  • Only on ABC braking sections: Bit 1(0) in CV51
  • Only when setting speed level 0: Bit 8(7) in CV51
  • On ABC braking sections and when setting speed level 0: Bit 1(0) in CV51 and Bit 8(7) in CV51

To disable the constant braking distance, delete Bits 1(0) and 8(7) in CV51.

Constant Braking Distance with ABC

In combination with ABC modules, the constant braking distance is almost indispensable: precise stopping is desired here. In the braking section of the ABC module, the locomotive decoder recognizes the "stop" command and brakes with a constant braking distance. When setting up the ABC braking section, ensure it is not shorter than the longest constant braking distance! The constant braking distance ensures that every locomotive stops within the braking section.

Constant Braking Distance with Speed Level 0

When braking from any speed level to speed level 0, the locomotive covers an adjustable, predetermined braking distance, regardless of the speed. The constant braking distance is only effective when the speed level is changed to 0. If the speed level is reduced to another value, e.g., from 28 to 10, the speed-dependent delay from CV3 will apply!

Adjusting the Braking Distance

The braking distance is determined by the value in CV52. Since locomotives have different motors and gear ratios, the braking distance varies for the same value in CV52 and must therefore be determined individually for each locomotive:

  • After enabling the constant braking distance, first determine which braking distance your locomotive achieves with a specific value in CV52. Start with the standard value (50) in CV52.
  • Mark the starting point of the braking distance on the track (e.g., with a pin next to the track) and accelerate your locomotive to a medium speed.
  • When the locomotive reaches the marked start of the braking section, set the speed level to 0. (Do not use the emergency stop button <>, as it triggers a locomotive-specific emergency stop, bypassing the decoder’s delays!).
  • Measure the braking distance traveled.
  • Increase or decrease the value in CV52 in increments of 10 and repeat the measurement until the braking distance meets your expectations.

Tip: Make these settings in PoM mode; this allows you to test each setting directly on the layout without switching between the programming track and the braking section.

Note: Constant braking distance is not effective when braking with DC voltage!

Temporarily Disabling Constant Braking Distance

When you activate shunting mode (default setting for Digital plus decoders: F3), the constant braking distance is disabled, and the delay from CV3 applies.

The constant braking distance is also disabled if you disable delays via function (default setting for Digital plus decoders: F4).

You can use these two methods, for example, if you want to prematurely stop an ongoing braking process.

The mentioned default settings apply to Digital plus decoders; for the procedure with Lenz Spur 0 locomotives, please refer to the respective manuals (functions are preassigned differently at the factory!).

Almost all locomotives and rail vehicles run too fast. However, this can be quickly and easily remedied by issuing the appropriate commands to the locomotive decoder. Two options are available for this purpose:

Vmin, Vmax, Vmid

Minimum, maximum, and average speed

The first option for prototypical speed is to enter three values: the minimum speed is stored in CV2, the average speed in CV6, and the maximum speed in CV5. For all three CVs, the value range is 0-255. The decoder automatically calculates a smooth speed curve from the three values.

Two examples:

Speed curve with factory settings:
CV2 = 0
CV5 = 255
CV6 = 60


Modified setting with reduced average speed:
CV2 = 0
CV5 = 255
CV6 = 30
This setting results in smaller changes in the lower speed step range


Modified setting with reduced maximum speed:
CV2 = 0
CV5 = 200
CV6 = 60


The values for minimum, average, and maximum speed are interdependent. If you set the average speed lower than the minimum speed, your locomotive will run slower in the mid-speed range than in the lower range.


Example of an unsuitable choice for the average speed value:
CV2 = 40
CV5 = 200
CV6 = 1


Correction by increasing the value for average speed:
CV2 = 40
CV5 = 200
CV6 = 70


The value 255 in CV2 results in maximum speed at speed step 1.

Speed Curve

Programming a custom speed curve

In addition to settings for minimum, average, and maximum speed, you can alternatively input a custom speed curve into the decoder. If you do this, the settings in CV2, CV5, and CV6 have no effect.

The custom curve is stored in CV67 through CV94. The value in CV67 determines the speed at step 1, the value in CV68 at step 2, and so on up to CV94, which determines the speed at step 28.

To activate the custom speed curve, you must set bit 5 in CV29.

PROG, PoM, or CV Editor

You have a choice: either program on the programming track or leave the locomotive on the track and set the CVs in PoM mode. Here, you first enter the locomotive address and can then, for example, change the parameters with the LH100. Other locomotives/decoders on the "main track" are not affected—nothing can go wrong.

The third option: the CV Editor, which allows you to conveniently edit each CV individually on the PC, either in PoM or programming mode. The CV Editor is part of the USB interface, which you need to connect the PC to the control unit. Additionally, the CV Editor is included with the Decoder Programmer.

If you reset the decoder to factory settings (CV8 to value 33), CVs of a custom speed curve are not affected! However, note that bit 5 in CV29 is cleared, setting the decoder to use the factory curve.

Detailed information on the various programming options can be found in the operating manuals for LH90/LH100/LH01 as well as in the decoder manuals. The functionality of the CV Editor is described in the USB interface manual.

Set up a track on your layout, for example at the engine shed, where you can both operate and program in programming mode. The "magic switching board" automatically switches between the operating track and the programming track.

Functionality:

During normal operation, track voltage is applied to the terminals "J/K." This voltage also powers the relay (the track voltage is rectified by the diodes), the relay is "activated," and the relay contacts connect the terminals "J/K" to the terminals "P1/Q1." This directly connects the programming track to the "J/K" terminals of the LZV100, allowing operation on the programming track.

When switching to programming mode (e.g., using the handheld controller), the track voltage "J/K" is turned off. This deactivates the relay, causing the relay contacts to connect the terminals "P/Q" to the terminals "P1/Q1." This directly connects the programming track to the "P/Q" terminals of the LZV100, enabling the reading or programming of locomotive decoders on the programming track.

The diodes must be BYV27, as other diodes would distort the track voltage! The relay must be a 12V DC relay with double-pole changeover contacts.

Circuit diagram as PDF

In model railroading, a driving device is classically an analog control device that changes the speed of the locomotive by the speed of the locomotive by adjusting the voltage (or by pulse width control) on the track.