308 error / bachmann econami n scale /solved

craftech Mar 19, 2021

  1. craftech

    craftech TrainBoard Member

    40
    2
    16
    After trying and failing to get my arduino uno and motor shield with JMRI and DCC++ to read and write CV's this solution from Marty_G worked for me:
    ====================================================================
    "In an earlier thread around modifying PacketRegister.h I am the fellow relaying the story where I had purchased a new SoundTraxx Tsunami steam decoder (TSU 2200, 884007) and could not get it to read or write. Since then I purchased the Soundtraxx CurrentKeeper product but had not tried to read or write CVs. After reading your note I tested to see if I could still read/write with the CurrentKeeper installed. I am using the DCCpp controller Processing app, modified by Geoff Bunza, and in my case I can read and write on the programming track and write on the ops track. I did go back and look at the PacketResgister.h settings and discovered my settings are different from the base code on github.

    To the best of my knowledge these are the settings from github:
    #define ACK_BASE_COUNT 100
    #define ACK_SAMPLE_COUNT 500
    #define ACK_SAMPLE_SMOOTHING 0.2
    #define ACK_SAMPLE_THRESHOLD 30

    These are the settings that are working well for me:
    #define ACK_BASE_COUNT 100
    #define ACK_SAMPLE_COUNT 250
    #define ACK_SAMPLE_SMOOTHING 0.2
    #define ACK_SAMPLE_THRESHOLD 5

    Good luck!

    Marty"
    ========================================================================
    After I changed it in the arduino software and uploaded it to the arduino, it now works as it should using Decoder Pro to read and write.

    John
     
  2. Sumner

    Sumner TrainBoard Member

    1,299
    1,593
    30
    Just to be clear are you using the original DCC++ or the new DCC++ Classic or DCC++EX?

    If you are using the original I'd strongly encourage you to update with one of the newer versions....

    https://dcc-ex.com/

    Sumner
     
  3. craftech

    craftech TrainBoard Member

    40
    2
    16
    DCC++ BASE STATION
    COPYRIGHT (c) 2013-2016 Gregg E. Berman

    If I install one of the others do I just install it over the top of that one. Does it keep my settings?
    Thanks,
    John
     
  4. Sumner

    Sumner TrainBoard Member

    1,299
    1,593
    30
    Which setting are you talking about. If it is decoder and/or roster settings using JMRI with a computer they would still be on the computer. If the settings are a change to the original DCC++ sketch then yes those would be gone but you should have a copy of that sketch should you ever want to put it back on the Arduino.

    If you use the 'installer' ( https://dcc-ex.com/download/commandstation.html#exinstaller ) to load the sketch it should put the new version on and delete the old one. I've had far fewer 308 errors using the new versions vs. Gregg's original version (still big thanks to Gregg getting this going in the first place).

    The only 308 error I've had with the new version was caused by my programming track being dirty and once it was cleaned the problem went away.

    There are also posts here that talk about adding a filed called "mySetup.h" that might be a solution if you are still having problems. Check FlightRisk's Feb 24,2012 post here....

    https://www.trainboard.com/highball/index.php?threads/dcc-ex-programming-track.136531/#post-1171567

    Sumner
     
    Last edited: Mar 20, 2021
  5. FlightRisk

    FlightRisk TrainBoard Member

    508
    198
    11
    There are diagnostics built into DCC-EX to help find any issues with reading and writing CVs. The code is much faster. And since EX looks for ACKs in between packets, it doesn't miss them which is an issue with Classic.

    Settings and the code are very different ( there is no packetregister.cpp file for one), you won't need your modifications with ex. If you need to override something, like sensitivity, or an option like starting with track power on, we can show you how to put that in your mySetup.h file. So back up your old version and start fresh. Any updates won't touch your config.h or mySetup.h from now on. Any turnouts or things you have now in EEPROM will be preserved.

    First thing to do after installing EX is to put your loco on the track, and from the serial monitor, just type "<R>". That should report your loco ID and give us diag information if it doesn't. We have seen several decoders now that aren't even close to being in spec with the NMRA standard, which can be frustrating.
     
  6. Mark Ricci

    Mark Ricci TrainBoard Member

    262
    192
    6
    Have a BLI N scale F3 with Paragon 3 decoder and error 308 occurs when attempting to either read or write CVs when using JMRI. Would the same fix apply to any brand loco including BLI Paragon 3? Thank you.
     
  7. FlightRisk

    FlightRisk TrainBoard Member

    508
    198
    11
    We are trying to put together notes for each decoder we find that is out of spec. I know the BLI / QSI decoders need a lot of workarounds. I'll check on the Paragon 3. But testing in on the programming track with sending <D ACK ON> and the <R> will give us the log info we need. I know on the QSI version we had to set the "MAX" to 13000 since its ACK pulses were so long.
     
    Mark Ricci likes this.
  8. Mark Ricci

    Mark Ricci TrainBoard Member

    262
    192
    6
    Thank you for the help. Definitely will get log to you. Forgot to mention Atlas ESU select decoder programmed with seemingly no issue.
     
    FlightRisk likes this.
  9. wbcbud

    wbcbud New Member

    3
    1
    1
     
    Mark Ricci likes this.
  10. FlightRisk

    FlightRisk TrainBoard Member

    508
    198
    11
    Just a reminder that the copied text above is for very old code. DCC++ EX had a completely different method for reading and writing CVs and has diagnostics to determine what a decoder is reporting. The idea is to NEVER have to go into the DCC++ EX code. If settings need to be changed, that can all be done in configuration settings.

    It has been a bit shocking to see how poor quality many decoders are. Some are not even close to NMRA specifications. Trying to develop workarounds for decoders that are supposed to adhere to a standard but do not is frustrating. The biggest issue is poor acknowledgment in programming mode. How do they get by releasing equipment that doesn't work? I guess no one has taken the time to measure their ACK responses until now.
     
    Sumner and Mark Ricci like this.
  11. BigJake

    BigJake TrainBoard Member

    1,211
    1,146
    29
    And all the systems having (for marketing reasons) to work with out-of-spec decoders just muddies the water as to what the spec is, in practical terms.

    Whether this was due to ambiguities in the DCC spec (poor specmanship), or whatever, it is what it is. Folks don't want to be told their new locomotive's decoder is out of spec by some DCC systems purveyors, so everybody had to pollute the real-world "spec" to accommodate the outliers. SPROG has a few "compatibility mode" settings for exactly this crap.
     
    Mark Ricci likes this.
  12. FlightRisk

    FlightRisk TrainBoard Member

    508
    198
    11
    Welcome to my world ;)
     
    Mark Ricci likes this.
  13. Mark Ricci

    Mark Ricci TrainBoard Member

    262
    192
    6
    The Log file you requested....
    <* LCD0:DCC++ EX v3.1.3 *>
    <* LCD1:Starting *>
    <* ++ Wifi Setup Try 1 ++ *>
    <* Wifi Check: [+IPD\0] *>
    <* TIMEOUT after 200ms *>
    <* Wifi Check: [\r\nOK\r\n\0] *>
    <* TIMEOUT after 200ms *>
    <* ++ Wifi Setup NO AT ++ *>
    <* ++ Wifi Setup Try 2 ++ *>
    <* Wifi Check: [+IPD\0] *>
    <* TIMEOUT after 200ms *>
    <* Wifi Check: [\r\nOK\r\n\0] *>
    <* TIMEOUT after 200ms *>
    <* ++ Wifi Setup NO AT ++ *>
    <* ++ Wifi Setup Try 3 ++ *>
    <* Wifi Check: [+IPD\0] *>
    <* TIMEOUT after 200ms *>
    <* Wifi Check: [\r\nOK\r\n\0] *>
    <* TIMEOUT after 200ms *>
    <* ++ Wifi Setup NO AT ++ *>
    <* MotorDriver currentPin=A1, senseOffset=0, rawCurentTripValue(relative to offset)=668 *>
    <* MotorDriver currentPin=A0, senseOffset=0, rawCurentTripValue(relative to offset)=668 *>
    <iDCC-EX V-3.1.3 / MEGA / STANDARD_MOTOR_SHIELD G-a473f6a>
    <* Signal pin config: high accuracy waveform *>
    <* LCD1:Ready *>
    <* LCD2:Free RAM= 6290b *>
    <* LCD2:Free RAM= 6244b *>
    Ack diag on
    <* Auto Prog power on *>
    <* ACK baseline=3/8mA Threshold=23/68mA Duration between 4000us and 8500us *>
    <* VB cv=19 value=0 *>
    <* LCD2:Free RAM= 6221b *>
    <* NO-ACK after 148mS max=65/194mA pulse=10440uS samples=158 gaps=0 *>
    <* VB cv=19 value=128 *>
    <* NO-ACK after 148mS max=3/8mA pulse=0uS samples=146 gaps=0 *>
    <* V0 cv=19 bit=7 *>
    <* NO-ACK after 144mS max=66/197mA pulse=10556uS samples=75 gaps=0 *>
    <* V0 cv=19 bit=6 *>
    <* NO-ACK after 147mS max=66/197mA pulse=10440uS samples=111 gaps=1 *>
    <* V0 cv=19 bit=5 *>
    <* NO-ACK after 144mS max=63/188mA pulse=10560uS samples=75 gaps=0 *>
    <* V0 cv=19 bit=4 *>
    <* NO-ACK after 147mS max=61/182mA pulse=10440uS samples=111 gaps=0 *>
    <* V0 cv=19 bit=3 *>
    <* NO-ACK after 145mS max=63/188mA pulse=10092uS samples=111 gaps=1 *>
    <* V0 cv=19 bit=2 *>
    <* NO-ACK after 148mS max=71/212mA pulse=10672uS samples=147 gaps=0 *>
    <* LCD2:Free RAM= 6220b *>
    <* V0 cv=19 bit=1 *>
    <* NO-ACK after 147mS max=75/224mA pulse=10440uS samples=111 gaps=1 *>
    <* V0 cv=19 bit=0 *>
    <* NO-ACK after 149mS max=67/200mA pulse=10324uS samples=146 gaps=0 *>
    <* VB cv=19 value=255 *>
    <* NO-ACK after 142mS max=6/17mA pulse=0uS samples=39 gaps=0 *>
    <* V0 cv=29 bit=5 *>
    <* NO-ACK after 147mS max=67/200mA pulse=10556uS samples=111 gaps=0 *>
    <* V0 cv=17 bit=7 *>
    <* NO-ACK after 144mS max=4/11mA pulse=0uS samples=74 gaps=0 *>
    <* V0 cv=17 bit=6 *>
    <* NO-ACK after 146mS max=1/2mA pulse=0uS samples=111 gaps=0 *>
    <* V0 cv=17 bit=5 *>
    <* NO-ACK after 147mS max=62/185mA pulse=10440uS samples=112 gaps=0 *>
    <* V0 cv=17 bit=4 *>
    <* NO-ACK after 148mS max=67/200mA pulse=10672uS samples=147 gaps=0 *>
    <* V0 cv=17 bit=3 *>
    <* NO-ACK after 146mS max=71/212mA pulse=10208uS samples=111 gaps=0 *>
    <* V0 cv=17 bit=2 *>
    <* NO-ACK after 149mS max=66/197mA pulse=10324uS samples=148 gaps=0 *>
    <* V0 cv=17 bit=1 *>
    <* ACK after 84mS max=76/227mA pulse=7948uS samples=177 gaps=2 *>
    <* V0 cv=17 bit=0 *>
    <* NO-ACK after 151mS max=75/224mA pulse=10672uS samples=184 gaps=1 *>
    <* VB cv=17 value=253 *>
    <* NO-ACK after 145mS max=4/11mA pulse=0uS samples=75 gaps=0 *>
    <* Auto Prog power off *>
    <* Callback(-1) *>
    <r -1>

    Also have log from JMRI DCC ++ Traffic Manager run right before Serial Monitor output above
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024
    Prog Read Cmd: CV: 1, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 1, Value: -1
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024
    Prog Read Cmd: CV: 1, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 1, Value: -1
    Prog Read Cmd: CV: 29, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 29, Value: -1
    Prog Read Cmd: CV: 29, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 29, Value: -1
    Prog Read Cmd: CV: 17, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 17, Value: -1
    Status Cmd
    Power Status: OFF
    Status:Station: DCC-EX, Build: a473f6a, Version: 3.1.3
    Prog Read Cmd: CV: 18, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 18, Value: -1
    Prog Read Cmd: CV: 19, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 19, Value: -1
    Prog Read Cmd: CV: 19, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 19, Value: -1
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024
    Prog Read Cmd: CV: 8, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 8, Value: -1
    Prog Read Cmd: CV: 8, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 8, Value: -1
    Prog Read Cmd: CV: 7, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 7, Value: -1
    Prog Read Cmd: CV: 7, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 7, Value: -1
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024
    Status Cmd
    Power Status: OFF
    Status:Station: DCC-EX, Build: a473f6a, Version: 3.1.3
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00

    Any input greatly appreciated,
     
  14. FlightRisk

    FlightRisk TrainBoard Member

    508
    198
    11
    Yes, as I thought. Way out of spec on the ACK pulse duration. The standard maximum duration of a pulse is 6000us. We allow 8500us because we have to to catch some decoders but don't like slowing down page reads by making it any bigger unless we have to. This decoder has every pulse over 10,500us! Oh well. This should fix you:

    From the Serial Monitor enter <D ACK MAX 10700>, then try your test again. If you reset the Arduino or open a serial monitor again after you do this (which automatically resets the Arduino), it will forget the command. You can make it permanent like this:

    1. Open a text editor like notepad, notepad++, etc. and add the line:

    Code:
    SETUP("<D ACK MAX 10700>");
    2. Remember the semicolon at the end. Save the file as "mySetup.h" in the folder with all your other sketch files
    3. Compile and upload the sketch again to the CS.

    Fred
    DCC-EX
     
    BigJake and Mark Ricci like this.
  15. Mark Ricci

    Mark Ricci TrainBoard Member

    262
    192
    6
    Thank you for the info. At 10500uS, presumably this significantly higher pulse duration requirement is a "defect" of all Paragon 3 decoders and does not materially vary from 1 Paragon 3 decoder to another Paragon 3 decoder? Expressed another way, are there any other variables outside the decoder electronics that can influence the decoders response? Would not think base station HW as error 308 same regardless using DIY or Deek Robot shields on different Megas and DCC++EX versions.

    At any rate, had some issues with using the IDE method to install on my development computer. Specifically serial monitor outputting "garbage" however when base is connected to another PC (slower and less RAM), serial monitor reads normally. Interestingly, just finished Elegoo Mega Ultimate starter kit and IDE + serial monitor worked flawlessly on development PC. The test DCC++EX base numbers above were from a 3.1 automated installer setup obtained from slower PC. Going to wipe base station, re-download 3.1 and retry IDE method in order to add mysetup.h. Also, probably will try later today for fun (I'm an Arduino newbie), curious, is there a way using IDE to read sketch off Arduino, regardless of whether it was installed via automated or via IDE, on a different computer?

    Thank you.
     
    Sumner likes this.
  16. Mark Ricci

    Mark Ricci TrainBoard Member

    262
    192
    6
    Hi Fred,

    Think progress is being made... Thank you!

    Serial Monitor
    Ack diag on
    <* Auto Prog power on *>
    <* ACK baseline=3/8mA Threshold=23/68mA Duration between 4000us and 10700us *>
    <* VB cv=19 value=0 *>
    <* LCD2:Free RAM= 3587b *>
    <* ACK after 67mS max=69/206mA pulse=10324uS samples=239 gaps=1 *>
    <* V0 cv=29 bit=5 *>
    <* ACK after 28mS max=76/227mA pulse=10672uS samples=67 gaps=0 *>
    <* V0 cv=1 bit=6 *>
    <* ACK after 29mS max=63/188mA pulse=10560uS samples=67 gaps=0 *>
    <* V0 cv=1 bit=5 *>
    <* ACK after 67mS max=69/206mA pulse=10556uS samples=224 gaps=0 *>
    <* LCD2:Free RAM= 3586b *>
    <* V0 cv=1 bit=4 *>
    <* ACK after 29mS max=70/209mA pulse=10676uS samples=73 gaps=0 *>
    <* V0 cv=1 bit=3 *>
    <* ACK after 30mS max=71/212mA pulse=10560uS samples=68 gaps=0 *>
    <* V0 cv=1 bit=2 *>
    <* ACK after 30mS max=65/194mA pulse=10552uS samples=74 gaps=0 *>
    <* V0 cv=1 bit=1 *>
    <* NO-ACK after 149mS max=12/35mA pulse=0uS samples=149 gaps=0 *>
    <* V0 cv=1 bit=0 *>
    <* NO-ACK after 151mS max=2/5mA pulse=0uS samples=183 gaps=0 *>
    <* VB cv=1 value=3 *>
    <* ACK after 30mS max=60/179mA pulse=10560uS samples=76 gaps=0 *>
    <* Auto Prog power off *>
    <* Callback(3) *>
    <r 3>

    Opened JMRI Decoder pro and started DCC ++Traffic MGR.. As expected loco moves about 4" when reading basic sheet in JMRI, anyway...
    Read BASIC sheet. There were errors however, out of 7 tests, only once it appeared to not recover and complete "OK" when either a 308 error occurred or unable to read a CV. Also, cannot confirm whether it was the always the same CV, though 8 seemed to be one that comes to mind more than others but cannot confirm without additional testing. Do you recommend increasing current <D ACK MAX 10700> ?


    Tests are shown below...

    1st Run
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024
    Prog Read Cmd: CV: 1, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 1, Value: 3
    Prog Read Cmd: CV: 29, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 29, Value: 6
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Prog Read Cmd: CV: 17, Callback Num: 0, Callback Sub: 82
    Current: 0 / 1024
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 17, Value: 192
    Prog Read Cmd: CV: 18, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 18, Value: 128
    Prog Read Cmd: CV: 19, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 19, Value: 0
    Prog Read Cmd: CV: 8, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 8, Value: -1
    Prog Read Cmd: CV: 8, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 8, Value: 38
    Prog Read Cmd: CV: 7, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 7, Value: 6
    Status Cmd
    Power Status: OFF
    Status:Station: DCC-EX, Build: 4a2513d, Version: 3.1.0
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024

    Fifth Time Run
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024
    Prog Read Cmd: CV: 1, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 1, Value: 3
    Prog Read Cmd: CV: 29, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 29, Value: 6
    Prog Read Cmd: CV: 17, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 17, Value: 192
    Prog Read Cmd: CV: 18, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 18, Value: 128
    Prog Read Cmd: CV: 19, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 19, Value: 0
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Prog Read Cmd: CV: 8, Callback Num: 0, Callback Sub: 82
    Current: 0 / 1024
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 8, Value: 38
    Prog Read Cmd: CV: 7, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 7, Value: -1
    Status Cmd
    Power Status: OFF
    Status:Station: DCC-EX, Build: 4a2513d, Version: 3.1.0
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024

    Sixth Run
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024
    Prog Read Cmd: CV: 1, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 1, Value: 3
    Prog Read Cmd: CV: 29, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 29, Value: 6
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Prog Read Cmd: CV: 17, Callback Num: 0, Callback Sub: 82
    Current: 0 / 1024
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 17, Value: 192
    Prog Read Cmd: CV: 18, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 18, Value: 128
    Prog Read Cmd: CV: 19, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 19, Value: -1
    Prog Read Cmd: CV: 19, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 19, Value: 0
    Prog Read Cmd: CV: 8, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 8, Value: 38
    Prog Read Cmd: CV: 7, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 7, Value: 6
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024
    Status Cmd
    Power Status: OFF
    Status:Station: DCC-EX, Build: 4a2513d, Version: 3.1.0
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024

    7th Run
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024
    Prog Read Cmd: CV: 1, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 1, Value: 3
    Prog Read Cmd: CV: 29, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 29, Value: -1
    Status Cmd
    Power Status: OFF
    Status:Station: DCC-EX, Build: 4a2513d, Version: 3.1.0
    Prog Read Cmd: CV: 17, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 17, Value: 192
    Prog Read Cmd: CV: 18, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 18, Value: 128
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Prog Read Cmd: CV: 19, Callback Num: 0, Callback Sub: 82
    Current: 0 / 1024
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 19, Value: 0
    Prog Read Cmd: CV: 8, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 8, Value: 38
    Prog Read Cmd: CV: 7, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 7, Value: -1
    Prog Read Cmd: CV: 7, Callback Num: 0, Callback Sub: 82
    Program Reply: Callback Num: 0, Callback Sub: 82, CV: 7, Value: 6
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024
    Status Cmd
    Power Status: OFF
    Status:Station: DCC-EX, Build: 4a2513d, Version: 3.1.0
    Read Track Current Cmd
    Meter reply: name CurrentMAIN, value 0.00, type C, unit Milli, min 0.00, max 1997.00, resolution 1.00, warn 1997.00
    Current: 0 / 1024
     
  17. FlightRisk

    FlightRisk TrainBoard Member

    508
    198
    11
    Hi Mark. Yes, it is a problem with that brand of decoder and unless the programmer (any programmer) accounts for that, they will also give an error. Nothing will fix it unless the manufacturer updated the firmware, or possibly even fixed something in their hardware. There may be some command stations or programmers that themselves don't adhere to the spec, for example very slow ones. They possibly could work with these decoders too, you never know. There are decoders out there with worse problems than these though, so don't feel bad ;)

    You could bump that 10700 up to 10800 and see if there was an occasional outlier that went above 10700. But unless you can catch a test with the serial monitor log running with D ACK ON, you would be guessing if that is the issue. It could be several other things. It did seem to at least be very consistent though of having pulses all above 10000. But if you can get through a page most of the time, then the other kinds errors like a decoder that doesn't send an ACK for certain CVs is not one you have to worry about.

    The Arduino Serial Monitor has to be set for 115,200 baud and to have the dropdown that says what line endings to add set to both line feeds and carriage returns "BOTH NL & CR". Whenever you see garbage characters in the display, it is almost always a mismatched baud rate. The computer that worked probably just had the defaults in the lower right corner of the serial monitor set correctly and your other computer didn't.

    No, there is no way to download anything usable from the Arduino. The programming process takes human readable text representing C++ code and compiles it into a binary file. There is a makefile and compiling with the AVR-GCC. That file then gets uploaded to memory in the Arduino with something called AVRDUDE. While it would be technically possible to extract that data from an Arduino, to, for example clone a chip, you would not be able to read those instructions. The "source" for the code is gone and it is just a bunch of 1's and 0's, that at best, could be disassembled into Assembly Language and maybe even further run through utilities to try and reverse engineer some of it back to some kind of C code. If you want to be scared away from programming, turn on the "verbose" listing in the Arduino IDE and compile the code (with the checkmark. you don't have to have anything connected or upload it), and then read through the log when it is done to see all the commands it calls and what it does, step by step.

    So back to the short answer, "No", don't lose your source code files ;)
     
    Mark Ricci likes this.
  18. Mark Ricci

    Mark Ricci TrainBoard Member

    262
    192
    6
    Hi Fred,

    Thank you. I kinda figured it was issue with Paragon 3 since the Atlas ESU Select programmed perfectly. It will be interesting to see how the new Paragon 4s program via EX, especially those with the built in stay alive cap. Thank you for the support. To be perfectly honest, DCC++ EX-Arduino was the primary reason for re-entering the hobby and actually sticking with it due to some other issues outside DCC EX occurred. Was about to abandon hobby in April. The contribution that DCC++ EX has been to the hobby, IMHO, has been nothing less amazing. It has certainly re-awakened, after 20 years or so in hibernation, my electronics interest and background.

    That was definitely the big concern ? Just didn't want to, re-prog addr and the decoder goes awry when attempted. Always tried to avoid ... Maximum Smoke Minimum Signal. lol

    Sorry, that serial monitor garbage was totally senior moment and I should know better. Remember making baud rate 115k on original PC. All the tests performed on Saturday afternoon (2nd post) were done on development PC as I noticed the 9600 baud setting late Sat am when installing DCC++EX via IDE and bumping up 10700.

    Oh, wasn't asking from the backup perspective-well covered there... guess was more of whether some sort rev compiler for learning and curiosity... Turned on verbose, certainly more info but no LDA 86 (just kidding)... will continue with Arduino :)

    Thanks again for the help! Mark
     
    Sumner likes this.
  19. Ash

    Ash TrainBoard Member

    81
    34
    4
    You might find that a higher MAX value will help. I'd probably increase in increments of 500 -- my guess is there might be some values higher than what is seen in the diagnostics above.

    And additional information might be helpful. (Perhaps some has already been provided, but also making notes about the issues I've had with various decoders, motor boards, current sensing...)

    What motor board/shield are you using?

    What track power supply? Voltage and amps.

    Is your Arduino powered only by the USB? If so, do you have peripherals that could be drawing too much current from the Arduino? You have an LCD -- did you add the resistor (as it will also reduce current draw)? https://dcc-ex.com/reference/hardware/i2c-displays.html?highlight=lcd#controlling-brightness

    What is the voltage on the tracks using AC voltmeter, and <1 JOIN>?

    If not a motor shield:
    -- is the +5v pin on the motor board connected to the +5v pin on the Arduino? (to ensure that the motor board logic is powered at all times that the Arduino is)
    -- is the GND on the Arduino also connected to the -V of the track power supply?

    Also take a look at the document on the website:
    https://dcc-ex.com/reference/software/diagnostic-d-ack-command.html

    The <R> command is useful. I also like to see CV 8 and others that result in 308 errors. Note that you can see similar diagnostics on any CV.
    Example:
    <1 PROG>
    <D ACK ON>
    <R 8 1 1>

    I use <1 PROG> when using the programming track, as it avoids the auto-power on/off cycling -- improved performance when reading indexed CVs (DCC++EX v3.1.3), and might provide higher reliability if you have keep-alives -- maintains the charged state of the capacitors.

    These commands can also be sent in JMRI, using the 'Send DCC++ Command' dialog box.

    In JMRI, I also find it useful to check the boxes to show time and raw commands. (Time is useful when doing performance metrics. Raw commands are helpful, in case I want to try the command from the Arduino serial monitor, and can be easier to use when scanning a long listing.)

    What version of JMRI? I am using JMRI 4.23.5 (or higher). Upgrading may not be needed for using DCC++EX v3.1.3 to resolve your 308 errors. With some prior versions, the DCC++ traffic monitor window may display commands differently, and JMRI may not utilize the verify command when reading CVs.
     
    Mark Ricci likes this.
  20. Ash

    Ash TrainBoard Member

    81
    34
    4
    I also noticed that the mA readings are lower than some I've experienced. You might see if a lower ACK LIMIT will make a difference in reliability for this decoder.
    try: <D ACK LIMIT 50>
    or, <D ACK LIMIT 40>
     
    Mark Ricci likes this.

Share This Page