PSWired
August 5th, 2005, 04:08 AM
Hi folks, trying to create a calculated PID to give an MPG readout in the scan tool. Problem is that the PID won't show up in the "Data" tab even when selected on the PID selection tab. The PID is set to multiply lb/hr of airflow by the current AFR to get lb/hr of fuel, then convert lb of gasoline to gallons of gasoline to get gallons/hr of gasoline. Multiplying the vehicle speed in MPH by the inverse of GPH gives the final MPG readout. Here's the contents of my calc_pids.txt file:
# ================================================== ============================
# File details
# ------------
#
# This section defines various details about the file format.
*FILE
#Parameter Value Description
#---------- ---------------- ---------------------------------------------------
VERSION 7.1.1 File version
DECSEP . Decimal separator used in this file
# ================================================== ============================
# Units
# -------------------
# See sae_generic.txt for more information on the *UNITS section
*UNITS
#Code System Abbr Description
#-------- ---------- -------- -------------------------------------------------------------
#None None "" "No units"
mpg Imperial mpg "Miles travelled per gallon of fuel"
# ================================================== ============================
# Add slot definitions here
# --------------------------------
# See sae_generic.txt for more information on "SLOT" formats
#
#Units Low High Fmt Expression
#------------ ------------- ------------- ---- --------------------------------------------------------------
*CLC-00-001
mpg 0.0 100.0 0.2 "(1/({SAE.MAF.lbpm}*(60)*(1/{GM.AFR})*(1/42.5)*(7.4805)))*{SAE.VSS.mph}"
# ================================================== ============================
*PRN - Parameter Reference Numbers
# --------------------------------
# See sae_generic.txt for more information on the *PRN section
#
#Code PRN SLOT Units System Description
#------------------------- ---- ------------ ---------------- ---------------- ------------------------------------------
CALC.MPG F600 CLC-00-001 "mpg" Fuel "Miles per gallon"
# ================================================== ============================
# File details
# ------------
#
# This section defines various details about the file format.
*FILE
#Parameter Value Description
#---------- ---------------- ---------------------------------------------------
VERSION 7.1.1 File version
DECSEP . Decimal separator used in this file
# ================================================== ============================
# Units
# -------------------
# See sae_generic.txt for more information on the *UNITS section
*UNITS
#Code System Abbr Description
#-------- ---------- -------- -------------------------------------------------------------
#None None "" "No units"
mpg Imperial mpg "Miles travelled per gallon of fuel"
# ================================================== ============================
# Add slot definitions here
# --------------------------------
# See sae_generic.txt for more information on "SLOT" formats
#
#Units Low High Fmt Expression
#------------ ------------- ------------- ---- --------------------------------------------------------------
*CLC-00-001
mpg 0.0 100.0 0.2 "(1/({SAE.MAF.lbpm}*(60)*(1/{GM.AFR})*(1/42.5)*(7.4805)))*{SAE.VSS.mph}"
# ================================================== ============================
*PRN - Parameter Reference Numbers
# --------------------------------
# See sae_generic.txt for more information on the *PRN section
#
#Code PRN SLOT Units System Description
#------------------------- ---- ------------ ---------------- ---------------- ------------------------------------------
CALC.MPG F600 CLC-00-001 "mpg" Fuel "Miles per gallon"