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

Thread: How to modify calculated PIds

  1. #1
    Junior Member
    Join Date
    Nov 2003
    Posts
    35

    Default How to modify calculated PIds

    Hello,

    I am new to this forum and would like to kow how
    to create your own calculated PIDs (want to work on the
    power calculations which I used to do in post calculations with ATAP,
    inlcuding roating mass effects, power loss due to wind-resistance
    when measured while driving, etc.

    Thanks,

    Gert

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

    Default

    Example of how to create a calculated PID.

    The PID will calculate the angular velocity of the crank shaft. We will create two formulae: one in metric m/s and one in imperial ft/s.

    Quote Originally Posted by Joecar
    The equation is:
    v = r * w
    where:
    r = crank radius = stroke/2
    w = angular velocity = 2*pi*rpm/60
    v = linear velocity at radius r
    i.e. v = 2*pi*r*rpm/60
    Assuming the stroke on an LS1 is 3.625 inches...
    Stroke in feet is 0.30208, radius of crank is 0.15104 feet.
    Stroke in meters is 0.092075 meters, radius of crank is 0.0460375 meters.

    ft/s = 2*3.14159*0.15104*{SAE.RPM}/60 (where crank radius is measured in feet)
    m/s = 2*3.14159*0.0460375*{SAE.RPM}/60 (where crank radius is measured in meters)

    Both formulae can be simplified to:
    ft/s = 0.002517*{SAE.RPM}
    m/s = 0.004821*{SAE.RPM}

    Calculated PIDs should be added to the calc_pids.txt file in the Configuration directory.
    Usually, three entries need to be added to this file.

    1. We need to add the units for ft/s and m/s.

    (NOTE: common units are already defined in sae_generic.txt you do not need to add them in the calc_pids.txt file if they already exist in the sae_generic.txt configuration file.

    Define the new units by adding the following entries under the *UNITS section in the calc_pids.txt file:

    Code:
    #Code     System     Abbr     Description
    #-------- ---------- -------- -------------------------------------------------------------
    ftps      Imperial   ft/s     "Feet per second"
    mps       Metric     m/s      "Meters per second"
    • Code is the code by which we can reference the units from other entries in the configuration files.
      System is one of Metric, Imperial or None and specifies to which measuring system the units belong.
      Abbr is the abbreviation that will be displayed by EFILive
      Description describes the units, if the description contains spaces or commas it must be enclosed in double quotes. It is usually a good idea to include the quotes anyway.
    Next we need to define a SLOT.
    For normal PIDs the SLOT defines Scaling, Limits, Offset and Transfer.
    For calculated PIDs the SLOT defines Limits and the expression like this:

    Code:
    #Units             Low          High      Fmt  Expression
    #------------ ------------- ------------- ---- --------------------------------------------------------------
    *CLC-00-001
    ftps               0.0         180.0      0.1  "0.002517*{SAE.RPM}"
    mps                0.0          60.0      0.1  "0.004821*{SAE.RPM}"
    The SLOT name *CLC-00-001 is made up of four segments:
    • * which is used in the configuration files as the "start of section" specifier. Since each SLOT is defined in it's own section, each SLOT name must begin with *.
      CLC which declares the SLOT as a calculated PID SLOT.
      00 which specifies the number of bits required to transmit the raw data from the PCM to EFILive. Since calculated PIDs are NOT transmitted from the PCM to EFILive this value is always 00.
      001 which is a unique sequence number and may be any value between 000 and 899 inclusive. EFILive reserves 900-999 for pre-defined calculated PIDs (see sae_generic.txt for definitions of predefined calculated PIDs).
    • Low and high are used to specify the "normal" range of values of the PID. These values are used by EFILive to populate the gauge and chart scales
      FMT is the number of decimal places that EFILive will display. EFILive rounds the value to fit the required number of decimal places.
      Expression is the formula that is evaluated by EFILive. PID names must be enclosed in curly braces. If a PID has more than one unit defined and you want to select a particular unit (metric or imperial), then append a dot and the unit's code to the PID name, inside the curly brace.
    Lastly we need to add the PID itself.
    Code:
    #Code                      PRN  SLOT         Units            System           Description
    #------------------------- ---- ------------ ---------------- ---------------- ------------------------------------------
    CALC.CKSPEED               F600 CLC-00-001   "mps,ftps"       Performance      "Crank speed"
    • Code is the PID name that is visible in EFILive and MUST begin with CALC. for calculated PIDs.
      PRN (Parameter reference number) is the internal id of the PID. It must be unique. The OBD II specification reserves PRNs from $F000 to $F6FF for scan tools. Further, EFILive reserves $F500 to $F5FF for predefined calculated PIDs. We recommend using $F600 to $F6FF for your own calculated PIDs.
      SLOT is the name of the SLOt that was added previously, without the * section marker.
      Units is a comma separated list of units that MUST be declared in the associated SLOT definition. Only one unit from each system is allowed. (i.e. you can't have two imperial units or two metric units).
      Description describes the PID.
    Note: calculated PIDs may contain other calculated PIDs. The order of evaluation of calculated PIDs becomes important. Calculated PIds are evaluated in PRN order. The calculated PID with the lowest PRN will be evaluated first.

    For more information about calculated PIDs see pages 58-60 of the EFILive user manual.
    Last edited by Blacky; July 4th, 2008 at 08:44 AM.

  3. #3
    Junior Member
    Join Date
    Nov 2003
    Posts
    35

    Default

    Thanks for the help. I was wondering if I could just modify
    the calculated power PID already available in EFILive6?
    I am not sure how to do this, which file to open etc.
    I understand the process once I am in the right file
    in the program -

    Gert

  4. #4
    Junior Member
    Join Date
    Nov 2003
    Posts
    35

    Default

    Blacky,

    do I edit the calc_pids.txt for defining new calculated parameters.
    In my copy of this file there are no entries in the fields.
    Do I just add to these? Does the file automaticallaly get called up once I start EFILIVE6?

    Thanks,

    Gert

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

    Default

    Quote Originally Posted by 2000ssnb
    Thanks for the help. I was wondering if I could just modify
    the calculated power PID already available in EFILive6?
    I am not sure how to do this, which file to open etc.
    I understand the process once I am in the right file
    in the program -

    Gert
    You can edit the sae_generic.txt file to modify the existing calculated PIDs.
    However that is not recommended because when you install the next update that file may be overwritten and you would lose your changes.

    Create a new PID (copy the PID and SLOT details from sae_generic.txt) in the calc_pids.txt file.
    A new PID will have a unique Code and a unique PRN.

    Paul

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

    Default

    Quote Originally Posted by 2000ssnb
    Blacky,

    do I edit the calc_pids.txt for defining new calculated parameters.
    In my copy of this file there are no entries in the fields.
    Do I just add to these? Does the file automaticallaly get called up once I start EFILIVE6?

    Thanks,

    Gert
    Yes, just add entries to the calc_pids.txt file, it is automatically loaded by EFILive V6.

    It is empty because it is reserved exclusively for user defined calculated PIDs. This file is NOT overwritten during installation of updates.

    Paul

  7. #7
    Junior Member
    Join Date
    Oct 2003
    Posts
    21

    Default

    Can you guys make a PID that takes O2 voltage (V) and outputs
    AFR by a table interpolation lookup:

    O2_V AFR
    0.000 25
    0.100 20
    0.200 18.5
    0.300 17
    0.400 16
    0.500 14.5
    0.600 14.6
    0.700 14.7
    0.750 14.8
    0.800 14.0
    0.825 13.7
    0.850 13.2
    0.875 13.0
    0.900 12.0
    0.910 11.5
    0.920 11.0
    0.930 10.0
    0.940 9.0
    0.950 8.0
    0.960 7.0
    0.970 6.0
    0.980 5.0
    0.990 4.0
    1.000 3.0

  8. #8
    Lifetime Member Garry's Avatar
    Join Date
    Jun 2006
    Posts
    649

    Default

    Somehow I don't get it -- I set up a new calc pid, it shows up in the PID selection, but I can't make it show up in the dashboard ... e.g., I tried my luck with generating a calculated gear estimate, but couldn't even get the basis to show up ... here's an excerpt from calc_pids.txt:

    *UNITS
    gear None "." "Gear"

    *CLC-00-906
    gear 0.0 6.0 .0 "{SAE.VSS.mph}/{SAE.RPM}"

    CALC.M6GEAR F614 CLC-00-906 "gear" Conditions "M6 gear"

    What bugs me is that I get no clue from the scan tool why it doesn't present the PID in the dashboard for selection ... I know I have the VSS and RPM PID present in the logfile and the selected PIDs, as they are used in some other calc pids that are available for display ...

    What am I missing here?
    Garry Glendown * '17 Fifty 2SS MT * 99 Firehawk Convertible (for sale)

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

    Default

    Garry, post your calc_pids.txt file.

  10. #10
    Lifetime Member
    Join Date
    Jan 2007
    Posts
    298

    Default

    Quote Originally Posted by 2000ssnb View Post
    Hello,

    I am new to this forum and would like to kow how
    to create your own calculated PIDs (want to work on the
    power calculations which I used to do in post calculations with ATAP,
    inlcuding roating mass effects, power loss due to wind-resistance
    when measured while driving, etc.

    Thanks,

    Gert
    GERT! Jump into our thread!
    EFI RWHP and EFI RWTQ
    http://forum.efilive.com/showthread....4105#post74105

Page 1 of 2 12 LastLast

Similar Threads

  1. Pid Creation / Calculated pids
    By Gelf VXR in forum General (Petrol, Gas, Ethanol)
    Replies: 19
    Last Post: June 26th, 2008, 02:19 AM
  2. Replies: 1
    Last Post: April 27th, 2005, 12:19 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
  •