TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker and becoming a Supporting Member. For more info: Support TMC

Log Parsing tool available

Discussion in 'Roadster: Technical' started by scott451, May 1, 2010.

  1. scott451

    scott451 KWH-PWR#1349Sprt,S Sig#96

    Joined:
    Apr 2, 2009
    Messages:
    251
    Location:
    Palo Alto
    #41 scott451, Jun 21, 2011
    Last edited: Jun 21, 2011
    How about this.... Use what you've learned from Tom's doc to develop your OSX graphical log parser. Post your free program on this forum and I'll send you my source code as a reference. You can use it to improve your program, you just can't give my source code to anyone else.

    As far as the check sum goes. Here's some code to do it. Given that the first three bytes are of a record are in header[3]. The remaining bytes are in buf[]
    Code:
    //calculate checksum
        length = header[2];
        for (i=0, xsum=header[2]; i< length; i++)
    	xsum+= (unsigned)buf[i];
        xsum&=0xff;
        if(xsum)
    	{
    	fprintf(stderr,"Bad record\n");
    	continue; // Skip record
    	}
    
     
  2. S-2000 Roadster

    Joined:
    Apr 10, 2009
    Messages:
    669
    That works for me. As I mentioned, I won't be giving my source code out, either, so it will be easy for me to keep everything under wraps.

    I may eventually help Tom expand his .doc based upon anything I glean from your source, provided that's fine with you. But, admittedly, I'll be working on my graphing app before I work on the .doc
     
  3. S-2000 Roadster

    Joined:
    Apr 10, 2009
    Messages:
    669
    Traction Control button in XX03 Input Event

    I scanned my logs and learned that the 5-byte payload for the XX03 "Input Event" log entry has 0x04 for TC off and 0x84 for TC on. The remaining 4 bytes seem to carry unrelated information. This pattern is consistent everywhere the DR1S log event shows a change in state of the TC button. Note that the DR1S and XX03 events may appear in the log file in random order, but it should be obvious from the time stamp that they happen simultaneously, only they don't always make it to the log file in the same order.

    I can report other findings here unless we should have another thread for parsing discoveries.
     
  4. btown

    btown Member

    Joined:
    Jul 12, 2011
    Messages:
    47
    Location:
    Spokane
  5. tomsax

    tomsax Member

    Joined:
    Jun 19, 2008
    Messages:
    883
    Location:
    Sammamish, WA
    There are several parsers available. Look back to September in this thread to see info on my parser.

    Also, look at the thread on graphical parsers if you're not a command line junkie.
     
  6. scott451

    scott451 KWH-PWR#1349Sprt,S Sig#96

    Joined:
    Apr 2, 2009
    Messages:
    251
    Location:
    Palo Alto
    #46 scott451, Jul 19, 2011
    Last edited: Jul 19, 2011
    Sorry the web based log parser is permanently off line. I will try and post a downloadable executable this week. It's command line only, but there are versions for PC, MAC, and Linux 2.x
     
  7. TEG

    TEG TMC Moderator

    Joined:
    Aug 20, 2006
    Messages:
    20,584
    Why is that?
     
  8. scott451

    scott451 KWH-PWR#1349Sprt,S Sig#96

    Joined:
    Apr 2, 2009
    Messages:
    251
    Location:
    Palo Alto
    Because I set up the web site as a way to make my parser available but if I needed to, I could quickly turn it off. Once I released an exe, it's out there...

    Attached is the final version of my parser. No time limit.

    -Scott
     

    Attached Files:

  9. tomsax

    tomsax Member

    Joined:
    Jun 19, 2008
    Messages:
    883
    Location:
    Sammamish, WA
    I just posted a new version of my command-line-based parser that adds support for firmware versions earlier than 3.2 (prior to March, 2009), and improves support for the data aggregation that RichKae is collecting for his battery longevity study.

    VMS Log Parser for Tesla Roadster
     
  10. dhrivnak

    dhrivnak Active Member

    Joined:
    Jan 8, 2011
    Messages:
    3,728
    Location:
    NE Tennessee
    Thank you Tom for a prompt reply the log file has been set. It looks like I may have a low brick as #49 has been low for the last 600+ readings.
     
  11. tennis_trs

    tennis_trs 2010 2.0 Roadster Sport

    Joined:
    Aug 25, 2009
    Messages:
    302
    Has anyone asked Tesla whether they consider this an indication of a potential issue? They seem to have other methods of determining issues with the pack; I would think that they would use this method also if it is of real value.
     
  12. richkae

    richkae VIN587

    Joined:
    Jan 15, 2008
    Messages:
    1,917
    Have you tried some deep cycles and range charges to see if it changes?
     
  13. tomsax

    tomsax Member

    Joined:
    Jun 19, 2008
    Messages:
    883
    Location:
    Sammamish, WA
    #53 tomsax, Apr 16, 2013
    Last edited: Apr 16, 2013
    A new version of my log parser is now available with support for reading an approximation (± 0.03) of the car's Calculated Amp-hour Capacity (CAC) and a few other minor updates.

    CAC is a value that some Tesla service techs have been telling owners is the best measure of the battery pack's capacity. The CAC for a nominal new battery is 160 Ah. It seems to correlate very well with ideal range in both standard and range mode and makes for a simple, unambiguous way to compare different battery packs.

    If you'd like to compare your car to others, you can see a bunch of cars with their CAC values on the Plug In America Roadster Survey results page. If you haven't already, please consider adding your vehicle info and CAC to the survey.
     
  14. dhrivnak

    dhrivnak Active Member

    Joined:
    Jan 8, 2011
    Messages:
    3,728
    Location:
    NE Tennessee
    Yes I have asked two different rangers and I am told the car passes the "bleed test" with no issues. To be fair from what I can tell while the one brick is low it is not much different than the others. While my battery pack is on the low side "176 ideal miles" it does not appear to be abnormally low.
     
  15. tomsax

    tomsax Member

    Joined:
    Jun 19, 2008
    Messages:
    883
    Location:
    Sammamish, WA
    Version 1.1.4

    Version 1.1.3 of my parser is now available for Mac OS X and Windows.

    • show odometer to tenths in drive/charge summary
    • use the odometer for drive segment distance in more cases, less use of integration
    • better detection of start/end when a charge and drive segment are very close
    • fix formatting error in Ah out for drive segments
    • allow larger gaps between valid timestamps (5 days -> 30 days)
    • add approximate CAC to output for DAY records
     
  16. supersnoop

    supersnoop Tesla Roadster #334

    Joined:
    Mar 24, 2014
    Messages:
    1,101
    Location:
    Pflugerville
    I've been trying to read errors from the log file with the "-r ERR" command, but it never produces any results. Is there some other way to check if error records are stored in the log?

    I'm also curious if there's any way to calculate the CAC for each brick, rather than just the lowest. My lowest brick has dropped significantly in the last few months, and I'm trying to determine if it's a single failing brick, or the whole battery.
     
  17. tomsax

    tomsax Member

    Joined:
    Jun 19, 2008
    Messages:
    883
    Location:
    Sammamish, WA
    The ERR records are in the permanent section, so you have to specify the -p flag as well as -r ERR.

    The DAY records show the CAC, the average brick Ah, the minimum brick Ah, and the brick number of that weakest brick. The DAY records are also in the permanent section, so put -p -r DAY on the command line.

    Make sure you are using the latest version, 1.1.3, to get all of the data from the DAY records. You can download the latest version from the VMSParser page.
     
  18. tvuolo

    tvuolo Supporting Member

    Joined:
    Sep 8, 2013
    Messages:
    275
    Location:
    Colorado
    Hi, I have some VMSParser and battery questions.

    Is there any way to see the ideal miles after a charge using VMSParser? I forgot to note it, and it's too long gone to pull from the OVMS server.

    I see this from the log after a range charge with top-off - using VMSParser -c:
    08/28/2015 23:26:32 | 1440825992 | IDLE | range soc = 96% ESS 21.07C - 22.35C, 4.137V min, 4.171V max, 81 brick min V, 30 brick max V
    08/29/2015 07:46:25 | 1440855985 | IDLE | range soc = 94% ESS 19.27C - 20.85C, 4.132V min, 4.176V max, 81 brick min V, 0 brick max V

    Using VMSParser -u:

    08/28/2015 19:41:22 - 08/28/2015 23:25:32 (03:44:10) Charge 57% -> 96% 241V 40A of 70A 29.6 kWh 59.1 Ah 0.0 Ah
    08/29/2015 07:08:38 - 08/29/2015 07:45:39 (00:37:01) Charge 92% -> 94% 247V 31A of 70A 2.5 kWh 3.3 Ah 0.0 Ah

    Why does it say 96% SOC at the end of a range charge? Shouldn't that be 100%? Or does that mean I've lost 4%?

    Why does the top-off stop at 94% instead of going to 96% or 100%?

    Thanks!
     
  19. tomsax

    tomsax Member

    Joined:
    Jun 19, 2008
    Messages:
    883
    Location:
    Sammamish, WA
    We haven't found the ideal miles number in the logs.

    The state-of-charge percent shown corresponds to what you see on the battery graphic in Range mode on the touch screen. For whatever reason, that doesn't show 100% and never has in our Roadster even when it was new. It can show 100% immediately after a charge, but then drops after it's done settling and calculated a more accurate state of charge. The same settling happens after a drive segment.

    I wouldn't attach a lot of meaning to the 96%. The CAC is a better measure of your pack's capacity. That gets recorded every day in the long-term section of the log file. To extract those values:

    VMSParser -p -r DAY your-log-file.tar

    Add -t and redirect to a file to get a tab-delimited version you can load into a spreadsheet or other graphing program.

    VMSParser -pt -r DAY your-log-file.tar > output.txt

    If you have logging enabled in OVMS, that goes back a long ways, over 600 drive and change segments on our Roadster, and that does record the ideal miles at the start and end of every charge, although it does record the value immediately after charging/driving, not the value after the 10-minute settling period.
     
  20. tomsax

    tomsax Member

    Joined:
    Jun 19, 2008
    Messages:
    883
    Location:
    Sammamish, WA
    VMSParser 1.1.5 is now available with these minor updates:
    • note when a charge or drive segment crosses a daylight saving time transition
    • add example to show how to extract records from permanent section (-p)
    • add CAC to output for battery data summary (-b)
     

Share This Page

  • About Us

    Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.
  • Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.


    SUPPORT TMC