Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Map Data Filters in V8 Scan Tool

  1. #1
    Member koolky's Avatar
    Join Date
    Aug 2013
    Posts
    60

    Default Map Data Filters in V8 Scan Tool

    I specifically need to figure out how to apply a filter like throttle position is changing more than 5.00 % per 100 ms from V7.5 to work in V8. I've figured out how to code the the calc pids but have no clue how to factor in the 100ms timer while tracking variation in TP. I know how I would do something like this in C++ but I'm lost with Lua. Hoping I've missed something and it will be as easy as V7.5.

    Thanks

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

    Default

    Does this help?

    Click image for larger version. 

Name:	tpdx.png 
Views:	332 
Size:	117.0 KB 
ID:	22236

    Regards
    Paul
    Before asking for help, please read this.

  3. #3
    Member koolky's Avatar
    Join Date
    Aug 2013
    Posts
    60

    Default

    Can you break down the first line of code for me? I get the initiation of there variable 'tpdx' but what is dx() and what is going on within dx()?. Are frames always 1 second?

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

    Default

    The dx() function is provided by EFILive, this is the implementation (written in Pascal/Delphi) within the V8 software of the dx() function. It simply computes the rate of change with respect to time for a given PID value between two frames. Also known as a derivative and is usually written as dx/dt.

    Code:
    function dx(aPid: string; aFrame1,aFrame2: integer): double;
    var
      rise,run: double;
      t1,t2: double;
    begin
      // Ensure frames are in range and are ordered low->high
      CoerceAndOrder(aFrame1,aFrame2,0,FrameCount-1);
    
      // Get the change in PID value between the two frames.
      rise := pid(aPid,aFrame2)-pid(aPid,aFrame1);
    
      // Get the timestamp in ms for each frame
      t2 := time(aFrame2); // ms
      t1 := time(aFrame1); // ms
    
      // Calculate the elapsed ms
      run := t2-t1;
    
      // Compute the rate of change of the PID value per second
      if ( not IsZero(run) ) then
        Result := (rise*1000)/run  // *1000 to convert from "change per ms" to "change per second"
      else
        Result := 0;
    end;


    Note: the pid() and time() functions used in the dx() function above can be called directly from a Lua script. The pid() function always returns the metric value of a PID. Use the convertValue() function to convert from metric to other supported units. E.g. convertValue(k,"km/h","mph") would convert the value in k to mph. If k was 100, then the function would return 62.137 mph.


    Regards
    Paul
    Before asking for help, please read this.

  5. #5
    Member koolky's Avatar
    Join Date
    Aug 2013
    Posts
    60

    Default

    How do I include a filter in a custom pid code? With the filter set as 'boolean' they don't list as pid's that can be included.

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

    Default

    Any calculated PID that is configured with units of "boolean" will (should) show up as selectable as a filter PID.

    Click image for larger version. 

Name:	bool.png 
Views:	216 
Size:	57.2 KB 
ID:	22240

    Click image for larger version. 

Name:	bool1.png 
Views:	205 
Size:	9.6 KB 
ID:	22239

    Regards
    Paul
    Before asking for help, please read this.

  7. #7
    Member koolky's Avatar
    Join Date
    Aug 2013
    Posts
    60

    Default

    Got it now. I didn't realize that I had to include them in the pid selection in order to write them into my custom pid code.

  8. #8
    Member koolky's Avatar
    Join Date
    Aug 2013
    Posts
    60

    Default

    Is there a pdf tutorial that I'm missing? The only way I can think to integrate the filter pids into the calc pid is to write the code as show here:

    Click image for larger version. 

Name:	efilive calc pid.png 
Views:	240 
Size:	106.0 KB 
ID:	22242

    I've set the filter pids so that they are false (zero) when the desired conditions aren't meet. That way I can multiply by each filter pid, so if one filter pid is false the equation is multiplied by zero therefore the result is zero. I haven't confirmed, but I am worried that by doing this I will have cells being filled with zeros, bringing my cell average down.

    Thanks

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

    Default

    Instead of multiplying them, you would separate the individual filters with the && operator, and drop the leading asterisk.

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

    Default

    You should not "embed" the filter PIDs as part of the wide band BEN calculation. Your filter PIDs should all be ANDed together in a separate "master filter" PID that return true of false depending on whether all your conditions are met or not.

    Then you simply load up your normal log file with your normal BEN factor PID logged in it and select the master filter PID by selecting it in the drop down list box at the bottom of the scan window.

    Then you apply/un-apply the master filter PID to your data by clicking on the "funnel" icon in the VCR bar. When the filter is applied all other data displays (including the maps) only include the data frames that pass the filter test.

    Filter not applied:
    Click image for larger version. 

Name:	filter_off.png 
Views:	235 
Size:	125.2 KB 
ID:	22243

    Filter applied:
    Click image for larger version. 

Name:	filter_on.png 
Views:	231 
Size:	132.5 KB 
ID:	22244

    Regards
    Paul
    Before asking for help, please read this.

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 3
    Last Post: December 20th, 2016, 08:58 AM
  2. Map sensor problem in efi live scan tool
    By zayne0 in forum Petrol / Gas
    Replies: 10
    Last Post: October 22nd, 2014, 11:17 PM
  3. Scan tool question. No transmission data
    By 97power in forum 6 speed/8 speed RWD/FWD Transmission Tuning (incl T43, T76, T87)
    Replies: 2
    Last Post: September 5th, 2012, 02:45 PM
  4. Data Filters
    By voda1 in forum Gen III V8 Specific
    Replies: 1
    Last Post: October 6th, 2011, 05:01 AM
  5. No live data on EFI scan tool
    By Drummer in forum FlashScan V2
    Replies: 9
    Last Post: February 17th, 2008, 11:05 PM

Posting Permissions

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