DCC

Índex

Resum / Summary


Marca / Brand
Comandament / Thottle Estació de control / Command station Booster
Decoder Retorn / Feedback
bucle / loop info


software app / PC interface hardware

mobile stationary bidirectional
detecció / detection

Bus













decoder
sensor
current












controller
programming
reed sensor controller
sensor


Open




(altres/other)












Arduino based
  • Booster (pgahtow)
    • Booster2(R)
      • 2x 2,2A
    • Booster3
      • 5A
    • Booster3R (AtTiny, Railcom)


Programari / Software

NmraDcc (MRRwA) DCC_Decoder (MynaBay) other
Monitor / Sniffer
Arduino DCC Monitor






MERG







OpenDCC








Paco Cañada (digitrens)



Commercial





(altres/other)














Digikeijs







Fleischmann / Roco Android:
  • 680801
  • Roco/Fleischmann multiMAUS (as master)
  • z21 (white)
  • Z21 (black)


Lenz
  • LI100 (XpressNet-RS232)
  • LI100F (XpressNet-RS232)
  • LI101F
  • LI-USB (XpressNet-USB)
  • LI-USB-Ethernet (XpressNet-USB, Ethernet)





  • Lenz LRC100
  • Lenz LRC120 (screen: loco address)






Märklin / Minitrix
  • Mobile Station
  • Central Station 2











Oscilloscopio















Rocrail Rocrail server + :


  • ORA-1: accessory decoder
  • ORA-2: accessory decoder

RocRail feedback:
  • GCA93: current
  • GCA133: IR
  • GCA173 Hall-sensor





Bus

