DCC++ setup

Art99 Feb 24, 2020

  1. Art99

    Art99 TrainBoard Member

    16
    0
    6
    I am just reentering the HO model railroad arena after many, many years away. I have decided that I want to use DCC++. I have purchased an Arduino mega and Motor Shield, severed the power connection, connected a 12 volt power supply, connected pins 13 and 2 on the motor shield, downloaded the IDE software and JMRI. I am using Windows 10.

    I connected it all together to the programming track. The 4 lights on the motor shield light up when I turn the power on through JMRI. The locomotives are second hand and I don't know what kind of decoder they have so I read through Decoderpro which seems to be working as I see it reading through the CVs at the bottom of the screen. It comes back with multiple possibilities and I choose one that looks close to the documentation that I have on the locomotive. I then write and save and when I activate the throttle nothing happens; I have tried many times and even had JMRI read all the CVs in an attempt to fix.

    In using Decoderpro I notice at the bottom is not connected. It says "No service Mode Programmer available", "No Operation Mode Programmer available" and active Profile is My JMRI railway; whereas, in PanelPro, it says "Service Mode Programmer DCC++ is online", Operation Mode Programmer DCC++ is online and has the name that I gave my railroad.

    Question1: Shouldn't Decoderpro be referencing the same as Panelpro?

    Question2: Did I set up JMRI wrong to start with?

    I have tried using Panelpro to read the locomotives without any more success. I think I am close but ?????

    Thanks for any help you can give me.

    Art
     
  2. RCMan

    RCMan TrainBoard Member

    271
    132
    12
    You need to go into JMRI and under "Edit>Preferences" select "Defaults" If anything is marked "Internal" then put the black dot in the DCC++ row. Everything should be marked for DCC+.

    Dennis
     
  3. Sumner

    Sumner TrainBoard Member

    2,842
    5,996
    63
    The other thing is you can not run the loco on the program track it that is what you are trying. Move it to the main track after programming the decoder. The main can be just a short section of track connected to the output on the shield's 'main' terminals and is what I use.

    Sumner
     
    Last edited: Feb 24, 2020
  4. Art99

    Art99 TrainBoard Member

    16
    0
    6
    There was nothing marked

    upload_2020-2-24_11-1-16.png

    Thanks
     

    Attached Files:

  5. RCMan

    RCMan TrainBoard Member

    271
    132
    12
    OK, you have not setup DCC++ in JMRI yet.

    Go back to "Edit>Preferences>Connections.

    Under "Systems" select "DCC++" from the pull down window.
    Under "System Connections" Select "DCC++ Serial Port" if this is the way you are connecting.
    Under "Settings>Serial" add your serial port number.
    Leave everything else alone.

    When finished Press the Save Button.
    JMRI will ask you to restart, DO This.

    Go and do what my first post and check this Default page again for all to be on DCC++, if not correct it.

    Let me know
     
  6. Sumner

    Sumner TrainBoard Member

    2,842
    5,996
    63
    Sorry for a repeat. I started to post and then went and took pictures and then saw that Dennis posted once I finally finished my post. I guess I'll leave this here anyways....

    [​IMG]

    Have you gone to 'Connections' on the menu to the left and selected DCC++. I'm assuming you must have if Decoder Pro is working on the program track. Above is a screen shot from my DCC++ screen running JMRI.

    [​IMG]

    If so then you should see the screen above when you click on "Defaults" as Dennis mentioned.

    Have you then moved the loco to the Main? If they are used and you are not sure of the address I'd first try 3 as that is the default. Next I'd put in the loco's road number as most change it to that and try that. You should be able to also see the loco's number in Decoder Pro under the "Basic" section if I remember right without going to look.

    Sumner
     
    Last edited: Feb 24, 2020
  7. RCMan

    RCMan TrainBoard Member

    271
    132
    12
    Good idea.

    This is asked many times.
     
  8. Art99

    Art99 TrainBoard Member

    16
    0
    6
    Thank you, that works. Is there any reason that it won't work on the programming track? A limitation of the mega?
     
  9. Art99

    Art99 TrainBoard Member

    16
    0
    6
     
  10. Art99

    Art99 TrainBoard Member

    16
    0
    6
    Thank you for your help. Everything now works.
     
  11. Art99

    Art99 TrainBoard Member

    16
    0
    6
     
  12. Sumner

    Sumner TrainBoard Member

    2,842
    5,996
    63
    Not sure, I assume that it was the way DCC++ was implemented. Maybe someone else will let us know :),

    Sumner
     
  13. Art99

    Art99 TrainBoard Member

    16
    0
    6
    I appreciate your efforts in posting the pictures. It served as a confirmation of what Dennis posted.

    Thanks again.
     
  14. Art99

    Art99 TrainBoard Member

    16
    0
    6
    Now that I have both the programming track and the main track connected to the mega at the same time, they are either both on or both off. Is there a way of activating them separately?

    Thanks
     
  15. RCMan

    RCMan TrainBoard Member

    271
    132
    12
    Why would you want to do that?
    Dennis
     
  16. Sumner

    Sumner TrainBoard Member

    2,842
    5,996
    63
    If you also want to use the programming track as a main track you can do the following to accomplish that ....



    Sumner
     
  17. Art99

    Art99 TrainBoard Member

    16
    0
    6
    I was trying to program my 2nd loco on the programming track and didn't realize that I had the left the 1st loco on the main track running idle. So really dumb question on my part. My 2nd loco won't program properly. The decoder says that it is a 1714 Alco 244 but I cannot get it to move. All the sounds work. Any ideas as to what I am doing wrong?

    Thanks
     
  18. FlightRisk

    FlightRisk TrainBoard Member

    548
    237
    14
    It has been a couple of weeks, I know, but thought I would answer this helps someone. The simple answer is "because it's the standard". There is not a hardware or software reason why you couldn't do anything on either track, but it doesn't make sense and can damage your loco. The NMRA calls this "service mode", not "programming track" to give a better idea of what you are doing. If a real train needs service, you pull it off on a side track. So the first "standard" set by the NMRA is that service mode "should occur on an isolated section of track". Second, they recommend limiting that section of track to 250mA, not the 2, 10 or 20 you could have on your ops track. Long lengths of track, and who knows what connections you have on them, can have electrical characteristics that would make it difficult to read the "ACK" responses from the decoder to know if you have written CVs or to read them back. In "byte mode", DCC reads them back by going through each possibility one at a time to ask, "is it set to one? to two? to three?...", because the only way it has to get an answer is to detect an acknowledgement pulse. When JMRI hits the right value, the decoder pulses to say, "stop, that's the one". Direct bit mode is much faster.

    That said, there is no safeguard against writing CVs in DCC++ to the main track. While JMRI may force you (not sure) to use the programming track because it sends DCC++ a <W> command (notice the capital 'W'), using the JMRI command window (or any method) to send raw text commands over the serial port will let you send a <w> command (small 'w'). That will happily try to write any CV you tell it to on the main track ;) Again, not recommended. Also, there is no reset packet, no idle packet, no acknowledgement detected, etc. on the main track (by design). A decoder may or may not respond to all CV write commands without all that. And you can't read any because the code doesn't do all the things mentioned in the above paragraph, especially detect ACKs, when working on the main track.

    You cannot use the throttle commands on the programming track. There is not a separate command to allow that.

    Technically, the way this works is that DCC++ maintains a set of "registers" that hold the packets built to be sent out over the rails. If you have 12 registers (DCC++ default, DCC-EX has more) you could have 12 trains running on the track at once. But DCC++ creates a separate identical register structure for programming. It puts packets with your commands in one or the other register lists. Packets in the main registers go to the main track, packets in the programming register go to the programming track. So with the example above, a 'W' writes packets to the programming track and a 'w' writes packets to the main track. But there is only one throttle command, "<t>" and that writes to the main track, again, by design.

    EDIT: One thing I forgot to mention is that service mode is also called "broadcast mode", the commands sent on the service track do not have an address. You may already know this. But commands sent on that track go to every decoder and every loco decoder will accept them! If this were allowed on the main track you could reprogram every loco sitting there.
     
    Last edited: Apr 16, 2020
    Sumner likes this.

Share This Page