DCC++ and DCC Concepts Cobalt IP Digital

rposener8#gmail.com May 14, 2020

  1. rposener8#gmail.com

    rposener8#gmail.com New Member

    3
    0
    3
    I am unsuccessfully trying to set up a Cobalt IP Digital (“Cobalt”) combined switch and decoder when it is connected via DCC++ through to JMRI. At the moment, I am concentrating on getting the DCC++-to-Cobalt working. I have sent many different commands (both <a> and <T> variants) to the Cobalt (via both JMRI and DCC++’s Serial Monitor) when the Cobalt is set in “Set” and in “Run” modes. The Cobalt has done nothing in response to any command (no movement and no noise). I have not yet connected the Cobalt to my Peco turnouts. I have successfully been able to configure and run a locomotive with a decoder from my JMRI via DCC++ to my track (ie, locomotive control with the full set up is working as desired).

    I have been using the following documentation as my primary source material to guide me through this process (among many others):

    1. https://www.dccconcepts.com/manual/owners-manual-cobalt-ip-digital-point-motors

    2. https://github.com/DccPlusPlus/BaseStation/wiki/Commands-for-DCCpp-BaseStation

    3. https://github.com/DccPlusPlus/BaseStation/wiki/Diagnostics---D---Command

    4. https://www.jmri.org/help/en/html/hardware/dccpp/index.shtml

    5. https://www.jmri.org/help/en/html/hardware/dccpp/Turnouts.shtml
    Software version numbers I am using are:

    1. JMRI: 4.18+

    2. DCC++: v1.2.1+(ie, the original, unchanged 2015 version)
    I believe all of these are the current “Released” versions.

    I have some questions whose answers will help me to debug my set up.

    1. Does it matter which way the polarity of the 2 X power wires is connected to the Cobalt?

    2. What response does the Cobalt send back to the DCC controller after receiving a command?

    3. The Cobalt documentation says I need to send address 198 from the DCC controller to the Cobalt to de-activate centering. How does DCC++ allow the sending of an address by itself? I can send a <T> command or an <a> command containing an address together with a THROW setting of “0” or “1”, but not JUST the address.

    4. The DCC++ documentation confuses me when it talks about decoder addresses and subaddresses. The Cobalt documentation is silent about decoder subaddresses. DCC++ seems to say “for an address of 198, divide this by 4 and use the answer as the address and the remainder as a subaddress” (ie, 198 is to be coded as an address of 49 and a subaddress of 2).

    5. What command(s) do I need to send to change the address of a Cobalt?

    6. What command do I send in DCC++ to specify which track the Cobalt is on (Main or Programming)?

    7. Put another way, does the Cobalt HAVE to be on the Main or can it be on the Programming track?

    8. The DCC++ documentation talks about turnouts “being wired to output 3”. What does “output 3” mean?

    9. What is the relationship between “output” and “subaddress”?

    10. How do I determine “output” and “subaddress”?

    11. Is there a specific user-invoked test that will tell if the Cobalt is working correctly?

    12. Is there any way of de-activating centering without a DCC controller (ie, de-activating a Cobalt in DC mode)?

    13. Must I de-activate centering before sending any other commands to the Cobalt?
    Can you please confirm my understanding of the following:

    1. I need to turn track power on (with a <1> command) before sending any commands to the Cobalt.

    2. The default (out-of-the-box) address of the Cobalt is “1”.

    3. After I enter a “<T 198 198 0>” command (to define the turnout) and then a “<T 198 1>” command (to throw the turnout), DCC++ sends a command to the Cobalt (eg, a “<a 198 0 1>”) and I do not need to do this as a separate step.
    Rob
     
  2. FlightRisk

    FlightRisk TrainBoard Member

    548
    237
    14
    I see no one has jumped in. I'll try to help from the DCC++ side. I am one of the developers on the DCC++ EX update project.

    1. If you are getting power from the rails and wiring according to their "Basic Wiring Diagram for DIGITAL control...", then no, polarity of the wires does not matter. It does matter if you are powering it separately from a DC power supply. You should verify your switch is set for the correct voltage. Reading their docs shows that it can handle 7-23V off the rails and that this is configurable by sending it accessory commands.

    2. In a regular decoder, if you are on the PROG track, the decoder sends a short current pulse to the track to signal an acknowledgement. But for that is for reading and writing CVs. DCC++ does not listen for anything for on the main track and an accessory decoder would not want to send current pulses on the main track! So the answer is "no response", though DCC++ will send a response saying it sent the command.

    3,4. We just had a long discussion about addressing decoders in the DCC++ EX Software thread! It's complicated. First, JMRI allows you to send addresses directly and converts them to whatever base station you are using. The standard for addressing corrupted by politics so there are multiple ways to do it, sadly. So if you are in JMRI and connect to the program track, you enter just the number. To test with DCC++, you are going to have to convert to 2 part addressing. That should get you working and then go back to JMRI and use linear, one number addressing. Your Cobalt has 3 special addresses or CVs, 197,198 and 199. I imagine they work like separate switches referring to them linearly. If you write to 199 you activate centering, write to 198 and you deactivate it. Address 197 reverses your direction of throw. It seems to be a toggle. Now here is what you have to to in DCC++ where Address is your 1 part address:

    SW1= (Address + 3)/4
    SW2= (N-(SW1*4)) + 3

    So for example, Address 198 is 50,1. So in DCC++, you would enter <a 50 1 1> to activate that. You can try <a 50 0 0> to deactivate it, but I think you just send activates to the appropriate address, subaddress pair and don't have to deactivate those CVs.

    If you want, you can go here and just remove what is in between the braces in the "int main" statement and insert this:

    int sw1,sw2;
    int address=198;
    sw1=(address+3)/4;
    sw2=(address-(sw1*4)) +3;
    printf("%d,%d", sw1,sw2);

    Then change the 198 to whatever address you want and hit "run".

    If your default address is one you simply enter <a 1 0 1> to actually throw the switch and <a 1 0 0> to close the switch. If you were on address 3 it would be <a 1 2 1> and <a 1 2 0>

    When you go to JMRI, you are going to have to go back to the straight linear numbering in their software.

    This method is just a generic accessory decoder command. To operate them as turnouts you use the T command. You can define them like this:

    <T 50 1 2> // set the decoder address 3 to my ID of 50. Then you can even save them to the EEPROM in the Arduino with the <E> command. Capital E.

    Now JMRI will refer to them by your ID's. To use them in DCC++ for testing, enter <T 50 1> to throw and <T 50 0> to unthrow.

    I know a lot of folks just enter them in JMRI and don't save them to the Arduino since you can save them in JMRI and it is responsible for remembering them. I don't know if JMRI remembers there states or not.

    5. I *Think* this is a self-learning switch. Many are. They are telling you to put it in learn mode with the switch to the "SET" position, and then to issue the command with the address you want. Lets say you wanted address 229, that would be <a 58 0 1> and then <a 58 0 0> . That "trains" the decoder, which is listening to any command sent on the rails what address you want. Then set the switch back to "run".

    6. You don't. The appropriate commands only go to the correct track. So accessory commands only go out on the main.

    7. See #6

    8. Where to begin ;) Try here: https://wiki.rocrail.net/doku.php?id=addressing-en Bottom line is that traditionally, turnouts were the accessory and it had solenoids and positions. So that 2 part address gives an address and a port or output on that address. Those devices usually like a dual coil had 4 outputs. So address 229 converts to 58,0 and you would have 58,1 58,2 and 58,3. So in the address, subaddress format, it lets you activate those 4 different outputs directly. Hopefully, the link will give a little more insight and you can do more searching from there.

    9. , 10. See #8

    11. See #3. Not sure if there is any diagnostic in the switch itself to test the motor

    12. Don't know. Doubt it.

    13. No

    1. Yes
    2. Yes
    3. Not exactly, but close. Let's drop the 197-199, those are special addresses for programming the thing. Assuming you leave the default address of "1", you would:

    <T 50 1 0> Assign an ID of 50 to the decoder at address 1 output 0
    <T 50 1> Throws the switch. You are correct here
    Last, DCC++ will send this command automatically: <a 50 1 0>

    Just to give another example:

    Addresses starting at 257 looks like this:

    257 = 65,0
    258 = 65,1
    259 = 65,2
    260 = 65,3

    So you can see how you either have distinct address for multiple outputs on what really is the same device, or you can control the device and ports with a address, subaddress scheme. So..

    <T 50 65 2> Assign ID 50 to Address 259 aka address 65 subaddress 2
    <T 50 1> throw it (same as <a 50 1 1>)
    <T 50 0> close it (same as <a 50 1 0>)

    If you save these to EEPROM with the <E> command, JMRI will see them and load them from there when it boots. That part is up to you. Like I said before, a lot of people only just setup the table in JMRI and let it do it. It is just a subtle difference. And just remember that JMRI uses the linear 1 part addressing and converts it when it sends the command. So if you are never going to use the DCC++ serial commands, then you would just do it through JMRI the JMRI way.
     
  3. rposener8#gmail.com

    rposener8#gmail.com New Member

    3
    0
    3
    A BIG THANK YOU for your extremely helpful and detailed reply. I was beginning to despair that I would get a reply from anyone.
    There is much in your reply for me to try.
    Thanks and regards
     
  4. FlightRisk

    FlightRisk TrainBoard Member

    548
    237
    14
    You are welcome. I don't think my link got appended about to go to one of the many online c++ compilers like this http://cpp.sh/. You don't have to be a programmer to stick my calculator code above in between the braces under "main". Or just do it however it works for you. I think I will write a calculator for people and post it somewhere. We intend to add a function to allow people to enter it into DCC++ EX whichever way they want.
     
  5. rposener8#gmail.com

    rposener8#gmail.com New Member

    3
    0
    3
    That sounds like a good idea to me.
    I used to be a C++ (amongst others) programmer in my day, so I didn't quibble about the missing link.
     

Share This Page