Page 1 of 3 123 LastLast
Results 1 to 10 of 30

Thread: Is there a log file joining utility...?

  1. #1
    Joe (Moderator) joecar's Avatar
    Join Date
    Apr 2003
    Posts
    28,403

    Default Is there a log file joining utility...?

    Is there currently a way to join multiple log files...?

    Idea/Suggestion: Scan tool could have a File->"Save Appending to File" option.


  2. #2
    Lifetime Member TAQuickness's Avatar
    Join Date
    Jan 2005
    Posts
    2,940

    Default

    I think it's been talked about before, but I'm not aware of such a utility yet.


  3. #3
    EFILive Developer Site Admin Blacky's Avatar
    Join Date
    Mar 2003
    Posts
    9,501

    Default

    Yes, its been requested before. No there is no easy way to do it - yet.

    The format of the log files is published (well if not published, then at least it is available from EFILive - its not secret). So anyone who feels like writing a utility to merge log files, feel free.

    I've looked at doing it a few times and it is not a trivial process. some things that cause problems:

    PID selections.
    Order of PID data in frames, even if PIDs selection is the same.
    Notes.
    Log file comments.
    Meta data, such as DTC's, LTFT matrix.
    Customer/Vehicle info.

    All that data can differ significantly between log files and would need to be "merged" somehow.

    If restrictions were put in place so that only the PID data from one log file was appended to an existing log file, that would make the process more managable.

    Basically you'd need to read both files into memory, create a new PID selection list (from both sets of PIDs) and then write out a new file with the complete set of PIDs in each frame. Obviously if some PIDs were in one file and not the other then their values would be "undefined" for half of the merged file. (Note: There is a limit of 96 channels per frame).

    Regards
    Paul
    Before asking for help, please read this.

  4. #4
    Joe (Moderator) joecar's Avatar
    Join Date
    Apr 2003
    Posts
    28,403

    Default

    Could I please get a copy of the log file spec...

    I don't guarrantee I'll come up with anything, but I'll start in my spare time (oxymoron) to see if I can join log files containing the same pids (ignoring all the other details for now).

  5. #5
    Lifetime Member TAQuickness's Avatar
    Join Date
    Jan 2005
    Posts
    2,940

    Default

    Me too please.


  6. #6
    EFILive Developer Site Admin Blacky's Avatar
    Join Date
    Mar 2003
    Posts
    9,501

    Default

    The first part of the log file is plain text and can be viewed using Notepad.
    However, do not try to edit the file with Notepad - it can't cope with the non-printable characters. You need to use a hex editor like Hex Workshop from BreakPoint Software.

    The first part consists of sections in the format:
    [SECTION NAME],COUNT
    followed by COUNT items in the form:
    NAME=VALUE

    The [PID] section shows the PID selection and each PID's offset into the frame.
    Note: CALC PIDs are not stored in the data frame.

    [PID],22
    CALC.CYLAIR=0
    CALC.INJDC1=0
    CALC.INJDC2=0
    CALC.POWER_RW=0
    GM.AFR=0
    GM.HO2S11=2
    GM.HO2S21=3
    GM.IBPW1=4
    GM.IBPW2=6
    GM.KR=8
    GM.MAFFREQ=9
    SAE.ECT=11
    SAE.FUELSYS=12
    SAE.IAT=14
    SAE.LONGFT1=15
    SAE.LONGFT2=16
    SAE.MAF=17
    SAE.MAP=19
    SAE.RPM=20
    SAE.SPARKADV=22
    SAE.TP=23
    SAE.VSS=24

    The data starts after the [End_Of_Meta_Data] section. The section name is followed by
    1. A comma
    2. A count of items in the section (for [End_Of_Meta_Data] the count is always 0)
    3. 0x0D Carriage return
    4. 0x0A Line Feed
    Next byte is byte 0 of first data frame.
    Data frame extends for CHANNELCOUNT bytes.
    Each data frame is followed by a 4 byte NOTES field and a 4 byte TIMESTAMP field.
    The TIMESTAMP field is number of milliseconds since 12:00am and is stored LSB first.
    There are FRAMECOUNT frames in the file.

    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	log_frame.png 
Views:	343 
Size:	15.5 KB 
ID:	543  
    Before asking for help, please read this.

  7. #7
    Lifetime Member
    Join Date
    Jul 2003
    Posts
    1,897

    Default

    No utility?
    "All that is needed for the triumph of evil is that good men do nothing..."

  8. #8
    EFILive Developer Site Admin Blacky's Avatar
    Join Date
    Mar 2003
    Posts
    9,501

    Default

    Quote Originally Posted by Highlander View Post
    No utility?
    No.

    If you have two files with exactly the same PID selection then you could theoretically join them using a hex editor - but it would not be easy.

    Regards
    Paul
    Before asking for help, please read this.

  9. #9
    Lifetime Member swingtan's Avatar
    Join Date
    Jul 2007
    Posts
    1,589

    Default

    How interested are people in this?

    I had a play in PERL last night and I have a quick and dirty script that will split a log file into it's 3 main components...

    • Header
    • Metadata
    • Log data


    and then put the file back together. The final file can be open in EFILive Scan tool with no errors. It shouldn't be too hard to add some more code to allow the same thing to be done on multiple log files...

    With exactly the same PID set up

    if there is enough interest, I'll then look at being able to do the same thing with differing PID set ups. It'll probably take the form of setting any missing data to "0" or just not allowing any PIDs that don't exist in all files.

    As Blacky has said, there will be no fix for the time stamps, but testing so far indicates that it doesn't effect the log data, apart from the time indicator in Scantool. Likewise, flags in the file are probably not going to work, so I'll either have to strip them, or re number them. The only reason I can think of wanting to join log files, is to take a few shorter log files and stitch them together to allow a single BEN map to be set up.

    Anyway.... I'd better do some work.

    Simon.

  10. #10
    Lifetime Member
    Join Date
    Jul 2005
    Posts
    702

    Default

    Simon, if you need any regex, hit me up, i'm a regex ninja

Page 1 of 3 123 LastLast

Similar Threads

  1. P12 PCM file
    By Chevy366 in forum IL6,IL5,IL4 Atlas Engines - P12 PCM
    Replies: 12
    Last Post: June 29th, 2009, 09:28 AM
  2. cax file?
    By myws6formula in forum CAX Files
    Replies: 1
    Last Post: December 21st, 2008, 04:00 PM
  3. Would someone be willing to look at a log file?
    By stigmundfreud in forum Gen III V8 Specific
    Replies: 5
    Last Post: May 6th, 2007, 09:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •