Logging data to a file

Logging data to a file was created by pscan.uk

Posted 5 years 11 months ago #188923
As of version 0421 pscan has the ability to log data to the hard disk.

Once the interface has been found (where you have the list of ECUs) there is a now a new button that you can press if you want to log data.



You will be presented with a dialog box to select a folder and file name.

There are five buttons along the top:-



1. Go up a level
2. Create a subdirectory inside where you are
3. Show hidden files
4. Go to home directory
5. Bookmarks

The home directory option looks like the sensible one to go for.

The you need to specify a file name


and press Save

Make sure that you don't select a file that already exists by mistake. IT WILL BE DESTROYED. There is no "are you really sure" stuff.
A clarification:-
If you select a file with .log at the end then the file will be overwritten.
If you select a file without .log at the end then pscan will create a new file with the same name but with a .log added on the end. Therefore you are only really likely to accidentally overwrite a file that has .log already on the end of the filename.

Then select the ECU and connect to it as normal.

If you press info or read error codes then a filename.log-text-n.txt file will be created.
n will increment everytime that you do this.
If you go into live data then when you quit from live data a filename.log-live-n.csv file will be created
n will increment everytime that you do this.

If you go back to the ECU selection page and click Cancel Log File and the Select Log File again then this will reset n to 1 and overwrite the files that you did before if you select the same filename.

Only live data that you select with the little + symbols will get logged. Basically if you see it in pscan on the screen then it's logged, if not then it isn't. The more you select then (mostly) the slower it will log and the bigger the output file. It is better to only log the parameters that really matter to what you are trying monitor.

To open a csv file you need something live Microsoft Excel or Libreoffice.
When you open the file it will likely ask you whether you want fixed width or delimited.
Go for delimited.
You will also likely be given a choice or delimiter characters. Select commas and deselect anything else.
Then open the file.

At the moment both numbers and units are shown in the cells which makes graphing a little tricky.

What I need to do is to go through all the live data definitions in pscan and remove the units and put them in the descriptor instead of the result, but this could take a while as there are thousands.

In the meantime you can do this manually. If you are interested in engine speed you can open the csv file in notepad and do search for " RPM" and replace with "" (i.e. nothing), save and then open in the spreadsheet.
Last Edit:5 years 11 months ago by pscan.uk
Last edit: 5 years 11 months ago by pscan.uk.
The following user(s) said Thank You: cairnsys, sworkscooper, ohnonottwins, Ludo.190, SteveFMk1

Please Log in or Create an account to join the conversation.

Replied by Rob Bell on topic Logging data to a file

Posted 5 years 11 months ago #188958
Thanks Philip, this works a treat. I had an intermittent fault on my Freelander's ABS/ TC/ HDC which lit the "three Amigos" (which many Land Rover owners will be familiar with).

The live data capture mode worked really well, generating a file that I could easily open in Excel. The output in this case also included the units, which I stripped out using the Find/Replace function, replacing the units (kph) with nothing (""). This then enabled me to graph the four wheel speed signals like so:



You can see that the right front wheel sensor speed signal drops to zero for 4.5 seconds, triggering the fault code on the ABS ECU.

Note that I also converted the time base to hh:mm:ss using the formula =CONCATENATE(TEXT(INT(A1/1000)/86400,"hh:mm:ss"),".",TEXT(A1-(INT(A1/1000)*1000),"000")) where the Live data update interval for that row is contained in cell A1. :)

Really pleased with this - should be invaluable for all sorts of irritating intermittent faults. The only down side is that there doesn't seem to be a way of marking the telemetry data with the point at which the fault code is logged - but I guess in the majority of cases, this ought to be pretty obvious - as in my example above :D
The following user(s) said Thank You: cairnsys, trevorgetty

Please Log in or Create an account to join the conversation.

Replied by Rob Bell on topic Logging data to a file

Posted 5 years 11 months ago #188988
Note to self - much easier/simpler to convert millisecond time base to hh:mm:ss using this instead: =TEXT(A1/86400000,"hh:mm:ss.000") - doh!
The following user(s) said Thank You: cairnsys, mgillam

Please Log in or Create an account to join the conversation.

Replied by Rob Bell on topic Logging data to a file

Posted 5 years 9 months ago #189586
Posting this Lambda output from my MGF to confirm that it works very nicely with my early MEMS1.9 - and to my surprise, the sampling frequency is much faster than that displayed on the live screen :)



Whereas the live screen declared a sample interval of over 500ms, the actual sample interval is closer to 125ms - i.e. 8 times per second versus just twice per second... This was with Lambda voltage, engine speed and coolant temperature all being recorded contemporaneously :broon:
The following user(s) said Thank You: trevorgetty

