Data logger for P01 and P59

They go by many names, P01, P59, VPW, '0411 etc. Also covering E38 and newer here.
Scott68B
Posts: 22
Joined: Sat Aug 29, 2009 9:52 pm
cars: MGB GM 5.3 GM LS1 ECU

Re: Data logger for P01 and P59

Post by Scott68B »

Very nice! It seems to be capturing data several times per second. It looks pretty easy to configure more PIDs as well. I really like it!

Thank you NSFW!!
User avatar
Gampy
Posts: 2330
Joined: Sat Dec 15, 2018 7:38 am

Re: Data logger for P01 and P59

Post by Gampy »

In PcmLogger

Code: Select all

private string GenerateLogFilePath()
Could we please change this

Code: Select all

string directory = Environment.GetEnvironmentVariable("USERPROFILE");
to this

Code: Select all

string directory = Path.Combine(Environment.ExpandEnvironmentVariables("%userprofile%"), "Documents");
Or for that matter replace GenerateLogFilePath() with this

Code: Select all

        private string GenerateLogFilePath()
        {
            return Path.Combine(Environment.ExpandEnvironmentVariables("%userprofile%"),
                "Documents",
                DateTime.Now.ToString("yyyyMMdd_HHmm") +
                  "_" +
                  this.profileName +
                  ".csv"
                );
        }
Thanks for doing what ya do!
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
NSFW
Posts: 679
Joined: Fri Feb 02, 2018 3:13 pm

Re: Data logger for P01 and P59

Post by NSFW »

Thing is, it's only named Documents if you installed Windows in English. :)

However I just did some searching, and there's an API to get the path regardless of the language. I'll use that.

https://docs.microsoft.com/en-us/dotnet ... mework-4.8
Please don't PM me with technical questions - start a thread instead, and send me a link to it. That way I can answer in public, and help other people who have the same question. Thanks!
User avatar
Gampy
Posts: 2330
Joined: Sat Dec 15, 2018 7:38 am

Re: Data logger for P01 and P59

Post by Gampy »

That's why you get paid the big bux!

I didn't even think of that, selfish me!

How about a directory picker instead?

[edit]
In case you haven't spent the time already ...
replace

Code: Select all

            string directory = Environment.GetEnvironmentVariable("USERPROFILE");
With

Code: Select all

            string directory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
Scott68B
Posts: 22
Joined: Sat Aug 29, 2009 9:52 pm
cars: MGB GM 5.3 GM LS1 ECU

Re: Data logger for P01 and P59

Post by Scott68B »

Had an issue this morning that I thought I'd report. This happened a couple of times and I did not restart the app in between tries. Might be nothing.

Code: Select all

[10:20:23:788]  ReadLogData: 6C F0 10 6A FE 0C 9C 02 86 02 02
[10:20:23:788]  ReadLogData: 6C F0 10 6A FD AE 7C 59 FF 00 AA
[10:20:23:788]  ReadLogData: 6C F0 10 6A FC 94 7C 7C 3C 94 7D
[10:20:23:790]  Requesting row...
[10:20:23:790]  TX: 2A01FEFDFC 
[10:20:23:937]  RX: 6C F0 10 6A FE 0C 99 02 76 02 02
[10:20:23:937]  RX: 6C F0 10 6A FD B0 7C 5A FF 00 AA
[10:20:23:937]  RX: 6C F0 10 6A FC 94 7C 7C 3C 94 7D
[10:20:23:937]  ReadLogData: 6C F0 10 6A FE 0C 99 02 76 02 02
[10:20:23:937]  ReadLogData: 6C F0 10 6A FD B0 7C 5A FF 00 AA
[10:20:23:937]  ReadLogData: 6C F0 10 6A FC 94 7C 7C 3C 94 7D
[10:20:23:937]  Requesting row...
[10:20:23:937]  TX: 2A01FEFDFC 
[10:20:24:098]  RX: 6C F0 10 6A FE 0C A8 02 95 02 02
[10:20:24:098]  RX: 6C F0 10 6A FD B2 7C 5B FF 00
[10:20:24:098]  RX: 6C F0 10 6A FC 94 7C 7C 3C 94 7C
[10:20:24:098]  ReadLogData: 6C F0 10 6A FE 0C A8 02 95 02 02
[10:20:24:098]  ReadLogData: 6C F0 10 6A FD B2 7C 5B FF 00
[10:20:24:098]  ReadLogData: 6C F0 10 6A FC 94 7C 7C 3C 94 7C
[10:20:24:098]  System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at PcmHacking.LogRowParser.EvaluateDpidMessage(ParameterGroup group, Byte[] payload, List`1 result)
   at PcmHacking.LogRowParser.Evaluate()
   at PcmHacking.Logger.<GetNextRow>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at PcmHacking.MainForm.<LoggingThread>d__23.MoveNext() in C:\GitHub\PcmHacks\Apps\PcmLogger\MainForm.cs:line 275
User avatar
NSFW
Posts: 679
Joined: Fri Feb 02, 2018 3:13 pm

Re: Data logger for P01 and P59

Post by NSFW »

Thanks, that's a bug. The FD response was one byte too short, and the app shouldn't blow up when that happens.
Please don't PM me with technical questions - start a thread instead, and send me a link to it. That way I can answer in public, and help other people who have the same question. Thanks!
User avatar
NSFW
Posts: 679
Joined: Fri Feb 02, 2018 3:13 pm

Re: Data logger for P01 and P59

Post by NSFW »

I just updated the first post with a new .zip file that has buttons to choose and open the output directory, and a fix to the issue that Soctt68B found.
Please don't PM me with technical questions - start a thread instead, and send me a link to it. That way I can answer in public, and help other people who have the same question. Thanks!
Scott68B
Posts: 22
Joined: Sat Aug 29, 2009 9:52 pm
cars: MGB GM 5.3 GM LS1 ECU

Re: Data logger for P01 and P59

Post by Scott68B »

Thank you! Haven't had a chance to try it yet and may not until sping...weather isn't looking great and I need to get started on some winter updates soon. Will as soon as I can.
Scott68B
Posts: 22
Joined: Sat Aug 29, 2009 9:52 pm
cars: MGB GM 5.3 GM LS1 ECU

Re: Data logger for P01 and P59

Post by Scott68B »

Had a chance to play with it further this weekend. I was out for over an hour drive yesterday with no issues and went for another drive today. I encountered the following. Hope it is of some help.

Scott

Code: Select all

[02:26:59:080]  TX: 2A01FEFDFC 
[02:26:59:240]  RX: 6C F0 10 6A FE 24 D7 0A B9 02 02
[02:26:59:240]  RX: 6C F0 10 6A FD AB 7B 59 FF 16 CF
[02:26:59:240]  RX: 6C F0 10 6A FC 8B 7A 8B 7C 79 1C
[02:26:59:240]  ReadLogData: 6C F0 10 6A FE 24 D7 0A B9 02 02
[02:26:59:240]  ReadLogData: 6C F0 10 6A FD AB 7B 59 FF 16 CF
[02:26:59:240]  ReadLogData: 6C F0 10 6A FC 8B 7A 8B 7C 79 1C
[02:26:59:240]  Requesting row...
[02:26:59:240]  TX: 2A01FEFDFC 
[02:26:59:419]  RX: 6C F0 10 6A FE 24 DA 09 D4 02 02
[02:26:59:419]  RX: 6C F0 10 6A FD 6D 79 58 FF 16 CF
[02:26:59:419]  RX: 6C F0 10 6A FC 8B 80 8B 7B 79 1B
[02:26:59:419]  ReadLogData: 6C F0 10 6A FE 24 DA 09 D4 02 02
[02:26:59:419]  ReadLogData: 6C F0 10 6A FD 6D 79 58 FF 16 CF
[02:26:59:419]  ReadLogData: 6C F0 10 6A FC 8B 80 8B 7B 79 1B
[02:26:59:423]  Requesting row...
[02:26:59:423]  TX: 2A01FEFDFC 
[02:26:59:591]  RX: 6C F0 10 6A
[02:26:59:591]  RX: 6C F0 10 6A FD 20 80 5A FF 14 CF
[02:26:59:591]  RX: 6C F0 10 6A FC 8B 80 8B 80 79 1B
[02:26:59:591]  ReadLogData: 6C F0 10 6A
[02:26:59:624]  System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at PcmHacking.Message.get_Item(Int32 index)
   at PcmHacking.Protocol.TryParseRawLogData(Message message, RawLogData& rawLogData)
   at PcmHacking.Vehicle.<ReadLogData>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at PcmHacking.Logger.<GetNextRow>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at PcmHacking.MainForm.<LoggingThread>d__23.MoveNext() in C:\GitHub\PcmHacks\Apps\PcmLogger\MainForm.cs:line 287
User avatar
NSFW
Posts: 679
Joined: Fri Feb 02, 2018 3:13 pm

Re: Data logger for P01 and P59

Post by NSFW »

Please get the version from the PCM Hammer release that I put out yesterday. It's got a fix for that.
Please don't PM me with technical questions - start a thread instead, and send me a link to it. That way I can answer in public, and help other people who have the same question. Thanks!
Post Reply