JMRI/decoder woes with DCC++ main track

Anton Aug 7, 2017

  1. Anton

    Anton New Member

    3
    0
    1
    Ahoy!

    Over the past few days I've (mostly) successfully established a DCC++ system. The catch is, I can't get JMRI to talk to my sole DCC engine's decoder (DCCconcepts Z218) when I supply power to the track via the 'main track' outputs on the motor shield (as specified in the DCC++ documentation). In the attempt, I get a 308 error 'no acknowledge from locomotive'. I can control movement and lights in both the Arduino software's serial monitor and the DCC++ controller sketch in the Processing software. I have also tested that decoder in another engine to the same effect. The issue seems to narrow to the system's interaction with JMRI using 'main track' outputs.

    When supplying power via 'programming track' outputs, JMRI has no issue identifying the decoder and reading/writing information. I have overwritten the long address a few times, and when I go back to 'main track' outputs and use Processing/Arduino softwares, the latest address works. I can't use the Processing sketch/serial monitor throttles using the programming output, but I acknowledge this is a norm for programming tracks.

    Other potentially useful info: I'm using macbook air with os x (10.12.5). Chinese Uno/motor shield with the CH340G driver addressed and the VIN trace cut. 15VDC 2a plug.

    Thanks for any help you can provide!
     
  2. crusader27529

    crusader27529 TrainBoard Member

    247
    167
    11
    The MAIN track by design of DCC cannot acknowledge commands......that can only happen on the PROG treack.

    The MAIN can send commands to change some parameters, but will not be able to determine a response. All commands sent using the MAIN require an address, so you can't change an address with those commands. Changing an address is allowed ONLY on the PROG track.

    Sounds like the system is working correctly.
     
  3. Keith Ledbetter

    Keith Ledbetter TrainBoard Member

    279
    195
    12
    IN DCC++ there is no "read on main"" capability though you should be able to write. Are your referring to reading or writing or both? Can you run trains and use the functionality on the main track?

    Above post beat me to it and agree!
     
  4. Anton

    Anton New Member

    3
    0
    1
    Sorry for any lack of clarity in my wording. I'm not yet clear on how concisely refer to things.

    When you say, "cannot acknowledge commands," are you talking about "go forward/go backwards/turn lights on and off" or changing information on the decoder (e.g. short address, long address, etc)? I figured the point of the main was where I can run my trains. I also figured and noted, I can change the address via the programming track. My trouble is that I can do the "go forward/go backwards/turn lights on and off" via Processing/Arduino softwares but not JMRI.

    I'm not clear on what it means to read or write. My particular trouble is that, on the main, I can run everything perfectly via Processing or Arduino softwares, but JMRI does not.
     
  5. Anton

    Anton New Member

    3
    0
    1
    Brief follow-up! The system was indeed working correctly! I was just far too noob'ish with respect to the program to troubleshoot. Thank you both for the info :)
     
  6. TexasRailroader

    TexasRailroader TrainBoard Member

    90
    26
    7
    Using the DCC++ Base Station with JMRI, I have not been able to write to or change a CV on the MAIN. No issue on the programming track.
    If anyone has been able to change a CV, while on the MAIN, I would like to know how it was done.
     
  7. Keith Ledbetter

    Keith Ledbetter TrainBoard Member

    279
    195
    12
    I have been able to write on the main with several decoders. A few have given me issues but by and large fine and I have done nothing special just out of box code.
     
  8. crusader27529

    crusader27529 TrainBoard Member

    247
    167
    11
    Same for me, I have no problem using the 'standard' motor driver or the IBT-2 motor driver......requires nothing special, other than a loco that has an address that you know, and you're trying to change something other than the address itself. I normally change my sound levels on the main, or the consist addresses. No problem that I can see.
     
  9. Tohema

    Tohema New Member

    4
    0
    3
    Hi guys,
    unfortunately I have not come any further (yet) then to turn the 4 leds 'on' by means of <1> from Arduino.
    Could anayone help me to make the next step: how to set the correct address within Arduino DCC++ base station sketch and let the locomotive make a move or a sound? Massoth XLS decoder for G-Scale, E10 190 Electrical Locomotiv.
    regards, Henk
     
  10. Shdwdrgn

    Shdwdrgn TrainBoard Member

    251
    182
    13
    @Henk -- since I myself just graduated from 'total noob' to the status of 'slightly less noob', I think I see what you're asking here... What I've learned is that by default most loco decoders will have an address of 03. The throttle command requires a slot number (1-10 I believe?) to send the command, and speeds are in the range of 0-127. Finally you need a direction: 0=reverse, 1=forward. So to send the command for 25% throttle speed (127 * 0.25 ~= 32) for a new decoder you would send <t 1 03 32 1>. That should allow you to fully control the speed and direction.

    To set a new address for your loco decoder on the MAIN track, you need to know the cab address (again I believe this would be 03), which CV number you need to change, and the new value. Look at the manual for your decoder to know which CVs control which features. If we want to change the simple address (03) to another number (lets say 95), for my Soundtraxx board that would be CV 1, so the command would be <w 03 1 95>. If you want to set an extended address it requires two CVs. So lets say I want my loco address to be 3195. First you have to split this into two values, so 3195 / 256 = 12. Now get the remainder by calculating 3195 - (256 * 12) = 123. So your CV values will be 12 and 123. On my system that is CV 17 and 18, plus you have to set bit 5 of CV 29 to identify the extended address. The series of commands would be <w 03 17 12><w 03 18 123><b 03 29 5 1>.

    Take a look at the DCC++ command reference page for the full set of commands you can use. They provide a much better description than I can.
     
  11. Tohema

    Tohema New Member

    4
    0
    3
    Hi Shdwdrgn,
    Thanks for the information, coming weekend I will try to figure out what happens when I send commands.
    Are there any settings I need to do in de Arduino sketch?
    Henk
     
  12. Shdwdrgn

    Shdwdrgn TrainBoard Member

    251
    182
    13
    Well there are probably some differences between our applications -- I'm using an ESP32 which has wifi so I can telnet into the base station to enter commands. I would imagine there's a way to talk to DCC++ through the serial port as well? Or perhaps you've already figured out how to connect directly. You can start with the basic commands such as <0> and <1> to turn track power off and on, and if that works then you should be able to also talk to your loco (once track power is on). Start with the basics of moving the loco forward and reverse, and when you know that is working them you can move on to changing the CV values.

    Also note that there are different commands for writing on the main or prog tracks. The commands I gave above are for the main and will change ALL locos that are currently on the track (at least I think that's how it works). Since I only have one DCC-enabled loco it doesn't affect me yet. :)
     
  13. John W Zerbe

    John W Zerbe TrainBoard Member

    96
    59
    7
    When I first started playing with jmri and dcc++ I thought that I could not change cv's on main either because I got error messages stating that there was no response. I later discovered that the commands to change the cv actually DID work on the main track. I had to move the loco to the program track to verify that because only on the program track can dcc++ read the response from the loco to the commands to do the changes.

    One thing that I noticed about programming on the main track was that with my locos and their decoders, if I update the speed table, the loco moves slightly each time a cv is updated for that table even though jmri says no response. So, if you are ok with ignoring the errors in jmri, you can program through dcc++ on the main.
     
    Last edited: Mar 14, 2018
  14. Tohema

    Tohema New Member

    4
    0
    3

    Hi John, Thanks for your comment. This weekend I will try to get in touch with the loco on either track. I already managed to use the <1> and <0> command, but could not get the loco to move...

    regards, Henk
     
  15. TwinDad

    TwinDad TrainBoard Member

    1,844
    551
    34
    IIRC there's a bit of a "bug" in JMRI that it will "complain" about not getting a response when programming on the main even though it's not supposed to get a response. It's only complaining about the lack of a response, though, not the failure of the write operation.

    I need to get back in there and see if this is the case, and if so try to fix it.
     
    Atani likes this.
  16. dompondaco

    dompondaco TrainBoard Member

    47
    6
    6
    Hello, I am a new member on TrainBoard I am currently researching how to use DCC++/JMRI and a Arduino Uno with a YUN WiFI Shield to control my N scale locos. I was wondering if you have any additional information posted anywhere else on the site that talks about your ESP32 wifi setup??
     
  17. Atani

    Atani TrainBoard Member

    1,469
    1,757
    37
  18. wideko

    wideko New Member

    8
    0
    3
    Gents,
    For sure the wrong place, but excuse me I can't find a better place...

    I've build a Arduino Uno with a Chinese 'brand' motorshield, running DCC++.
    It is connected over a USB-cable with JMRI DecoderPro (version 4.10)

    Switching on/off of the DCC++-module (basic-station) is working fine.
    Reading and writing the CV's on the programming-track is working fine.

    From the MotorShield:
    - the programming-output is wired to a train-stand (rolling-stand), so the loco can roll freely.
    - the main-track-output is NOT wired.

    But when I open a throttle and select the correct loco-address, I can't get the loco to run or even the lights on.

    Who can guide me how to solve this?
    Please direct me to a good document explaining this set-up.
     
  19. RCMan

    RCMan TrainBoard Member

    271
    132
    12
    The Program track will not operate the motor or light, etc. It is only to Read and write CV's.

    Move the two wire off the program output to the Main and you will be able to operate the engine.
     
    wideko and Atani like this.
  20. wideko

    wideko New Member

    8
    0
    3
    Thanks Dennis,
    I'm going to connect the wires over a DPDT-switch and check if that is solving my problem.
    Should I then select another setting in JMRI?
     

Share This Page