Functions

Functions are additional outputs on a that can control nearly anything one can think of – lights, sounds, smoke, animation, uncoupling devices, etc. Many are not limited to simple on/off functions - for example lighting functions are capable of imitating Mars Lights, Gyralites, Rule 17 dimming, single or double flashing strobes, ditch lights, and other effects. Output is generally 12 volts DC – to use or low-voltage lights, a resistor is needed. See the decoder's documentation as some have settings for LEDs.
Function Decoders are available for adding additional functions or for installation in a vehicle such as a caboose to control lighting or animation features.
== Available Functions ==
----
There are currently 69 functions supported, F0 – F68. Many Digital Command Control systems now support 29 functions, while some may still only support 13, F0-12. Function support depends on the software in the command station or throttle. Some decoders are now offering logic level outputs, which when coupled with a daughterboard in the locomotive, allow for many more functions or features to be created without a corresponding increase in outputs from the decoder.
The NMRA DCC standard doesn't define functions, but allows for features such as this.
===Function Groups===
 Bits are numbered from right to left, beginning with 0.
==== Function Group 1 ====
Up to 5 auxiliary functions may be controlled by this group, Functions and F1-F4S–9.2.1, 2.3.4
Format: 100DDDDD
If a bit is set to 1, the function is ON. Bits 0 – 3 control functions F1 – F4, bit 4 controls FL.If CV29 bit 1 (FL Location) is active, bit 4 controls FL, otherwise it has no function. 
==== Function Group 2 ====
This group added an additional eight functions (F5 – F12)S–9.2.1, 2.3.5
Format: 101SDDDD
Bit 4, "S", defines bits 0 – 3, when set to 1 they control F5 – F8, when 0, F9 – F12. 
=== Additional Functions ===
More functions were added using the Binary State Control Instruction.S-9.2.1, 2.3.6.4 Binary State Controls are quite similar to Functions, as they may control any output, sound or any other feature.
Functions: 
* F13 – F20 
* F21 – F28 
* F29 – F36 
* F37 – F44 
* F45 – F52 
* F53 – F60 
* F61 – F68 
By using the binary state control, the above functions can be controlled. 
Functions F29 and above became part of the standard with the publication of S-9.2.1 May 2022.S–9.2.1 DCC Extended Packet Formats 
=== Advanced Consisting ===
When using , CVs 21 and 22 allow additional control over functions. These CVs are only active while the vehicle is part of an advanced consist (CV19 is not equal to zero).
=== Swiss Mapping ===
----
Swiss Mapping is a term created by Zimo to describe an alternate method of mapping functions to replicate the lighting used on Swiss railways.
:Swiss Mapping and other extensions of the decoder software are far beyond the capability of a simple "engine and lights" decoder. ZIMO decoders and sound decoders are for "higher" functions predestined, since most types have 6, 8, or 10 function outputs available. The impetus for the concrete development of the Swiss Mapping was part of the planned configuration for ZIMO decoders (creating CV sets and sound projects) for large and small volume manufacturers, but priority should be given for a Roco SBB Re442, which can for the first time represent all Swiss lighting variants, and which with the previous CV structure would not be possible. (Zimo Newsletter, Sept. 2012)
Zimo decoders use several groups of CVs to accomplish this. For more information consult the manuals for a Zimo decoder.
See What is Swiss Mapping%3F for additional details.