Info DCC

  • Digital Command Control (wp)
  • Modes
    • mode
      Normes NMRA Operations Decoder programming (on z21) programming mode escriptura CV lectura CV
      Operations mode
      NMRA S 9.2.1
      x Operations mode programming / Program on main - POM
      • hi pot haver diversos descodificadors connectats, perquè
      • s'envia a una adreça en concret
      • pot llegir valors de CV només si Railcom està activat
      • Exemples:

      • a una adreça en concret
      Service mode
      NMRA S 9.2.3 - Service mode / Broadcast programming / Programming track - PT
      • només hi pot haver un descodificador connectat (per això habitualment es fa servir un tram de via aïllat), perquè
      • s'envia per broadcast (a cap adreça en concret)
      • pot llegir valors de CV, fent servir petits consums elèctrics (DCC ACK)
        • alguns descodificadors estàtics, per exemple DR4018, necessiten a més una resistència i el led PROGRAM encès
      • es fa servir per a programar l'adreça de la locomotora
      • direct byte
      • direct bit
      • paged
      • register
      • broadcast
  • Estructura / Structure
    • NEM 671, NMRA
    • Bits
      • 0: 100us * 2
      • 1: 58us * 2
    • Formats de paquets
      • NMRA S 9.2.1: Operations mode
        12-bit

        byte
        [byte]
        [byte]
        [byte] byte
        programari / software
        preamble address
        (pDccMsg->Data[0])
        CCC
        DDDDD
        [DDDDDDDD]
        [DDDDDDDD] [DDDDDDDD] error correction NmraDcc
        111111111111
        00000000 (0)
        broadcast
        00000000
        00000001-01111111 (1-127)
        multi-function (7-bit) 0AAAAAAA

        11000000-11100111 (192-231)
        multi-function (14-bit) 11AAAAAA
        AAAAAAAA

        000
        Decoder and Consist Control Instruction
        0
        Decoder Control ...



        EEEEEEEE execDccProcessor(): pDccMsg->Data[0] < 128
        processMultiFunctionMessage()




        1
        Consist Control ...






        001
        Advanced Operation Instructions
        CCCCC

        DDDDDDDD




        notifyDccSpeed()
        010
        Speed and Direction Instruction for reverse operation
        CSSSS






        notifyDccSpeed()

        011
        Speed and Direction Instruction for forward operation
        CSSSS





        notifyDccSpeed()
        100
        Function Group One Instruction
        DDDDD
        FL,F1,F2,F3,F4




        notifyDccFunc()

        101
        Function Group Two Instruction
        SDDDD
        S=1:F5-F8; S=0:F9-F12




        notifyDccFunc()
        110
        Feature Expansion Instruction
        00000
        Binary State Control Instruction long form
        DLLLLLLL HHHHHHHH





        11101
        Binary State Control Instruction short form DLLLLLLL





        11110
        F13-F20 Function Control
        DDDDDDDD




        notifyDccFunc()
        11111
        F21-F28 Function Control
        DDDDDDDD



        notifyDccFunc()
        111
        Configuration Variable Access Instruction (POM: Ops Byte)
        1CCCC
        Short Form
        DDDDDDDD


        processMultiFunctionMessage() processDirectOpsOperation() notifyCV...()
        0CCVV
        Long Form
        VVVVVVVV
        DDDDDDDD



        notifyCV...()
        10000000-10111111 (128-191)
        basic accessory decoder packet format
        (9-bit decoder or board address; CV29/541 b6 is 0)
        10AAAAAA 1AAA CDDD C: activate/deactivate output power
        DDD=000: thrown; DDD=001: closed





        pDccMsg->Data[0] < 192
        notifyDccAcc...()

        10AAAAAA 1AAA CDDD operations mode programming (POM: Ops Accessory Byte) 1110CCVV
        VVVVVVVV DDDDDDDD


        notifyCV...()
        broadcast command for basic accessory decoders
        (9-bit decoder or board address; CV29/541 b6 is 0)
        10111111
        1000 CDDD C: activate/deactivate output power








        extended accessory decoder control packet format (11-bit accessory or output address; CV29/541 b6 is 1) 10AAAAAA
        0AAA0AA1 000 aspect control
        XXXXX XXXXX = 00000: absolute stop aspect;
        XXXXX: other aspects







        10AAAAAA 0AAA0AA1 111 operations mode programming (POM: Ops Accessory Extended Byte) 0CCVV
        VVVVVVVV DDDDDDDD


        notifyCV...()
        broadcast command for extended accessory decoders
        (11-bit accessory or output address; CV29/541 b6 is 1)
        10111111
        00000111 000
        XXXXX







        11101000-11111110 (232-254)
        future use













        11111111 (255)
        idle
        11111111









        notifyDccIdle()

        • basic accessory decoders (9-bit: AAAAAA AAA; CV29/541 b6 is 0):


          byte
          byte
          DCC
          1
          0
          A
          A
          A
          A
          A
          A
          1
          A
          A
          A
          C
          D
          D
          D
          DCC++ / DCCpp <a ADDRESS SUBADDRESS ACTIVATE>


          ADDRESS





          SUBADDRESS
          ACTIVATE
          NmraDcc when Init is called without FLAGS_OUTPUT_ADDRESS_MODE:
          notifyDccAccTurnoutBoard(BoardAddr, OutputPair, Direction, OutputPower)


          BoardAddr (CV1/CV9, CV513/521)




          OutputPower (0: off; 1: on)
          OutputPair
          Direction (0: thrown; 1: closed)
          when Init is called with FLAGS_OUTPUT_ADDRESS_MODE:
          notifyDccAccTurnoutOutput(Addr, Direction, OutputPower)












          OutputPower (0: off; 1: on) 0
          0
          Direction (0: thrown; 1: closed)
          notifyDccAccState(...


          BoardAddr




          State (0b1/0b0)
          OutputAddr
          Decoder_Basic_Monitor_V1












          Output=OutputAddr>>1
          Status (Thrown/Closed)=OutputAddr & 0b1
      • NMRA S 9.2.3: Service Mode (PT)

        20-bits
        1st byte
        2nd byte
        3rd byte
        4th byte

        long preamble

        instruction type
        CV address (-1)


        Direct mode
        11111111111111111111


        0111


        CC AA
        AAAAAAAA
        DDDDDDDD
        EEEEEEEE

        01 Verify byte: The contents of the Configuration Variable as indicated by the 10 bit address are compared with the data byte
        (DDDDDDDD). If the values are identical the Digital Decoder shall respond with an acknowledgment as
        defined in Section D (basic/advanced aknowledgement).

        11 Write byte: The contents of the Configuration Variable as indicated by the 10 bit address are replaced by the data byte
        (DDDDDDDD). Upon completion of all write operations, the Digital Decoder may respond with an
        acknowledgment as defined in Section D (basic/advanced aknowledgement).

        10 Bit manipulation 111 K
        D value of the bit to be verified
        BBB bit position within the CV

        0
        bit verify

        1 write bit
        Address-only mode


        C











        mode
        long preamble
        byte

        byte byte
        byte
        programari

























        NmraDcc
        Direct configuration
        (4 bytes)
        11111111111111111111 0111 CC AAAAAAAAAA







        EEEEEEEE processServiceModeOperation()

        01: Verify byte









        DDDDDDDD

        11: Write byte












        10: Bit manipulation










        111 K D: value of bit to be verified
        BBB: bit position within the CV












        0: bit verify











        1: write bit
        processDirectOpsOperation()
        Address-only
        C 0000 DDDDDDD


        0: Verify register/CV contents
        1: Write register/CV contents


        Physical register
        C RRR DDDDDDDD


        0: Verify register/CV contents
        1: Write register/CV contents
        value
        register
        CVs for accessory decoders
        CVs for mobile decoders
        000 1
        Lower address (CV513)
        Address (CV1)
        001 2
        Undefined
        Start voltage (CV2)
        010 3
        Undefined Acceleration (CV3)
        011 4
        Undefined Deceleration (CV4)
        100 5
        Undefined Basic configuration register (CV29)
        101 6
        Undefined (reserved for page register)
        110 7
        Version number (CV7)
        Version number (CV7)
        111 8
        Manufacturer ID (CV520)
        Manufacturer ID (CV8)


        Paged Addressing
        C RRR DDDDDDDD


        0: Verify register/CV contents
        1: Write register/CV contents
        value
        register

        000 1
        Data register 0
        001 2
        Data register 1
        010 3
        Data register 2
        011 4
        Data register 3
        100 5
        Basic configuration register
        101 6
        Paging register




  • PC interface
  • Modes

  • Decoder Acknowledgement (DCC wiki)
  • Bucles / Loops
  • DCCWiki
  • Locoduino
  • Paco's Official Web Site

Maquinari obert / Open hardware

  • Descodificadors / Decoders
  • Arduino based
    • Info
    • Comandament / Throttle
    • Estació de control / Command station
      • Programari / Software
        • DCC++ (YouTube)
          • Components
          • wiki
          • DCC++ (iGuadix)
          • Locoduino


          • DCC++



            DCCpp_Uno.h
            Uno
            Mega
            Motor Shield
            main
            dir
            DCC_SIGNAL_PIN_MAIN D10
             D12
            D12
            A
            PWM
            SIGNAL_ENABLE_PIN_MAIN
            D3
            D3
            D3
            sense
            CURRENT_MONITOR_PIN_MAIN
            A0
            A0
            A0
            prog
            dir
            DCC_SIGNAL_PIN_PROG D5
            D2
            D13
            B
            PWM
            SIGNAL_ENABLE_PIN_PROG
            D11
            D11
            D11
            sense
            CURRENT_MONITOR_PIN_PROG
            A1
            A1
            A1
          • Serial commands
            • L’interface avec le Contrôleur par liaison série ou ethernet
            • Commands for DCCpp BaseStation
            • group
              SerialCommand.cpp SerialCommand::parse PacketRegister.cpp
              info
              s
              <s> READ STATUS OF DCC++ BASE STATION
              F
              <F> ATTEMPTS TO DETERMINE HOW MUCH FREE SRAM IS AVAILABLE IN ARDUINO
              L
              <L> LISTS BIT CONTENTS OF ALL INTERNAL DCC PACKET REGISTERS
              c <c> READ MAIN OPERATIONS TRACK CURRENT
              D <D> ENTER DIAGNOSTIC MODE (slows down by a 256 factor)
              power on track
              0
              <0> TURN OFF POWER FROM MOTOR SHIELD TO TRACKS
              1
              <1> TURN ON POWER FROM MOTOR SHIELD TO TRACKS
              throttle
              t
              <t REGISTER CAB SPEED DIRECTION> SET ENGINE THROTTLES USING 128-STEP SPEED CONTROL setThrottle()
              function
              f
              <f CAB BYTE1 [BYTE2]> OPERATE ENGINE DECODER FUNCTIONS F0-F28
              BYTE1
              BYTE2
              128
              64
              32
              16
              8
              4
              2
              1
              128
              64
              32
              16
              8
              4
              2
              1
              1
              0
              0
              F0
              F4
              F3
              F2
              F1








              1
              0
              1
              1
              F8
              F7
              F6
              F5








              1
              0
              1
              0
              F12
              F11
              F10
              F9








              1
              1
              0
              1
              1
              1
              1
              0
              F20
              F19
              F18
              F17
              F16
              F15
              F14
              F13
              1
              1
              0
              1
              1
              1
              1
              1
              F28
              F27
              F26
              F25
              F24
              F23
              F22
              F21
              setFunction()
              accessory
              a <a ADDRESS SUBADDRESS ACTIVATE> OPERATE STATIONARY ACCESSORY DECODERS setAccessory()
              T

              <T ID ADDRESS SUBADDRESS>
              create a new turnout ID, with specified address and subaddress

              <T ID>
              delete definition of turnout ID

              <T>
              list all defined turnouts

              <T ID THROW> set turnout ID to either thrown or unthrown position
              sensor
              S ...
              CREATE/EDIT/REMOVE/SHOW A SENSOR
              Q
              <Q> SHOW STATUS OF ALL SENSORS
              output pins
              Z
              <Z ID ACTIVATE> CREATE/EDIT/REMOVE/SHOW & OPERATE AN OUTPUT PIN
              CV POM w
              <w CAB CV VALUE> WRITE CONFIGURATION VARIABLE BYTE TO ENGINE DECODER ON MAIN OPERATIONS TRACK writeCVByteMain()
              b
              <b CAB CV BIT VALUE> WRITE CONFIGURATION VARIABLE BIT TO ENGINE DECODER ON MAIN OPERATIONS TRACK writeCVBitMain()
              CV PT W
              <W CV VALUE CALLBACKNUM CALLBACKSUB>
              WRITE CONFIGURATION VARIABLE BYTE TO ENGINE DECODER ON PROGRAMMING TRACK writeCVByte()
              B
              <B CV BIT VALUE CALLBACKNUM CALLBACKSUB> WRITE CONFIGURATION VARIABLE BIT TO ENGINE DECODER ON PROGRAMMING TRACK writeCVBit()
              R
              <R CV CALLBACKNUM CALLBACKSUB> READ CONFIGURATION VARIABLE BYTE FROM ENGINE DECODER ON PROGRAMMING TRACK readCV()
              eeprom
              E
              <E> STORE SETTINGS IN EEPROM
              e
              <e> CLEAR SETTINGS IN EEPROM
              other
              ' ' < > PRINT CARRIAGE RETURN IN SERIAL MONITOR WINDOW
              dcc packets
              M
              <M REGISTER BYTE1 BYTE2 [BYTE3] [BYTE4] [BYTE5]> WRITE A DCC PACKET TO ONE OF THE REGSITERS DRIVING THE MAIN OPERATIONS TRACK
              P
              <P REGISTER BYTE1 BYTE2 [BYTE3] [BYTE4] [BYTE5]> WRITE A DCC PACKET TO ONE OF THE REGSITERS DRIVING THE MAIN OPERATIONS TRACK
            • Exemples / Examples
              • Turn on track power:
                • <1>
              • Main track (A)
                • POM: write CV value
                  • on locomotive with ID=3
                    • ...
                  • on accessory decoder, with ID=9999, reset (PROGRAM led must be on):
                    • <w 9999 8 8>
                • Locomotive decoder
                  • Run locomotive with ID=3, at speed 100, forward (1):
                    • <t 1 3 100 1>
                  • Turn on lights of locomotive with ID=3:
                    • <f 3 144>
                  • Turn off lights of locomotive with ID=3:
                    • <f 3 128>
                • Accessory decoder (e.g. Digikeijs DR4018)
                  • ...
                  • command
                    monitor (Decoder_Basic_Monitor_V1)
                    <a 0 0 0>
                    AccState - Raw addr: 65533 BoardAddr: 0 OutputAddr: 0 Output: 0 State: 0b1 Status: Thrown
                    <a 0 0 1> AccState - Raw addr: 65533 BoardAddr: 0 OutputAddr: 1 Output: 0 State: 0b1 Status: Closed
                    <a 1 0 0> AccState - Raw addr: 1 BoardAddr: 1 OutputAddr: 0 Output: 0 State: 0b1 Status: Thrown
                    <a 1 1 0> AccState - Raw addr: 2 BoardAddr: 1 OutputAddr: 2 Output: 1 State: 0b1 Status: Thrown
                    <a 2 0 0>
                    AccState - Raw addr: 5 BoardAddr: 2 OutputAddr: 0 Output: 0 State: 0b1 Status: Thrown
                    <a 2 1 0>
                    AccState - Raw addr: 6 BoardAddr: 2 OutputAddr: 2 Output: 1 State: 0b1 Status: Thrown
                    <a 2 2 0>
                    AccState - Raw addr: 7 BoardAddr: 2 OutputAddr: 4 Output: 2 State: 0b1 Status: Thrown
                    <a 2 3 0>
                    AccState - Raw addr: 8 BoardAddr: 2 OutputAddr: 6 Output: 3 State: 0b1 Status: Thrown
              • Programming track (B)
                • PT: read CV8 (manufacturer ID):
                  • <R 8 1 2>
        • Bibliothèque DCCpp
          • Arduino: Uno, Mega, Nano
          • Codi font / Source
          • Instal·lació / Installation
          • Documentació / Documentation


          • DCCpp



            Config.h
            Uno, Nano
            Mega
            Motor Shield
            main
            dir
            DCC_SIGNAL_PIN_MAIN D10
             D12
            D12 (MOTOR_SHIELD_DIRECTION_MOTOR_CHANNEL_PIN_A)
            A
            PWM
            MOTOR_SHIELD_SIGNAL_ENABLE_PIN_MAIN
            D3
            D3
            sense
            MOTOR_SHIELD_CURRENT_MONITOR_PIN_MAIN
            A0
            A0
            prog
            dir
            DCC_SIGNAL_PIN_PROG D5
            D2
            D13 (MOTOR_SHIELD_DIRECTION_MOTOR_CHANNEL_PIN_B)
            B
            PWM
            MOTOR_SHIELD_SIGNAL_ENABLE_PIN_PROG
            D11
            D11
            sense
            MOTOR_SHIELD_CURRENT_MONITOR_PIN_PROG
            A1
            A1
          • Estructura / Structure
            • file
              classe
              fonctions
              DCCpp.h


              DCCpp.cpp DCCpp
              setup
              • begin()
              • beginMain()
                • beginMainMotorShield()
                • beginMainPololu()
              • beginProg()
                • beginProgMotorShield()
                • beginProgPololu()
              • beginEhternet()
              générales
              • loop()
              • panicStop(true/false)
              • powerOn()
              • powerOff()
              • setAccessory()
              voie principale
              • setSpeedMain()
              • setFunctionsMain()
              • readCvMain()
              • writeCvMain()
              • getCurrentMain()
              voie de programmation
              • setSpeedProg()
              • setFunctionsProg()
              • readCvProg()
              • writeCvProg()
              • getCurrentProg()
              Turnout.cpp
              Turnout


              Sensor.cpp
              Sensor


              Outputs.cpp
              Outputs


              EEStore.cpp
              EEStore


          • Ús / Usage
            • Fitxer -> Exemples
              • DCCpp / SerialDcc
                • Basic example with serial commands
                • To be used with an Arduino Motor Shield:
                  • //DCCpp::beginMain(UNDEFINED_PIN, DCC_SIGNAL_PIN_MAIN, 11, A0);
                    DCCpp::beginMainMotorShield();
                    DCCpp::beginProgMotorShield();
                • Exemples / Examples
              • DCCpp / MiniDcc
              • DCCpp / MaxiDcc
                • ~/Arduino/libraries/DCCpp/src/DCCpp.h
                  • #define USE_TURNOUT
                    #define USE_EEPROM
                    #define USE_OUTPUT
                    #define USE_SENSOR
    • Descodificador / Decoder
      • Info
      • Maquinari / Hardware
      • Programari / Software
        • DCC_Decoder (MynaBay)
        • NmraDcc (MRRwA) (Alex Shepherd / Geoff Bunza for SMA)
          • DCC interface

          • motor
            step
            servo
            LED
            turnout
            audio
            functions
            mobile/function decoder
            stationary accessory decoder
            Examples







            setup()
            • Dcc.init( MAN_ID_DIY, 10, FLAGS_MY_ADDRESS_ONLY, 0 );
            setup()
            • Dcc.init( MAN_ID_DIY, 10, CV29_ACCESSORY_DECODER | CV29_OUTPUT_ADDRESS_MODE, 0 );







            NmraDccMultiFunctionDecoder_1
            • notifyCVResetFactoryDefault
            • notifyDccMsg
            • notifyCVAck
            • notifyDccFunc
            NmraDccAccessoryDecoder_1 (responds to normal DCC Turnout Control packets and the newer DCC Signal Aspect packets)
            • notifyCVResetFactoryDefault
            • notifyDccMsg
            • notifyCVAck
            • notifyDccAccTurnoutBoard (Board Addressing Mode)
            • notifyDccAccTurnoutOutput (Output Addressing Mode)
            • notifyDccSigOutputState (DCC Signal Aspect Packet)




            8



            NmraDccAccessoryDecoder_Pulsed_8 (control of 8 pulsed turnouts)
            • #define ACTIVE_OUTPUT_STATE LOW
              #define CV_ACCESSORY_DECODER_ACTIVE_STATE      4
              ...
              {CV_ACCESSORY_DECODER_ACTIVE_STATE,    ACTIVE_OUTPUT_STATE}
              ...
              uint8_t  activeOutputState = Dcc.getCV(CV_ACCESSORY_DECODER_ACTIVE_STATE);
            • notifyCVResetFactoryDefault
            • notifyDccMsg
            • notifyCVAck
            • notifyCVChange
            • notifyDccAccTurnoutOutput
            • initPinPulser








            NmraDcc_ARD_DCCSHIELD (Iowa Scaled Engineering ARD-DCCSHIELD; allow CV read/write)
            • notifyCVResetFactoryDefault
            • notifyDccMsg
            • notifyCVAck
            • notifyCVChange








            DCCInterface_TurntableControl








            dcc-fpm/decoder/AccessoryDecoder_1








            dcc-fpm/nmradcc-fpm/NmraDcc_Monitor
            SMA Examples
            (SMA)
















            setup()
            • Dcc.init( MAN_ID_DIY, 601, FLAGS_MY_ADDRESS_ONLY, 0 );
            loop()
            • Dcc.process()
            notifyDccFunc()
            exec_function()
            setup()
            • #define CV_To_Store_SET_CV_Address    121
            • Dcc.init( MAN_ID_DIY, 601, FLAGS_OUTPUT_ADDRESS_MODE | FLAGS_DCC_ACCESSORY_DECODER, CV_To_Store_SET_CV_Address);
            loop()
            • Dcc.process()
            notifyDccAccTurnoutOutput()
            exec_function()



            0
            17


            1 (on/off)
            Dec_17LED_1Ftn
            AccDec_17LED_1Ftn
            • #define SET_CV_Address       24           // THIS ADDRESS IS FOR SETTING CV'S Like a Loco
              #define CV_To_Store_SET_CV_Address    121 Dcc.init( MAN_ID_DIY, 601, FLAGS_OUTPUT_ADDRESS_MODE | FLAGS_DCC_ACCESSORY_DECODER, CV_To_Store_SET_CV_Address);


            0
            17


            6 (LED on/off, LED blink, servo control, dual LED blink, pulsed output, LED fade on)
            Dec_17LED_6Ftn
            AccDec_17LED_6Ftn


            0
            17



            Dec_Dir_and_Fade








            Dec_SMA12_LED_Groups



            7
            10


            6
            Dec_7Serv_10LED_6Ftn
            AccDec_7Servos_10LED_6Ftn


            10
            7


            6
            Dec_10Serv_7LED_6Ftn
            AccDec_10Servos_7LED_6Ftn
            AccDec_7ServoBackandForth6Ftn


            13
            4


            6
            Dec_13Serv_4LED_6Ftn
            AccDec_13Servos_4LED_6Ftn


            15
            2


            6
            Dec_15Serv_2LED_6Ftn
            AccDec_15Servos_2LED_6Ftn
            2






            Dec_2MotDrive_12LED_1Srv_6Ftn

            2


            10

            x

            Dec_2Mot_10LED_Audio_6Ftn


            1





            Dec_Stepper_8Ftn

          • NmraDcc.h

            • common
              multi-function decoder
              accessory decoder
              #define (CV index)
              • CV_VERSION_ID 7
              • CV_MANUFACTURER_ID 8
              • CV_29_CONFIG 29
              • CV_29_BITS {
                • CV29_LOCO_DIR = 0b00000001 (b0)
                • CV29_F0_LOCATION = 0b00000010 (b1)
                • CV29_APS = 0b00000100 (b2)
                • CV29_ADV_ACK = 0b00001000 (b3)
                • CV29_SPEED_TABLE_ENABLE = 0b00010000 (b4)
                • CV29_EXT_ADDRESSING = 0b00100000 (b5)
                • CV29_OUTPUT_ADDRESS_MODE = 0b01000000 (b6)
                • CV29_ACCESSORY_DECODER = 0b10000000 (b7)
              • CV_MULTIFUNCTION_PRIMARY_ADDRESS 1
              • CV_MULTIFUNCTION_EXTENDED_ADDRESS_MSB 17
              • CV_MULTIFUNCTION_EXTENDED_ADDRESS_LSB 18
              • CV_ACCESSORY_DECODER_ADDRESS_LSB 1 (equivalent to CV513?)
              • CV_ACCESSORY_DECODER_ADDRESS_MSB 9 (equivalent to CV521?)
              #define (values)
              • ManufacturerId (used for CV8):
                • MAN_ID_JMRI 0x12 (18: JMRI)
                • MAN_ID_DIY 0x0D (13: Public-domain and DIY)
                • MAN_ID_SILICON_RAILWAY 0x21
              • Flag values to be logically ORed together and passed into the init() method:
                • FLAGS_MY_ADDRESS_ONLY 0x01
                • FLAGS_AUTO_FACTORY_DEFAULT 0x02
                • FLAGS_SETCV_CALLED 0x10
                • FLAGS_OUTPUT_ADDRESS_MODE 0x40 (CV 29/541 b6)
                  • Accessory decoders normally have 4 paired outputs and a single address refers to all 4 outputs.
                    Setting FLAGS_OUTPUT_ADDRESS_MODE causes each address to refer to a single output.
                • FLAGS_DCC_ACCESSORY_DECODER 0x80 (CV29/541 b7)
                • FLAGS_CV29_BITS (FLAGS_OUTPUT_ADDRESS_MODE | FLAGS_DCC_ACCESSORY_DECODER)
              • DCC_SPEED_STEPS {
                • SPEED_STEP_14 = 15
                • SPEED_STEP_28 = 29
                • SPEED_STEP_128 = 127
              • DCC_DIRECTION {
                • DCC_DIR_REV = 0
                • DCC_DIR_FWD = 1
              • DCC_ADDR_TYPE {
                • DCC_ADDR_SHORT
                • DCC_ADDR_LONG
              • FN_GROUP {
                • FN_0_4 = 1
                • FN_5_8
                • FN_9_12
                • FN_13_20
                • FN_21_28

              functions
              (to be called)
              • # pin to receice DCC packets
                void pin( uint8_t ExtIntNum, uint8_t ExtIntPinNum, uint8_t EnablePullup);
              • #pin to receive DCC packets
                void pin( uint8_t ExtIntPinNum, uint8_t EnablePullup);
              • void init( uint8_t ManufacturerId, uint8_t VersionId, uint8_t Flags, uint8_t OpsModeAddressBaseCV );
              • uint8_t process();
              • uint8_t getCV( uint16_t CV );
              • uint8_t setCV( uint16_t CV, uint8_t Value);
              • # returns 1 if EEPROM is ready to write
                uint8_t isSetCVReady( void );
              • # return the currently active decoder address
                uint16_t getAddr(void);
              • ...

              callback functions
              (to be implemented)
              • extern void notifyDccReset(uint8_t hardReset );
              • extern void notifyDccIdle(void);
              • extern void notifyDccMsg( DCC_MSG * Msg );
              • # Callback to determine if a given CV is valid
                extern uint8_t notifyCVValid( uint16_t CV, uint8_t Writable );
              • # Callback to read a CV
                extern uint8_t notifyCVRead( uint16_t CV);
              • # if you implement this function, you must explicitly manage EEPROM writing
                extern uint8_t notifyCVWrite( uint16_t CV, uint8_t Value);
              • extern uint8_t notifyIsSetCVReady(void);
              • extern void notifyCVChange( uint16_t CV, uint8_t Value);
                • called when setting a CV value in PT
              • extern void notifyDccCVChange( uint16_t CV, uint8_t Value);
              • extern void notifyCVResetFactoryDefault(void);
              • extern void notifyCVAck(void); (DCC ACK)
              • extern void notifyServiceMode(bool);
              • extern void notifyDccSpeed( uint16_t Addr, DCC_ADDR_TYPE AddrType, uint8_t Speed, DCC_DIRECTION Dir, DCC_SPEED_STEPS SpeedSteps );
              • extern void notifyDccSpeedRaw( uint16_t Addr, DCC_ADDR_TYPE AddrType, uint8_t Raw);
              • extern void notifyDccFunc( uint16_t Addr, DCC_ADDR_TYPE AddrType, FN_GROUP FuncGrp, uint8_t FuncState);
              • # Board oriented callback for a turnout accessory decoder
                extern void notifyDccAccTurnoutBoard( uint16_t BoardAddr, uint8_t OutputPair, uint8_t Direction, uint8_t OutputPower );
                • Most useful when CV29_OUTPUT_ADDRESS_MODE is not set.
                • Decoders of this type have 4 paired turnout outputs per board.
              • # Output oriented callback for a turnout accessory decoder
                extern void notifyDccAccTurnoutOutput( uint16_t Addr, uint8_t Direction, uint8_t OutputPower);
              • extern void notifyDccAccBoardAddrSet( uint16_t BoardAddr);
              • extern void notifyDccAccOutputAddrSet( uint16_t Addr);
              • # Callback for a signal aspect accessory decoder
                extern void notifyDccSigOutputState( uint16_t Addr, uint8_t State);
              • deprecated:
                • extern void notifyDccAccState( uint16_t Addr, uint16_t BoardAddr, uint8_t OutputAddr, uint8_t State );
                • extern void notifyDccSigState( uint16_t Addr, uint8_t OutputIndex, uint8_t State);
              o
          • NmraDcc.cpp
            • #define DEBUG_PRINT
          • Snippets
            • monitor DCC messages
              • void printBits(byte myByte){
                  for(byte mask = 0x80; mask; mask >>= 1){
                    if(mask  & myByte)
                      Serial.print('1');
                    else
                      Serial.print('0');
                  }
                }

                #ifdef  NOTIFY_DCC_MSG
                extern void notifyDccMsg( DCC_MSG * Msg ) {
                  int i;
                  if( ( Msg->Data[0] == 0 ) && ( Msg->Data[1] == 0 ) ) return;  //reset packet
                  if( ( Msg->Data[0] == 0b11111111 ) && ( Msg->Data[1] == 0 ) ) return;  //idle packet
                 
                  if(Msg->Data[0] == 100 && Msg->Data[1] == 63) return;
                 
                  Serial.print("[notifyDccMsg] ");
                  Serial.print(Msg->Size);
                  Serial.print(" ");
                  for(i=0;i<Msg->Size;i++){
                    //Serial.print(Msg->Data[i], BIN);
                    printBits(Msg->Data[i]);
                    Serial.print(" ");
                  }
                 
                  Serial.println();
                }
                #endif
            • CV factory reset
              • const uint16_t ACC_ADDR = 1000; // 11 bit address:
                                                // 0 - broadcast, 1 to 2044 - specific.
                const byte ACC_ADDR_LSB = ACC_ADDR & 0xff;
                const byte ACC_ADDR_MSB = ACC_ADDR >> 8;

                struct CVPair
                {
                  uint16_t  CV;
                  uint8_t   Value;
                };

                CVPair FactoryDefaultCVs [] =
                {
                  {CV_ACCESSORY_DECODER_ADDRESS_LSB, ACC_ADDR_LSB},     // Accessory address LSB.
                  {CV_ACCESSORY_DECODER_ADDRESS_MSB, ACC_ADDR_MSB},     // Accessory address MSB.
                };

                uint8_t FactoryDefaultCVIndex = 0;

                void notifyCVResetFactoryDefault()
                {
                  // mark reset to factory defaults is needed, to be called from loop
                  // Make FactoryDefaultCVIndex non-zero and equal to num CV's to be reset
                  // to flag to the loop() function that a reset to Factory Defaults needs to be done
                  Serial.println(F("notifyCVResetFactoryDefault called."));
                  FactoryDefaultCVIndex = sizeof(FactoryDefaultCVs)/sizeof(CVPair);
                };

                void setup() { 
                  // mark factory defaults is needed
                  // TODO: protect from being called when decoder is restarted?
                  notifyCVResetFactoryDefault();
                }

                void loop() {

                  // reset to factory defaults
                  if( FactoryDefaultCVIndex && Dcc.isSetCVReady())
                  {
                    Serial.print("FactoryDefaultCVIndex: ");
                    Serial.println(FactoryDefaultCVIndex);
                    FactoryDefaultCVIndex--; // Decrement first as initially it is the size of the array
                    Dcc.setCV(  FactoryDefaultCVs[FactoryDefaultCVIndex].CV,
                                FactoryDefaultCVs[FactoryDefaultCVIndex].Value);
                  }
                }
            • define operation mode address (like a loco)
              • #define OPS_MODE_ADDRESS       9999    // this address is for setting cv's like a loco
                #define OPS_MODE_ADDRESS_BASE_CV   17  // CV where to store the ops mode address

                CVPair FactoryDefaultCVs [] =
                {
                  ...
                  {OPS_MODE_ADDRESS_BASE_CV, OPS_MODE_ADDRESS & 0xFF },        // LSB Ops Mode Address
                  {OPS_MODE_ADDRESS_BASE_CV+1,(OPS_MODE_ADDRESS >>8) & 0x3F }, // MSB Ops Mode Address
                };

                void setup()
                {
                  ...
                  Dcc.init( MAN_ID_DIY, 601, FLAGS_OUTPUT_ADDRESS_MODE | FLAGS_DCC_ACCESSORY_DECODER, OPS_MODE_ADDRESS_BASE_CV);
                }
            • CV read
              • ...
            • CV write
              • POM
                • ...
              • PT
          • Function hierarchy

            • callback functions (to be implemented)
              functions (to be called)
              DCC packet
              CCC
              internal function


              pin





              pin
              common functions

              init





              init


              process





              process


              getCV

              readCV






              setCV

              writeCV





              isSetCVReady
              isSetCVReady





              ...






              common callbacks
              notifyDccReset



              processMultiFunctionMessage execDccProcessor process

              notifyDccIdle




              -
              execDccProcessor process

              notifyDccMsg

              -
              -
              -
              -
              process

              notifyCVValid


              validCV processDirectOpsOperation processServiceModeOperation execDccProcessor process

              notifyCVValid

              validCV -
              processServiceModeOperation execDccProcessor process

              notifyCVRead


              readCV
              processDirectOpsOperation processServiceModeOperation execDccProcessor process

              notifyCVRead

              readCV -
              processServiceModeOperation execDccProcessor process

              notifyCVWrite


              writeCV
              processDirectOpsOperation processServiceModeOperation execDccProcessor process

              notifyCVWrite

              writeCV -
              processServiceModeOperation execDccProcessor process

              notifyCVWrite

              writeCV -
              -
              execDccProcessor process

              notifyCVWrite

              writeCV -
              -
              -
              init

              notifyIsSetCVReady


              isSetCVReady
              ?




              notifyCVChange


              writeCV ...



              notifyDccCVChange

              writeCV ...



              notifyCVResetFactoryDefault

              -
              -
              -
              -
              init

              notifyCVResetFactoryDefault

              validCV ...




              notifyCVAck

              ackCV
              processDirectOpsOperation processServiceModeOperation execDccProcessor process

              notifyServiceMode

              resetServiceModeTimer
              clearDccProcState
              -
              execDccProcessor process

              notifyServiceMode

              -
              -
              -
              -
              init

              notifyServiceMode

              -
              -
              -
              execDccProcessor process
              multi-function decoder callbacks
              notifyDccSpeed

              010
              011


              processMultiFunctionMessage execDccProcessor process

              notifyDccSpeedRaw
              010
              011


              processMultiFunctionMessage execDccProcessor process

              notifyDccFunc

              100
              101
              110


              processMultiFunctionMessage execDccProcessor process
              accessory decoder callbacks
              notifyDccAccTurnoutBoard



              -
              execDccProcessor

              notifyDccAccTurnoutOutput



              -
              execDccProcessor

              notifyDccAccBoardAddrSet



              -
              execDccProcessor

              notifyDccAccOutputAddrSet



              -
              execDccProcessor

              notifyDccSigOutputState



              -
              execDccProcessor

              notifyDccAccState







              notifyDccSigState






              accessory decoder functions
              initAccessoryDecoder







              setAccDecDCCAddrNextReceived






  • CTMS (Control de trenes modelo por software)
  • MERG (Model Elelctronic Railway Group)
    • Electronics for model railways
      • Part A (pdf)
        • 1 – Basic electronics
        • 2 – Loco controllers
        • 3 – Layout wiring
        • 4 – Track wiring
        • 5 – Voltage problems
        • 6 – Point wiring
        • 7 - Point motors & servos
        • 8 – Scenic lighting
        • 9 – Coach lighting
        • 10 - Adding sound
        • 11 - Track occupancy detectors
        • 12 – R F I D
        • 13 – Digital Command Control
        • 14 – CBUS
      • Part B (pdf)
        • 15 – Transistors, ICs & PICs
        • 16 - Interfacing techniques
        • 17 – Computers & model railways
        • 18 – Assembling a tool kit
        • 19 – Soldering
        • 20 – Using test equipment
        • 21 - Pocket Money Projects
        • 22 – Abbreviations & Acronyms
        • Appendix - M E R G
    • MERG DCC System
  • OpenDCC
  • Paco Cañada
    • ...

Comandament / Throttle

Estació de control / Command station

  • Command stations (Rocrail)
  • Roco / Fleischmann Z21

    connector
    ús / usage
    z21
    (white) (10825)
    Z21
    (black) (10820)
    RailCom
    dispositius / devices
    posterior / back
    Main track Track out / blue led
    Main track x
    Prog Track
    • decoder program (PT)
    • decoder (Zimo) firmware update (z21m)
    Track out / green led
    Prog track -
    Sniff BUS
    estació de control antiga / legacy command station
    -
    x

    B-BUS booster x
    x
    -
    • Booster
    • Booster adapter
      • Roco 10789
    • Braking generator:
      • Roco 10779 + 10777 (signal module)
    L-BUS
    LocoNet -
    x


    R-BUS
    x
    x

    LAN
    cap al commutador de xarxa / to network switch
    x
    x


    CAN
    CAN bus
    -
    x

    • Zimo MX32
    X-BUS XpressNet -
    x

    • multiMAUS
    • Lokmaus2
    • Lokmaus3
    • ...
    frontal
    X-BUS XpressNet x
    x

    X-BUS XpressNet x
    x

    • Maquinari / Hardware
    • Downloads: manuals
      • All connections z21 (white) (pdf)
      • All connections Z21 (black) (pdf)
      • Z21 LAN Protocol specification (en) / Z21 LAN Protokoll Spezifikation (de) (pdf)
        • UDP port 21105 (control application on the client), 21206
        • DataLen
          (2 bytes, little endian)
          Header (2 bytes, little endian)
          Request Data (n bytes) (client -> Z21)
          Response Data (Z21 -> client)




          X-Header
          DB0
          DB1
          DB2
          DB3 XOR



          lenz/XNetBundle.properties
          roco/z21/z21Bundle.properties
          lenz/XNetMessage.java (toMonitorString)
          lenz/XNetConstants.java
          roco/z21/Z21Constants.java
          roco/z21/Z21Message.java





          0xLL 0x00
          2. System, status, versions 0x10 0x00 LAN_GET_SERIAL_NUMBER
          -
          serial
          -
          serial
          -
          serial
          -
          serial

          -
          0x18 0x00 LAN_GET_CODE -
          code (8-bit)
          (no_lock, start_locked, start_unlocked)





          0x1A 0x00
          LAN_GET_HWINFO -
          HwType (32-bit)
          FW Version (32-bit)

          -
          HwType (32-bit)
          FW Version (32-bit)
          -
          HwType (32-bit)
          FW Version (32-bit)
          -
          HwType (32-bit)
          FW Version (32-bit)


          0x30 0x00 LAN_LOGOFF






          0x40 0x00
          LAN_X_GET_VERSION
          0x21
          0x63
          0x21
          0x21
          -
          0xvv
          -
          0x12 (=Z21)

          0x00
          XOR
          LAN_X_GET_STATUS 0x21
          LAN_X_STATUS_CHANGE
          0x24



          0x05
          LAN_X_SET_TRACK_POWER_OFF 0x21
          LAN_X_BC_TRACK_POWER_OFF
          0x80



          0xa1
          LAN_X_SET_TRACK_POWER_ON 0x21
          LAN_X_BC_TRACK_POWER_ON
          0x81



          0xa0
          LAN_X_BC_TRACK_POWER_OFF 0x61 (CS_INFO)
          0x00 (BC_EVERYTHING_OFF)



          0x61
          LAN_X_BC_TRACK_POWER_ON 0x61 (CS_INFO) 0x01 (BC_NORMAL_OPERATIONS)



          0x60
          LAN_X_BC_PROGRAMMING_MODE 0x61 (CS_INFO) 0x02 (BC_SERVICE_MODE_ENTRY)



          0x63
          LAN_X_BC_TRACK_SHORT_CIRCUIT 0x61 (CS_INFO) 0x08



          0x69
          LAN_X_UNKNOWN_COMMAND 0x61 (CS_INFO) 0x82



          E3
          LAN_X_STATUS_CHANGED 0x62 (CS_REQUEST_RESPONSE)
          0x22
          Status

          XOR
          LAN_X_SET_STOP 0x80
          LAN_X_BC_STOPPED




          0x80
          LAN_X_BC_STOPPED 0x81
          0x00



          0x81
          LAN_X_GET_FIRMWARE_VERSION 0xF1
          0xF3
          0x0A
          0x0A
          -
          V_MSB
          -
          V_LSB

          0xFB
          XOR
          4. Conducció / Driving / Fahren LAN_X_GET_LOCO_INFO
          0xE3





          LAN_X_SET_LOCO_DRIVE 0xE4
          0x1S




          LAN_X_SET_LOCO_FUNCTION
          0xE4 0xF8




          LAN_X_LOCO_INFO
          0xEF





          5. Desviaments / Switching / Schalten LAN_X_GET_TURNOUT_INFO
          0x43
          FAdr_MSB FAdr_LSB

          XOR
          LAN_X_SET_TURNOUT
          0x53
          FAdr_MSB
          FAdr_LSB
          10Q0A00P


          LAN_X_TURNOUT_INFO
          0x43
          FAdr_MSB FAdr_LSB 000000ZZ

          XOR
          6. Lectura i escriptura de CV del descodificador /
          Reading and writing Decoder CVs /
          Decoder CV Lesen und Schreiben
          LAN_X_CV_READ
          0x23
          LAN_X_BC_PROGRAMMING_MODE
          [LAN_X_CV_NACK_SC, LAN_X_CV_NACK, LAN_X_CV_RESULT]
          0x11
          CVAdr_MSB
          CVAdr_LSB

          XOR
          LAN_X_CV_WRITE
          0x24
          0x12




          LAN_X_CV_NACK_SC
          0x61
          0x12



          0x73
          LAN_X_CV_NACK
          0x61
          0x13



          0x72
          LAN_X_CV_RESULT
          0x64
          0x14
          CVAdr_MSB
          CVAdr_LSB
          value XOR
          LAN_X_CV_POM_WRITE_BYTE
          0xE6





          LAN_X_CV_POM_WRITE_BIT
          0xE6





          LAN_X_CV_POM_READ_BYTE
          0xE6
          0x30




          LAN_X_CV_POM_ACCESSORY_WRITE_BYTE
          0xE6 0x31



          LAN_X_CV_POM_ACCESSORY_WRITE_BIT
          0xE6 0x31



          LAN_X_CV_POM_ ACCESSORY_READ_BYTE
          0xE6 0x31



          LAN_X_MM_WRITE_BYTE
          0x24
          0xFF




          LAN_X_DCC_READ_REGISTER
          0x22
          0x11




          LAN_X_DCC_WRITE_REGISTER
          0x23
          0x12




          2. System, status, versions 0x50 0x00
          LAN_SET_BROADCASTFLAGS flags flags
          flags
          flags


          0x51 0x00
          LAN_GET_BROADCASTFLAGS
          -
          flags
          -
          flags
          -
          flags
          -
          flags


          3. Ajustos / Settings / Einstellungen 0x60 0x00
          LAN_GET_LOCOMODE
          16-bit loco address (big endian)
          16-bit loco address (big endian)
          16-bit loco address (big endian)
          16-bit loco address (big endian)
          -
          mode (8-bit) (DCC, MM)



          0x61 0x00
          LAN_SET_LOCOMODE 16-bit loco address (big endian) 16-bit loco address (big endian) mode (8-bit) (DCC, MM)


          0x70 0x00
          LAN_GET_TURNOUTMODE
          16-bit accessory decoder address (big endian)
          16-bit accessory decoder address (big endian)
          16-bit accessory decoder address (big endian)
          16-bit accessory decoder address (big endian)
          -
          mode (8-bit) (DCC, MM)



          0x71 0x00
          LAN_SET_TURNOUTMODE
          16-bit accessory decoder address (big endian) 16-bit accessory decoder address (big endian) mode (8-bit) (DCC, MM)


          7. Feedback - R-BUS / Rückmelder – R-BUS 0x80 0x00
          LAN_RMBUS_DATACHANGED






          0x81 0x00
          LAN_RMBUS_GETDATA






          0x82 0x00
          LAN_RMBUS_PROGRAMMODULE






          2. System, status, versionen 0x84 0x00
          LAN_SYSTEMSTATE_DATACHANGED
          state (current, temp, vcc...)
          state (current, temp, vcc...)



          0x85 0x00
          LAN_SYSTEMSTATE_GETDATA
          -
          LAN_SYSTEMSTATE_DATACHANGED





          8. RailCom
          0x88 0x00
          LAN_RAILCOM_DATACHANGED






          0x89 0x00
          LAN_RAILCOM_GETDATA






          9. LocoNet
          (the Z21 can be used as an Ethernet/LocoNet gateway)

          0xA0 0x00
          LAN_LOCONET_Z21_RX OPC: 0xBA
          ARG1: 0X00
          ARG2: 0X00
          CKSUM


          0xA1 0x00 LAN_LOCONET_Z21_TX






          0xA2 0x00 LAN_LOCONET_FROM_LAN






          0xA3 0x00
          LAN_LOCONET_DISPATCH_ADDR






          0xA4 0x00
          LAN_LOCONET_DETECTOR






          X-BUS tunnel
          LocoNet tunnel
          • LAN_X_SET_TURNOUT (0x53)
            • 53 MM LL DB2 XOR
            • DB2:
              10Q0A00P
              0
              1
              Q
              Execute command immediately
              from Z21 FW V1.24: Insert turnout command in Z21 in the queue and for spend the next possible time on the track.
              A
              Disable switch output
              Enable switch output
              P
              Select output 1 of the turnout
              Select output 2 of the turnout
            • Exemples / Examples:


              • 10Q0A00P hex
                closed activate output  1 10001000 0x88
                deactivate output 1 10000000 0x80
                thrown activate output 2 10001001 0x89
                deaactivate output 2 10000001 0x81
          • LAN_X_TURNOUT_INFO (0x43)
            • 43 MM LL DB2 XOR
            • DB2 ZZ
              000000ZZ 00 turnout not switched yet
              01 turnout is in position according to switching command P=0 (output 1 of the turnout; usually closed/recte)
              10 turnout is in position according to switching command P=1 (output 2 of the turnout; usually thrown/desviat)
              11 invalid combination
          • Exemples / Examples:
            • action command XpressNet packet
              Turnout #5, switch output 1 (usually recte/closed)
              1. -> LAN_X_SET_TURNOUT 4,0x88 (activate output 1)
              2. <- LAN_X_TURNOUT_INFO 4,0x01 (turnout in position P=0)
              3. -> LAN_X_SET_TURNOUT 4,0x80 (deactivate output 1)
              1. -> 53 00 04 88 xx
              2. <- 43 00 04 01 xx
              3. -> 53 00 04 80 xx
              Turnout #5, switch output 2 (usually desviat/thrown)
              1. -> LAN_X_SET_TURNOUT 4,0x89 (activate output 2)
              2. <- LAN_X_TURNOUT_INFO 4,0x02 (turnout in position P=1)
              3. -> LAN_X_SET_TURNOUT 4,0x81 (deactivate output 2)
              1. -> 53 00 04 89 xx
              2. <- 43 00 04 02 xx
              3. -> 53 00 04 81 xx
    • Downloads: Software and tools
      • Z21 (Android)
      • Z21 Mobile (vell/old) (Android)
      • Z21 Updater (Android)
        • Firmware update
      • z21 maintenance (MS Windows)
        • Manual
        • Linux (using wine 32 bit)
          • WINEPREFIX=~/.win_32 WINEARCH=win32 wine Z21_Maintenance.exe
        • usage
          • Tab Section JMRI alternative other
            Options / WLANmaus update


            Options / Loco Controller


            Status Connection
            • IP address


            Versions
            • Serial number
            • Firmware version
            • Hardware type
            • Hardware version


            System
            • Supply voltage
            • Internal voltage
            • Main track current
            • Prog-track current
            • Temperature


            Settings Common Settings
            • Main track voltage
            • Z21-stop-key
            • Track signal type
            • Short DCC loco-address
            • Short circuit Main track
            • Short circuit B-BUS
            • activate RailCom, CV29 automatica address, supervise accessory dcoder outputs,
              DCC turnout-addressing according RCN-213, DCC turnout invert straight/branch,
              DCC read 28 instead of 14 speed steps on Sniffer BUS, Track signal on start of Z21 at STOP position


            Programming Settings
            • Programming voltage
            • Read-mode
            • Bit-verify with 1
            • Reset packets (start)
            • Programming packets
            • Reset packets (cont)
            • ACK threshold


            IP Settings IP-Settings
            • IP-Adress
            • Subnet-Mask
            • Standard Gateway


            R-BUS R-Bus Mode
            • Feedback bus / XpressNet


            R-BUS Status (Roco 10787, 10808,10819)

            R-BUS Programming (Roco 10787, 10808,10819)
            • Module address

            RocRail z21
            multiMAUS Update firmware

            Firmware update Update to Z21 firmware

            CV Programming CV Programming Decoder Pro

            CV-Set Programming

      • Rocrail
    • Programació de descodificadors / Decoder programming

      • PT (Program Track)
        POM (Program on Main)
        via / track
        tram de via aïllat / isolated track section
        tot el circuit / all circuit
        adreça / address
        no cal especificar la loco address / no need to sepecify loco address
        cal especificar la loco address / loco address must be specified
        nombre de dispositius / number of devices
        només un alhora / only one at once
        diversos / several
        lectura / read
        pot llegir valors de CV / can read CV values
        pot llegir valors de CV si RailCom està activat / can read CV values only if RailCom is enabled:
        CV28=3, CV29b3=1
        z21 (white)
        Track out (green led)
        Track out (blue led)
        Z21 (black)
        Prog Track
        Main Track
        mobile decoder
        Decoder update (Zimo)
        -
        static decoder (DR4018)
        cal una resistència (1-C) i el led PROGRAM encès / a resistor is needed (1-C) and LED PROGRAM on
        no cal cap resistència / no resistor needed
      • Eines / Tools

        • Rocrail
          Z21 Mobile

          Programming tab
          Programming -> RocPro

          mobile (locomotives)
          x
          nmra-rp922.xml
          x
          stationary (accessories)
          (e.g. DR4018)
          -
          dr4018.xml
          POM: e.g. address=9999

Booster

Descodificador / Decoder

  • Decoder
  • Decoder programming with Roco z21
  • Tipus / Type
    • Mobile (locomotives)
    • Stationary (accessories)
      • Accessory addressing:
        FADA
        address
        1

        2
        3

        4
        5

        6
        7

        8
        9

        10
        11

        12
        13

        14
        15

        16
        PADA
        address
        0
        port
        port 1
        port 2
        port 3
        port 4
        port 5
        port 6
        port 7
        port 8
        MADA
        address
        addr 1 addr 2
        port
        port 1
        port 2
        port 3
        port 4
        port 1 port 2 port 3 port 4
        gate
        0

        1
        0

        1
        0

        1
        0

        1
        0

        1
        0

        1
        0

        1
        0

        1
        NMRA
        module
        module 1
        module 2
        port
        port 0
        port 1
        port 2
        port 3
        port 0 port 1 port 2 port 3
        gate
        0

        1
        0

        1
        0

        1
        0

        1
        0

        1
        0

        1
        0

        1
        0

        1
        Z21 Mobile

        #1
        #2
        #3
        #4
        #5
        #6
        #7
        #8

        1

        0
        1

        0
        1

        0
        1

        0
        1

        0
        1

        0
        1

        0
        1

        0
        Rocrail
        (with Z21)
        address
        1
        2
        3
        4
        5
        6
        7
        8
        port

        gate (inverted)
        r

        g
        r

        g
        r

        g
        r

        g
        r

        g
        r

        g
        r

        g
        r

        g
        gate (not inverted)
        g

        r
        g

        r
        g

        r
        g

        r
        g

        r
        g

        r
        g

        r
        g

        r
      • Digikejs DR4018
        • Outputs:
          output
          1
          C
          2
          3
          C
          4
          5
          C
          6
          7
          C
          8
          9
          C
          10
          11
          C
          12
          13
          C
          14
          15
          C
          16

          OUT1
          OUT2
          OUT3
          OUT4
          OUT5
          OUT6
          OUT7
          OUT
  • Funcions / Functions:
    • Valors per defecte / Default  values

      • Decoder
        RN204616-7 (Railion)
        Le lait (CFF/SBB)

        Fleischmann 685303
        Fleischmann 721181
        Fleischmann 731376
        F0
        Lights
        Lights
        Lights

        F1
        aux 1

        Sound on

        F2
        aux 2

        Loco whistle (open line)

        F3
        aux 3

        Acoustic signal

        F4
        aux 4

        Interior light

        F5
        Acceleration zero
        Inertia
        Departure signal

        F6
        Half speed
        Shunting gear (half speed)
        Inertia on/off

        F7


        Compressor

        F8


        Loudspeaker message

        F9


        Shunting gear

        F10


        Mute

        F11


        Lights

        F12


        Lights

        F13


        Door

        F14


        Loudspeaker message
        Locarno
        F15


        Loudspeaker message Bellinzona
        F16


        Coupling

        F17


        Step

        F18


        Heating

        F19


        Fan

    • Locomotives decoder function setup (NMRA RP 9.2.2: assigment of internal to external function)
      • Fleischmann 685303
        key
        CV
        light fwd
        light back
        aux1
        aux2
        aux3
        aux4
        acceleration
        zero
        half speed
        F0v
        33
        1
        2
        4
        8
        16
        32
        64
        128
        F0r
        34
        1
        2
        4
        8
        16
        32
        64
        128
        F1
        35
        1
        2
        4
        8
        16
        32
        64
        128
        F2
        36
        1
        2
        4
        8
        16
        32
        64
        128
        F3
        37
        1
        2
        4
        8
        16
        32
        64
        128
        F4
        38



        1
        2
        4
        8
        16
        F5
        39



        1
        2
        4
        8
        16
        F6
        40



        1
        2
        4
        8
        16
        F7
        41



        1
        2
        4
        8
        16
        F8
        42



        1
        2
        4
        8
        16
        F9
        43





        1
        2
        4
        F10
        44





        1
        2
        4
        F11
        45





        1
        2
        4
        F12
        46





        1
        2
        4
    • Accessories decoder function setup
      • Digikeijs DR 4018:



        CV 113
        114
        115
        116
        117
        118
        119
        120

        121
        122
        123
        124
        125
        126
        127
        128



        output→ 1
        2
        3
        4
        5
        6
        7
        8

        9
        10
        11
        12
        13
        14
        15
        16
        decoder
        key
        (offset)
        status





















        CV↓/value→ 1
        2
        4
        8
        16
        32
        64
        128

        1
        2
        4
        8
        16
        32
        64
        128
        first decoder




        #1
        on
        141








        142









        off
        144








        145








        #2
        on
        147








        148









        off
        150








        151








        #3
        on 153








        154









        off 156








        157








        #4
        on 159








        160









        off 162








        163








        #5
        on 165








        166









        off 168








        169








        #6
        on 171








        172









        off 174








        175








        #7
        on 177








        178









        off 180








        181








        #8
        on 183








        184









        off 186








        187








        #9
        on 189








        190









        off 192








        193








        #10
        on 195








        196









        off 198








        199








        #11
        on 201








        202









        off 204








        205








        #12
        on 207








        208









        off 210








        211








        #13
        on 213








        214









        off 216








        217








        #14
        on 219








        220









        off 222








        223








        #15
        on 225








        226









        off 228








        229








        #16
        on 231








        232









        off 234








        235








        second decoder
        #17
        on 141








        142









        off
        144








        145








        ...



















        • Note: key/address offset is configured with PROGRAM physical button and kept in CV 513, 521
  • CV:
    NMRA RP DCC S-9.2.2 (RP 9.2.2)

    RN204616-7 (Railion)
    Le lait (CFF/SBB)
    Digikejs

    multi-function (mobile) decoder accessory (stationary) decoder
    Fleischmann 685303 Fleischmann 721181 Fleischmann 731376 (Zimo decoder)
     DR4018
    Rocrail xml nmra-rp922.xml

    nmra-rp922-acc.xml










    JMRI xml
    (JMRI/xml/decoderIndex.xml)
    (JMRI/xml/decoders)



    JMRI/xml/decoders/nmra/
    Fl_decoders_RailCom.xml





    Zimo_Unified_software_v32_MX648.xml


    Digirails_Stationary.xml
    CV
    description
    CV (opt)
    description

    Name
    Basic value
    Meaning
    Name
    Basic value
    Meaning
    Name
    Basic value
    Description

    1
    Primary Address
    513
    Decoder Address LSB
    shortAddressOnly.xml
    shortAndLongAddress.xml (CV17, 18)
    Loco address 3

    Loco address
    3

    Loco address


    first address offset (low byte)
    2
    Vstart
    514
    Auxiliary Activation
    vStartHighMid.xml
    v min
    3

    v min
    3

    Start-up voltage



    3
    Acceleration Rate
    515
    Time On F1
    accelDecel.xml
    accelDecel_31.xml
    accelDecel_254.xml
    accelDecel_255.xml
    Aceleration rate
    2

    Acceleration inertia
    2

    Acceleration inertia



    4
    Deceleration Rate
    516
    Time On F2
    Deceleration rate
    2

    Braking inertia
    2

    Braking inertia


    5
    Vhigh
    517
    Time On F3
    vStartHighMid.xml
    v max
    180

    v max
    150

    Maximum voltage



    6
    Vmid
    518
    Time On F4
    v mid
    0

    v mid
    0

    Middle voltage



    7
    Manufacturer Version No.
    519
    Manufacturer Version Info
    mfgVersionId.xml
    Decoder versions no.
    101

    Manufacturer vesion no.
    101

    Manufacturer version
    32

    10
    13
    8
    Manufacturer ID
    520
    Manufacturer ID
    Manufacturer ID 155

    Manufacturer ID
    155

    Manufacturer ID 145

    42
    9
    Total PWM Period
    521
    Decoder Address MSB
    -
    Motor control 20

    Motor control
    20




    first address offset (high byte)
    10
    EMF Feedback Cutout

    (future use)
    -










    11
    Packet Time-Out Value

    ...
    -
    Packet timeout
    0








    12
    Power Source Conversion


    -
    Power source conversion
    Bit 0=1

    Current type






    13
    Alternate Mode Function Status F1-F8


    analogModeFunction.xml






    Analog mode F1 up to F8





    analogModeFunction_F12.xml
    analogModeFunction_F15.xml










    14
    Alternate Mode Function. Status FL,F9_F12








    Analog mode F9 up to F12 and frontlight



    15-16
    Decoder Lock


    -
    decoderLockId16.xml










    17
    Extended Adddress


    shortAndLongAddress.xml

    Extended address (upper section) 192

    Extended address (upper section)


    Long address (upper section)



    18
    Extended Adddress

    -
    Extended address (lower section) 0

    Extended address (lower section)


    Long address (lower section)


    19
    Consist Address


    consistAddrDirection.xml










    20
    (reserved for future use)


    -










    21
    Consist Addr Active for F1-F8


    cv21_lsb.xml
    cv21_lsb_MRC.xml













    cv21.22.xml
    cv21.22_F12.xml
    cv21.22_F15.xml










    22
    Consist Addr Active for FL-F9-F12












    23
    Acceleration Adjustment


    consistAccelDecelSigned.xml










    24
    Deceleration Adjustment












    25
    Speed Table/Mid-range Cab Speed Step


    -










    26
    (reserved for future use)
    ... -










    27
    Decoder Automatic Stopping Configuration

    (future use)
    -










    28
    Bi-Directional Communication Configuration (RailCom):
    bit
    value
    description
    0
    1
    0
    1
    unsolicited decoder initiated trasmission
    disabled
    enabled
    1
    2
    initiated broadcast transmission using asymmetrical DCC signal
    disabled
    enabled
    2
    4
    initiated broadcast transmission using signal controlled influence signal
    disabled
    enabled
    3-7

    reserved for future use


    540
    Bi-Directional Communication Configuration:
    bit
    value
    desc
    0
    1
    0

    unsolicited decoder initiated transmission
    disabled
    enabled
    1

    (not used)


    2-5

    (future use)


    6-7

    flag bits (future use)



    -
    RailCom configuration (not working!?):
    bit
    value

    0
    1
    0
    1
    RailCom channel 1 (Broadcast)
    off
    on
    1
    2
    RailCom channel 2 (Data)
    off
    on

    3

    RailCom configuration (not working!?)


    RailCom configuration (working)



    29
    Configuration Data 1:
    bit
    value
    description
    0
    1
    0
    1
    locomotive direction (CV29_LOCO_DIR)
    normal
    reversed
    1
    2
    FL location (CV29_F0_LOCATION)
    bit 4 in speed and direction instructions control FL
    bit 4 in function group one instruction controls FL
    2
    4
    Power source conversion (CV29_APS)
    NMRA digital only
    Power source conversion enabled (see CV12)
    3
    8
    Bi-directional communications (see S-9.3.2) (see CV28) (CV29_ADV_ACK)
    disabled
    enabled
    4
    16
    Speed table (CV29_SPEED_TABLE_ENABLE)
    set by CV 2, 5, 6
    set by CV 66-95
    5
    32
    addressing (CV29_EXT_ADDRESSING)
    one byte addressing (in CV1)
    two bytes addressing (in CV17,18)
    6
    64
    (reserved for future use)


    7
    128
    Accessory decoder (CV29_ACCESSORY_DECODER)
    Multifunction decoder
    Accessory decoder (see CV 541)
    541
    Accessory Decoder Configuration:
    bit
    value
    desc
    0
    1
    0-2

    (future use)


    3
    8
    bi-directional communications (CV29_ADV_ACK) disabled
    enabled
    4

    (future use)


    5
    32
    decoder type (CV29_EXT_ADDRESSING) basic
    extended
    6
    64
    addressing method (CV29_OUTPUT_ADDRESS_MODE)
    decoder address (board addressing mode)
    output address (output addressing mode) (FLAGS_OUTPUT_ADDRESS_MODE)
    7
    128
    accessory decoder
    (CV29_ACCESSORY_DECODER)
    multifunction decoder (see CV29)
    accessory decoder (FLAGS_DCC_ACCESSORY_DECODER)

    cv29direction.xml (bit 0)
    cv29speedSteps.xml (bit 1)
    cv29analog.xml (bit 2)
    cv29RailCom.xml (bit 3)
    cv29AdvAck.xml (bit 3)
    cv29table1-28.xml (bit 4)
    cv29table3-28.xml (bit 4)
    shortAndLongAddress.xml (bit 5) (also: CV...)


    Configuration variable
    Bit 0=0
    ...

    Configuration values


    Configuration values


    30
    Error information

    (future use)
    -
    Error information 0

    Error information






    31
    Index High Byte

    Indexes Area Pointer
    -










    32
    Index Low Byte

    Indexes Area Pointer -










    33
    Output Loc. FL(f), FL(r), F1-F12

    Manufacturer Unique
    functionmap.xml
    F0v
    1
    Light forwards







    34

    ... F0r
    2
    Light backwards







    35


    F1
    4
    Aux 1







    36


    F2
    8
    Aux 2







    37


    F3
    16
    Aux 3







    38


    F4
    4
    Aux 4







    39


    F5
    8
    Acceleration zero







    40


    F6
    16
    Half speed







    41


    F7
    32








    42


    F8
    64








    43


    F9
    16








    44


    F10
    32








    45


    F11
    64








    46


    F12
    128








    47
    Manufacturer Unique


    -










    51


    cv51_DirectionalHeadlights.xml (bit 0)
    Individual FLEISCHMANN settings

    Individual FLEISCHMANN functions






    60


    -






    Light dimming



    64


    -
    RESET

    RESET






    65
    Kick Start


    kickStart.xml
    kickStart_63.xml










    66
    Forward Trim

    ... fwdTrim.xml
    fwdTrim128.xml
    Forward trim 248

    Forwards trim


    Speed adjustation, forward



    67-81
    Speed Table

    Manufacturer Unique
    -
    Adjustment of control characteristic curve of controller

    Adjustment of control characteristic curve of controller


    Modification of the regulation characteristic of the control unit



    82-94
    Speed Table
    (future use)











    95
    Reverse Trim

    ...
    revTrim.xml
    revTrim128.xml
    Backwards trim 248

    Backwards trim


    Speed adjustation, backward



    96-104
    (reserved for future use)


    -










    105
    User Identifier 1


    userId.xml
    User variables
    0








    106
    User Identifier 2

    ...
    User variables 0








    107-111
    (future use)

    (future use) -










    112-256
    Manufacturer Unique

    Manufacturer Unique -






    250: Configuration values (only Motorola)



    257-512
    Indexed Area

    Indexed Area -






    266: Volume
    0=low up to 255=loud
    513-879
    (future use)
    Manufacturer Unique (CV opt)
    -










    880-891
    (future use)
    ... -










    892
    Decoder Load


    -










    893
    Dynamic Flags


    -










    894
    Fuel/Coal

    ... -










    895
    Water

    Manufacturer Unique (CV opt) -










    896-1024
    SUSI Sound and Function Modules

    (future use)
    -










  • ...

Retorn / Feedback

Comercial / Commercial

Digikeijs DR4018 16-channel switch decoder (stationary DCC decoder)

...
  • Info
    • Config file for Rocrail
    • Digikeijs DR4018 16-channel switch decoder
    • Controlador de accesorios Digikeijs DR4018: Guía rápida de puesta en marcha
    • Decóder accesorios DIGIKEIJS DR4018. CASO PRÁCTICO: conexión señal 2 aspectos
    • Notes:
      • Default loco (extended) address (used when asked by POM config) for the decoder is 9999 (specified in CV17-18; bit 5 to 1 in CV29 indicates to use extended address instead of loco address in CV1)
      • It has up to 16 addresses / keys
      • Default first accessory address for output 1 is 5. This can be changed by using the physical button ("PROGRAM") in the unit
        • Offset value is stored in CV 513,521
      • Mapping from function key (address in control unit) to outputs is specified by CV141-235. By default: key 1 ON/OFF controls outputs 1,2; key 2 ON/OFF controls outputs 3,4; ... key 8 ON/OFF controls outputs 15,16.
      • Outputs are configured by CV113-128
        • additional values (pulse duration) in CV238-253
      • (optional) 4 Signals setup
        • type: CV131-134
        • mapping to group of outputs: CV143, 167, 191, 215
      • to facilitate setup, some presets can be called by using CV47
    • z21
      • Digikeijs DR4018 with Z21 (translation from pdf v1.34 in dutch, p34)
        • Programming Start Address (OUT1)
          • Option 1: via CV 513,521
            • set offset value in CV513/CV521. Examples:
              • CV521 CV513 first accessory address = CV521*256 + CV513 + 1
                0 0 1
                0 1 2
                0 2 3
                0 3 4
                0 4 5 (default; after reset by sending CV8=8)
                ...

                0 255 256
                1 0 257
                1 1 258
                ...

                7 254 2047
                7 255 2048
            • NOTE: maximum accessory address is 2048. If first address of the module is set to 2048, this will be the only available address. Other outputs will not work.
          • Option 2: manually
            1. Connect the DR4018 to the "Main Track" / "Track out" of your Z21
            2. Configure a switch with the desired start address in the corresponding «Z21 mobile» app:
              1. Control Station
              2. Select a turnout
              3. Click on gear symbol to edit it
              4. Address: e.g. 1
            3. Press once the switch of the DR4018. The red LED lights up.
            4. Operate the created switch from the screen of the Z21 app:
              1. Control panel
              2. select switch control (icon)
            5. The red LED on the DR4018 goes off and the address will be recorded start address (OUT1) (CV 513, 521)
            6. NOTE: when trying to program a starting address of 2049, CV513 will be set to 0 and CV521 will be set to 0 too: first address is 1.
        • CV programming

          • POWER
            SIGNAL
            write read
            POM can be different PROGRAM
            (not working?)
            -
            PT must be the same PROGRAM + resistor PROGRAM + resistor
        • CV programming via POM (Program On Main). CV values cannot be read. To read them, use PT instead. In the following example we will program the DR4018 on preset 0 through CV47.
          • escriptura / write
            1. Connect the DR4018 to the "Main Track" / "Track out" of your z21
            2. Program Set the desired CV 
              • using the Z21 application (Android) (you can monitor the commands with JMRI "Z21 Traffic"):
                1. (not needed) Vehicles (if you do not register 9999 loco/accessory, POM will not work)
                  • + Accessory
                  • Loco address: 9999
                  • Would you like to change the address of loco 3 to 3 in the decoder? Program (POM)
                    • no cal que PROGRAM estigui encès / no need to be PROGRAM led on
                  • Note: if this question does not appear:
                    • Settings -> App Settings -> Advanced Settings
                      • Programming in railway vehicles settings: on
                2. CV Programming
                  • Manual
                  • Program On Main (POM)
                    • Loco address: 9999
                    • CV address: 47
                    • 4 (2 groups with 8x Fluorescent lamp)
                    • Set CV
                    • may not work at the first time; try again (to be sure, monitor the commands with JMRI "Z21 Traffic")
                    • NOTE: don't worry about the message "Could not read CV value for selected loco address or CV address"; it is due to the lack of RailCom feedback.
              • using JMRI:
                1. ...
            3. Press once the switch of the DR4018. The red LED lights up.
            4. Press the "Program" button in the Z21 application
            5. Press once the switch of the DR4018. The red LED goes out.
            6. The DR4018 will now save the settings and apply them. The effect of the programmed settings are now immediately visible.
            7. Personal note: To program another CV, go back and enter "Program on Main" again (if not doing so, sometimes programming another value does not work)
        • CV programming via PT (Program Track):
          • escriptura / write
            • es poden escriure els valors dels CV / CV values can be written
          • lectura / read
            • es poden llegir els valors dels CV / CV values can be read (e.g. with Z21 app, JMRI)
            • per a un ús més fàcil, sense haver de connectar cap resistència, feu servir POM / for an easier usage, without using a resistor, use POM
            • connecteu una resistència (150-270Ω) entre output 1 i C / connect a resistor (150-270Ω) between output 1 and C
            • premeu el botó PROGRAM (el led es posarà vermell) / press PROGRAM button (led will turn red)
        • Reset the module to factory settings using POM programming
          1. Connect the DR4018 to the "Main Track" / "Track out" of your Z21
          2. Program the desired CV using the Z21 application:
            1. Programming
            2. PROGRAM ON MAIN
              • Loco-Address: 9999
              • CV-Number: 8
              • CV-Value: 8 (Reset)
          3. Press once the switch of the DR4018. The red LED turns on.
          4. Press the "Program" button in the Z21 application
          5. Press once the switch of the DR4018. The red LED turns off.
          6. It is important when carrying out a RESET that the module is now disconnected from the power.
            Disconnect both the power and the signal inputs and wait for 3 to 5 seconds.
group
CV
description
info
range
value


1

Loco address (1-127)
(not used, because bit 5 of CV29 is set to 1 => extended address is used instead)




7

Version of the decoder

-
134


8

Manufacturer ID
Writing the value “8” will reset the decoder to its factory settings (CV513=4, CV521=0)
-
42
Extended address (128-9999)


17

Extended Address high byte (two most significant bits are always 11)
11xx xxxx (e.g. CV17=231, CV18=15 -> extended address.: (231-192)*256 + 15 = 9999)
192-255
231 (b1110 0111)

18

Extended Address low byte
yyyy yyyy
0-255
15 (b0000 1111)


29

Configuration Data
bit function
default
value
0



1



2



3



4



5
  • '0' = one byte addressing (address in CV1)
  • '1' = two byte addressing (also
    known as extended addressing, ad-
    dress in CV17 and 18)
0
32

98 (b0110 0010)
presets (write only)

47

IMPORTANT: This CV is not readable as entered values will not be stored, rather the entire decoder will be configured according to the preset selected.



output

preset
function
no. of
addresses / keys
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

0
8x Turnout with twin-coil motor
8
1
2
3
4
5
6
7
8
dr4018_preset_0
1
16x permanent on/off switch
16
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
dr4018_preset_1
2
8x two-light signal with fade effect
8
1
2
3
4
5
6
7
8
dr4018_preset_2
3
8x AHOB
8
1
2
3
4
5
6
7
8
dr4018_preset_3
4
2 groups with 8x Fluorescent lamp
2
1
2
dr4018_preset_4
5
1 x 16 output with Fluorescent lamp
1
1
dr4018_preset_4
6
8x Turnout motor control
8
1
2
3
4
5
6
7
8
dr4018_preset_6
7
4x Dutch three-light signal
(CV131-134: 1)
4
1
2
3
4
dr4018_preset_7
8
4x DB Main signal
(CV131-134: 2)
4
1
2
3
4
dr4018_preset_8
9
4x DB pre-signal associated with main signal
(CV131-134: 3)
4
1
2
3
4
dr4018_preset_9
10
2x Combination of DB Main signal and pre-signal
4
1
2
3
4
dr4018_preset_10
11
4x DB Pre-signal
(CV131-134: 4)
4
1
2
3
4
dr4018_preset_11
12
4x NMBS Main signal
(CV131-134: 5)
4
1
2
3
4
dr4018_preset_12
13
8x Turnout control with time limit
8
1
2
3
4
5
6
7
8
dr4018_preset_13
0-13
n/a


107

Dark time between signal transitions

1-255
70

108

Value to dim intensity of signal (night mode)

0-15
10

109

PWM Period
The resolution with which the internal PWM operates to achieve effects and dim -values
1-255
14

111

Fade Speed
The speed with which the outputs configured for fading will fade in and fade out (bit 4 in output configuration CV113-128)
1-255
3

112

Blink rate
The speed with which the outputs configured for blinking will blink (bit 5 in output configuration CV113-128) 1-255
183
output configuration
1
113

Output Configuration 1
bit
function

default
value
0-3
Intensity of the output.
Also called dimmer. Where 0 is completely off and 15 completely on.
15
0-15
4
Fade in and fade out effect.
  • "0" = no fading
  • "1" = fading active.
Fade speed is controlled by CV111
0
16
5
Blink effect
  • "0" = no blinking
  • "1" = blinking active.
Blink rate iscontrolled by CV112
0
32
6
Random effect
  • "0" = random off
  • "1" = random active.
Combined with bit 4 (fade) the lights start with a flash, after which they slowly fade
in. Note: The intensity value should be max. 14 for this effect to work.
0
64
7
Pulse
  • 0 = continuous
  • 1 = pulse
Length is set via CV 238 through 253, when combined with
bit 5 the output blinks, but with inverted phase
1
128
0-255
143
(b1000 1111)
2
114

Output Configuration 2


3
115

Output Configuration 3


4
116

Output Configuration 4


5
117

Output Configuration 5


6
118

Output Configuration 6


7
119

Output Configuration 7


8
120

Output Configuration 8


9
121

Output Configuration 9


10
122

Output Configuration 10


11
123

Output Configuration 11


12
124

Output Configuration 12


13
125

Output Configuration 13


14
126

Output Configuration 14


15
127

Output Configuration 15


16
128

Output Configuration 16


Signal
1
131

Type of signal #1 (linked group of 4 outputs is specified in CV143)
If the CV contains a value different than 0 all its controlled outputs will switch according to the signal rules. The other CVs that normally control the outputs will be deactivated.
value ->
0
1 2 3 4 5
used by preset (CV47) ->

7
8
9
11
12
function ->
No Signal Dutch (NS railways) (3-aspect + digit board)dr4018_preset_7 DB_HP (German main signal)dr4018_preset_8.png DB_VRHP (German front and main signal)dr4018_preset_9.png DB_VR (German front signal)dr4018_preset_11.png NMBS (Belgium railways)dr4018_preset_12.png
address






1st
2nd
3rd
4th






R
R
R
night dimming

Red
HP0
Off
VR0
Red
G