Please Log in or Create an account to join the conversation.

Replied by pscan.uk on topic Logging data to a file

Posted 5 years 9 months ago #189588
It might not be really faster, I think it's an unintentional con.

I think that it's a side effect of some internal caching. Basically if four readings come from the same packet then it will request the packet for the first reading and cache it. For the other three the result is taken from the cache rather than requesting it all over again.

I think that the dump to the csv file is after the cache rather than before.

I need to look into that.

Please Log in or Create an account to join the conversation.

Replied by Rob Bell on topic Logging data to a file

Posted 5 years 9 months ago #189590
Interesting! Just out of interest, is the sample speed set by MEMS, or can data be obtained with higher fidelity?

For most sensor outputs, there is little advantage sampling any faster than 8/sec, but for rapidly changing values - such as the Lambda - a faster sample speed would significantly improve the recorded trace. However, for most diagnostic purposes, this is probably unnecessary :)

Please Log in or Create an account to join the conversation.

Replied by pscan.uk on topic Logging data to a file

Posted 5 years 9 months ago #189592
What you see on the screen is running as fast as (or at least nearly as fast as) the ECU can do.

This is why if you select more stuff it starts to slow down.

For the csv file I need to have a look at the code and see if the timestamp can be made more accurate.

Please Log in or Create an account to join the conversation.

Replied by Jon-Mini on topic Logging data to a file

Posted 4 years 6 months ago #193381
Is there a way to 'personalise' the Live Data fields / Parameters

I'd like to trim down the Parameters that are available for a particular car ,
rather than have the whole list of items at start-up for every vehicle.
Or could there be a way to 'save' the parameters selected, instead of having to go down the list '+' ing each line required.
(yes I know I can '+' the whole lot.)
I'd even be happy editing an .ini file or similar.
Last Edit:4 years 6 months ago by Jon-Mini
Last edit: 4 years 6 months ago by Jon-Mini.

Please Log in or Create an account to join the conversation.

Replied by pscan.uk on topic Logging data to a file

Posted 4 years 6 months ago #193404
Such a feature would be possible, but unfortunately I don't have the bandwidth to implement everything that people want.

I only just did idle screw adjustment on the MEMS2J and now I need to do the same on other ECUs.
I am also long overdue on enabling/disabling options (particularly on the Pektron).
I have promised to do alarm fob programming on the 75/ZT.
I also want to do Landrover 10AS.
Injector coding on the TD5.....
There are also other features also in the pipeline but I don't want spoil the surprise.

So. If for whatever reason I ever change the GUI or something (maybe make it more tablet friendly or do Android) then I will consider it; but as things are I think that this would be a low priority as it's a convenience thing but doesn't actually stop anyone doing what they want to do.
The following user(s) said Thank You: sworkscooper

Please Log in or Create an account to join the conversation.

Replied by Jon-Mini on topic Logging data to a file

Posted 4 years 6 months ago #193406
yep fully understand. I think we all realise that there's not a team of developers working night and day.
As you rightly say its not a show stopper.
ATB, Jon

Please Log in or Create an account to join the conversation.

Replied by talkingcars on topic Logging data to a file

Posted 4 years 6 months ago #193440

pscan.uk wrote: ….So. If for whatever reason I ever change the GUI or something (maybe make it more tablet friendly or do Android) then I will consider it;.......


That would be good. Although I am the first to admit I have no idea how much work is involved.


Home to black Alfa Romeo 159 3.2 V6 Q4 ,green MGF VVC and red MG Maestro T16.

MG - the friendly marque.

Please Log in or Create an account to join the conversation.

Replied by mgillam on topic Logging data to a file

Posted 4 years 6 months ago #193458
I have a re-mapped Mems 3 ECU and get a P0501 rough road detection code. I suspect that the re-map may have been done on a non-ABS car and then when uploaded to my car which has ABS. I'm concerned the ABS may have been affected and was hoping to track the live data so I could investigate further. On ABS cars I believe the rough road signal is passed from the ABS ECU on a hardwired output to pin 78 of the Mems ECU. How this works I am not sure but the signal is in the form of a square wave digital pulse train of between 0 and 5 V at 8000 pulses per mile. On non ABS cars there is a reluctor ring is fitted to the LH rear wheel and provides 48 pulses per rotation which is adapted and then sent to the same pin. I can't find this live data on pscan is this something you can add to the "wish list"? Thanks
by mgillam

Please Log in or Create an account to join the conversation.

Moderators: pscan.uk
Time to create page: 0.695 seconds