Well, my coding skills have not improved over the years.....
I have done in a week what it takes mere mortals to do in a day
Anyway, I now have both battery health (post from above with all cell voltages and temps along with BatV and BatI) and performance logging up in running. Below is a some edited down for space data. The sample rate continues at the rate shown for the whole log run. For testing, I have the TPS threshold for logging set at 26.4% and was capturing 2 seconds of data once TPS drops below the threshold. There is simply too much data to try to do a running FIFO so as to capture Pre-TPSThreashold data
That said, even stomping on the pedal as quickly as you can still yields multiple TPS values prior to any change power being delivered to the motors. This will capture all meaningful data for launches as well as roll on runs although I may have to tweak it for Launch Mode.
The logic goes like this-
Plug it into the diagnostic connector behind the Tesla cubby hole and the logger finds the end of the current log file and sets up to record
Exceed TPS Threshold and the logger will record all available CAN frames containing the values listed below
Once TPS drops below the Threshold, the logger will log a set number of seconds worth of data (currently set for two seconds) to capture wind down or regen data
Once the above number of records are recorded, the logger switches over and captures SoC (and soon to add BatT) and adds it as the last line in the log session record.
Repeat.....
I'm going to add one of the battery temps to the SoC recorded at the end of each data set as it would be good to know both SoC and battery temperature for a particular run. I'm also planning on showing up at PBIR at the end of the month to log all the drag runs.
Lastly, I'll get the switch on the unit to determine which mode (battery health or performance) the logger is currently running in so one device can do both without a firmware change.
Time .....TPS ...Speed ....R_Tq ...F_Tq ...BatV ....BatI .....Pwr
0070.56 026.4 +014.15 +100.8 +001.1 366.20 -0100.9 036.9
0070.57 026.4 +014.20 +101.9 +001.1 366.08 -0105.9 038.7
0070.58 026.4 +014.25 +101.4 +001.1 366.33 -0101.3 037.1
0070.59 026.8 +014.30 +102.3 +000.9 366.20 -0107.1 039.2
0070.60 026.8 +014.35 +101.9 +001.1 366.08 -0103.8 037.9
0070.61 027.2 +014.35 +102.3 +001.1 365.95 -0105.3 038.5
0070.62 027.2 +014.40 +102.8 +000.9 365.83 -0107.5 039.3
0070.63 027.2 +014.45 +103.0 +000.9 366.20 -0104.4 038.2
0070.64 027.2 +014.50 +104.5 +000.9 365.83 -0111.1 040.6
0070.65 027.6 +014.55 +104.3 +000.9 365.33 -0107.3 039.1
Records deleted for space
0076.12 016.4 +033.70 +016.9 +000.0 369.26 -0038.3 014.1
0076.13 016.4 +033.70 +017.1 +000.0 369.37 -0038.6 014.2
0076.14 016.4 +033.70 +017.1 +000.0 369.23 -0037.3 013.7
0076.15 016.4 +033.70 +016.9 +000.0 369.11 -0036.7 013.5
0076.16 016.4 +033.70 +016.5 +000.0 369.60 -0036.9 013.6
0076.17 016.4 +033.70 +016.2 +000.0 369.59 -0035.8 013.2
0076.18 016.4 +033.70 +016.0 +000.0 369.47 -0035.8 013.2
0076.19 016.4 +033.70 +015.6 +000.0 369.34 -0036.5 013.4
0076.20 016.0 +033.70 +015.1 +000.0 369.72 -0035.6 013.1
SoC 074.1
0084.19 026.4 +033.65 +050.1 +000.0 366.36 -0096.4 035.3
0084.20 027.2 +033.65 +053.2 +000.0 365.62 -0101.8 037.2
0084.21 027.6 +033.65 +055.8 +000.0 365.60 -0106.1 038.7
0084.22 028.0 +033.70 +056.4 +000.0 365.23 -0113.5 041.4
0084.23 028.0 +033.70 +059.3 +000.0 364.73 -0117.1 042.7
0084.24 028.4 +033.70 +060.1 +000.0 364.60 -0124.1 045.2
0084.25 028.8 +033.75 +061.2 +000.0 364.09 -0128.7 046.8
0084.26 029.2 +033.75 +063.7 +000.0 363.46 -0135.9 049.3
0084.27 029.6 +033.75 +066.0 +000.0 362.96 -0144.1 052.3
0084.28 029.6 +033.80 +068.4 +000.0 363.09 -0148.3 053.8
Records deleted for space
0087.70 009.6 +041.20 -008.6 +000.0 372.74 +0014.4 005.3
0087.71 009.6 +041.20 -008.8 +000.0 372.77 +0014.2 005.2
0087.72 009.6 +041.20 -008.8 +000.0 372.62 +0015.9 005.9
0087.73 009.6 +041.20 -009.0 +000.0 372.87 +0014.4 005.3
0087.74 009.6 +041.20 -009.7 +000.0 372.74 +0016.5 006.1
0087.75 009.6 +041.20 -010.6 +000.0 372.61 +0017.8 006.6
0087.77 009.6 +041.20 -011.2 +000.0 372.99 +0016.1 006.0
0087.78 009.6 +041.15 -011.9 +000.0 372.87 +0018.6 006.9
0087.79 009.6 +041.15 -012.3 +000.0 372.61 +0018.4 006.8
0087.80 009.6 +041.15 -012.3 +000.0 372.86 +0017.6 006.5
SoC 074.0
0097.33 027.2 +030.35 +054.9 +000.0 365.45 -0113.7 041.5
0097.34 027.6 +030.35 +054.9 +000.0 365.19 -0118.8 043.3
0097.35 028.0 +030.35 +055.8 +000.0 364.83 -0124.6 045.4
0097.36 028.4 +030.40 +059.3 +000.0 364.31 -0130.8 047.6
0097.37 029.2 +030.40 +066.7 +000.0 363.31 -0139.1 050.5
0097.38 029.6 +030.45 +074.4 +000.0 362.81 -0148.4 053.8
0097.39 030.0 +030.45 +080.2 +000.0 362.68 -0156.7 056.8
0097.40 030.4 +030.45 +083.5 +000.0 362.43 -0161.4 058.4
0097.41 030.4 +030.50 +085.0 +000.0 362.31 -0161.6 058.5
0097.42 030.8 +030.55 +085.9 +000.0 361.56 -0168.7 060.9
Records deleted for space
0100.35 008.4 +037.15 -016.0 +000.0 373.63 +0024.1 009.0
0100.36 008.0 +037.15 -016.4 +000.0 373.76 +0021.3 007.9
0100.37 008.0 +037.15 -017.8 +000.0 373.25 +0026.1 009.7
0100.38 008.0 +037.15 -019.7 +000.0 373.76 +0024.2 009.0
0100.39 008.0 +037.10 -019.9 +000.0 373.50 +0025.6 009.5
0100.40 008.0 +037.10 -019.7 +000.0 373.49 +0025.1 009.3
0100.41 008.0 +037.10 -019.1 +000.0 373.86 +0024.6 009.1
0100.42 008.0 +037.05 -018.0 +000.0 372.98 +0025.6 009.5
0100.43 008.0 +037.05 -017.1 +000.0 373.85 +0024.3 009.0
0100.44 007.6 +037.05 -017.1 +000.0 373.46 +0027.6 010.3
SoC 074.0
0137.77 026.4 +014.25 +103.2 -000.1 366.26 -0104.6 038.3
0137.78 026.4 +014.25 +103.6 -000.1 366.01 -0104.8 038.3
0137.79 026.4 +014.30 +104.1 -000.1 366.13 -0102.8 037.6
0137.80 026.4 +014.35 +105.1 -000.1 365.89 -0107.6 039.3
0137.81 026.4 +014.40 +104.3 -000.1 366.01 -0102.5 037.5
0137.82 026.4 +014.45 +104.7 -000.1 365.99 -0107.9 039.4
0137.83 026.4 +014.50 +104.3 -000.1 365.74 -0104.5 038.2
0137.84 026.4 +014.50 +103.8 -000.1 365.99 -0104.5 038.2
0137.85 026.4 +014.55 +104.1 -000.1 365.61 -0107.9 039.4
0137.86 026.4 +014.60 +103.9 -000.1 365.86 -0109.4 040.0
0137.87 026.4 +014.65 +104.5 -000.1 365.73 -0104.1 038.0
0137.88 026.4 +014.70 +103.8 -000.1 365.84 -0106.5 038.9
0137.89 026.4 +014.70 +103.8 -000.1 365.22 -0107.4 039.2
0137.90 026.4 +014.75 +103.9 -000.1 365.97 -0103.9 038.0
0137.91 026.4 +014.80 +103.2 -000.1 365.72 -0109.8 040.1
0137.92 026.4 +014.85 +103.6 -000.1 365.84 -0105.7 038.6
0137.93 026.8 +014.90 +103.0 -000.1 365.84 -0108.1 039.5
0137.94 026.8 +014.90 +103.4 -000.1 365.48 -0109.6 040.0
0137.96 026.8 +015.00 +103.8 -000.1 365.87 -0106.4 038.9
0137.97 026.8 +015.05 +103.8 -000.1 365.74 -0112.6 041.1
0137.98 026.8 +015.10 +104.5 -000.1 365.12 -0109.0 039.7
0137.99 026.8 +015.15 +104.3 -000.1 365.62 -0109.8 040.1
0138.00 026.8 +015.15 +105.2 -000.1 365.00 -0115.1 042.0
0138.01 026.8 +015.20 +106.3 -000.1 365.51 -0110.1 040.2
0138.02 027.2 +015.25 +106.2 -000.1 365.62 -0115.3 042.1
0138.03 026.8 +015.30 +106.7 -000.1 364.87 -0114.7 041.8
0138.04 027.2 +015.35 +107.3 -000.1 365.37 -0112.5 041.1
0138.05 027.2 +015.40 +108.2 -000.1 365.24 -0119.0 043.4
0138.06 027.2 +015.45 +108.0 -000.1 364.98 -0114.7 041.8
0138.07 026.8 +015.45 +109.3 -000.1 365.23 -0116.8 042.6
0138.08 027.2 +015.50 +110.2 -000.1 364.58 -0121.2 044.1
0138.09 027.2 +015.55 +109.7 -000.1 365.08 -0115.8 042.2
0138.10 027.2 +015.60 +110.2 -000.1 365.09 -0120.7 044.0
0138.11 027.2 +015.65 +110.8 -000.1 364.71 -0121.4 044.2
0138.12 027.2 +015.70 +111.0 -000.1 364.84 -0117.7 042.9
0138.13 027.2 +015.75 +111.5 -000.1 364.58 -0124.6 045.4
0138.14 027.2 +015.80 +111.3 -000.1 364.98 -0120.2 043.8
0138.15 027.2 +015.80 +112.2 -000.1 364.61 -0127.4 046.4
0138.16 027.2 +015.85 +112.8 -000.1 364.73 -0121.8 044.4
0138.17 027.2 +015.90 +112.4 -000.1 364.73 -0122.6 044.7
0138.18 027.2 +015.95 +113.2 -000.1 364.23 -0128.2 046.6
0138.19 027.2 +016.00 +113.7 -000.1 364.60 -0123.2 044.9
0138.20 027.2 +016.05 +112.8 -000.1 364.74 -0125.9 045.9
0138.21 027.2 +016.10 +113.9 -000.1 363.85 -0129.6 047.1
0138.22 027.6 +016.15 +114.6 -000.1 364.23 -0124.4 045.3
0138.24 027.6 +016.20 +113.4 -000.1 364.48 -0127.2 046.3
0138.25 027.2 +016.25 +113.9 -000.1 364.22 -0130.7 047.6
0138.26 027.6 +016.30 +114.6 -000.1 364.48 -0125.3 045.6
0138.27 027.6 +016.35 +113.5 -000.1 364.63 -0129.2 047.1
0138.28 027.2 +016.40 +114.3 -000.1 363.47 -0132.0 047.9
0138.29 027.2 +016.45 +115.2 -000.1 364.34 -0127.5 046.4
0138.30 027.6 +016.50 +114.6 -000.1 364.34 -0131.4 047.8
0138.31 027.6 +016.55 +115.7 -000.1 363.85 -0134.5 048.9
0138.32 027.6 +016.60 +115.9 -000.1 363.71 -0129.1 046.9
0138.33 027.2 +016.65 +116.7 -000.1 364.34 -0132.3 048.2
0138.34 027.2 +016.70 +117.4 -000.1 363.70 -0136.6 049.6
0138.35 027.6 +016.75 +116.3 -000.1 363.95 -0130.8 047.6
0138.36 027.2 +016.75 +117.4 -000.1 363.93 -0132.9 048.3
0138.37 027.2 +016.80 +117.8 -000.1 363.66 -0138.1 050.2
0138.38 027.6 +016.85 +116.9 -000.1 363.80 -0132.5 048.2
0138.39 027.6 +016.90 +118.0 -000.1 363.92 -0133.3 048.5
0138.40 027.2 +016.95 +117.8 -000.1 363.68 -0139.2 050.6
0138.41 027.6 +017.00 +117.4 -000.1 363.70 -0133.5 048.5
0138.42 027.6 +017.05 +118.0 -000.1 363.95 -0139.6 050.8
0138.43 027.6 +017.10 +117.8 -000.1 363.32 -0137.4 049.9
0138.44 027.6 +017.15 +118.3 -000.1 363.81 -0133.9 048.7
0138.45 027.6 +017.15 +117.8 -000.1 363.69 -0140.1 050.9
0138.46 027.6 +017.20 +118.3 -000.1 363.42 -0141.3 051.3
0138.47 027.6 +017.25 +118.9 -000.1 363.16 -0135.7 049.2
0138.48 027.6 +017.30 +118.1 -000.1 363.56 -0138.7 050.4
0138.49 027.6 +017.35 +119.1 -000.1 363.56 -0143.9 052.3
0138.51 027.6 +017.45 +118.9 -000.1 363.20 -0138.0 050.1
0138.52 027.6 +017.50 +118.5 -000.1 363.43 -0138.2 050.2
0138.53 028.0 +017.55 +118.9 -000.1 363.56 -0144.2 052.4
0138.54 027.6 +017.60 +119.1 -000.1 363.18 -0142.9 051.8
0138.55 027.6 +017.65 +119.8 -000.1 363.31 -0139.0 050.5
0138.56 027.6 +017.70 +118.9 -000.1 363.42 -0142.1 051.6
0138.57 027.6 +017.70 +119.8 -000.1 363.18 -0146.8 053.3
0138.58 027.6 +017.75 +119.8 -000.1 362.94 -0141.5 051.3
0138.59 027.6 +017.80 +119.4 -000.1 363.43 -0140.7 051.1
0138.60 027.2 +017.85 +120.2 -000.1 363.06 -0146.4 053.1
0138.61 027.2 +017.90 +120.5 -000.1 362.81 -0146.6 053.1
0138.62 027.2 +017.95 +119.4 -000.1 363.18 -0141.3 051.3
0138.63 027.2 +018.00 +120.2 -000.1 363.18 -0143.1 051.9
0138.64 027.2 +018.05 +119.8 -000.1 363.07 -0148.6 053.9
0138.65 027.2 +018.10 +120.0 -000.1 362.82 -0144.8 052.5
0138.66 027.2 +018.15 +118.9 -000.1 363.32 -0141.6 051.4
0138.67 026.8 +018.20 +119.4 -000.1 363.32 -0144.8 052.6
0138.68 026.4 +018.20 +118.7 -000.1 362.95 -0148.3 053.8
0138.69 026.4 +018.25 +118.1 -000.1 362.97 -0141.0 051.1
0138.70 026.0 +018.30 +117.4 -000.1 363.47 -0144.1 052.3
0138.71 025.6 +018.35 +117.4 -000.1 363.09 -0145.7 052.9
0138.72 025.2 +018.40 +116.9 -000.1 362.86 -0140.9 051.1
0138.73 024.8 +018.45 +115.6 -000.1 363.48 -0140.0 050.8
0138.74 024.4 +018.50 +115.6 -000.1 363.49 -0143.2 052.0
0138.75 024.4 +018.55 +115.6 -000.1 363.10 -0143.3 052.0
0138.76 024.0 +018.60 +114.1 -000.1 363.23 -0136.5 049.5
0138.77 024.0 +018.60 +112.2 -000.1 363.61 -0134.3 048.8
0138.79 024.0 +018.70 +110.4 -000.1 363.74 -0137.1 049.8
0138.80 024.0 +018.75 +109.7 -000.1 363.23 -0140.4 050.9
Records deleted for space
0140.49 022.8 +023.80 +072.6 -000.1 365.19 -0106.3 038.8
0140.50 022.8 +023.80 +072.2 -000.1 365.19 -0106.7 038.9
0140.51 022.8 +023.85 +072.2 -000.1 364.95 -0107.2 039.1
0140.52 022.8 +023.85 +071.9 -000.1 365.19 -0107.5 039.2
0140.53 022.8 +023.90 +071.5 -000.1 365.45 -0107.6 039.3
0140.54 022.8 +023.90 +070.9 -000.1 365.21 -0107.7 039.3
0140.55 022.8 +023.95 +070.9 -000.1 365.33 -0107.9 039.4
0140.56 022.8 +023.95 +070.9 -000.1 365.33 -0108.1 039.4
0140.57 022.8 +024.00 +070.8 -000.1 365.46 -0108.0 039.4
0140.58 022.8 +024.00 +070.8 -000.1 365.09 -0107.9 039.3
0140.59 022.8 +024.05 +070.9 -000.1 364.71 -0107.9 039.3
0140.60 022.8 +024.05 +071.1 -000.1 365.21 -0108.1 039.4
0140.61 022.8 +024.10 +071.1 -000.1 365.09 -0107.6 039.2
0140.62 022.8 +024.10 +071.3 -000.1 365.23 -0107.5 039.2
0140.63 022.8 +024.15 +071.5 -000.1 365.21 -0107.2 039.1
0140.64 022.8 +024.15 +071.5 -000.1 365.09 -0107.0 039.0
0140.65 022.8 +024.20 +071.5 -000.1 364.73 -0106.9 038.9
0140.66 022.8 +024.20 +072.0 -000.1 365.11 -0106.5 038.8
0140.67 022.8 +024.25 +071.7 -000.1 365.12 -0106.5 038.8
0140.68 023.2 +024.25 +071.7 -000.1 364.98 -0106.8 038.9
0140.69 022.8 +024.30 +072.0 -000.1 364.97 -0106.9 039.0
0140.71 022.8 +024.35 +072.4 -000.1 365.10 -0107.0 039.0
0140.72 023.2 +024.35 +072.2 -000.1 365.22 -0107.2 039.1
0140.73 023.2 +024.40 +072.2 -000.1 365.20 -0107.5 039.2
0140.74 022.8 +024.40 +072.0 -000.1 365.22 -0107.4 039.2
0140.75 023.2 +024.45 +071.9 -000.1 365.09 -0107.7 039.3
0140.76 022.8 +024.45 +071.9 -000.1 364.97 -0108.0 039.4
0140.77 022.8 +024.50 +072.0 -000.1 364.96 -0108.3 039.5
SoC 074.0