PDA

View Full Version : How to: Adjust External Calc: Wideband O2 Setting form my .?



Earl H
January 10th, 2005, 10:08 AM
I'm trying to figure out how to adjust the external wideband 02 calc for my wideband (AEM UEGO). I know you are supposed to go into the SAE_GENERIC.TXT file to adjust some of the calc. As close as I can tell this is the area that would be "tweaked":

#Units Low High Fmt Op Factor Offset
#------------ ------------- ------------- ---- - ------------- -------------
*UNM-16-901
V 0.0 5.0 .2 / 204.6 0.0
AFR 10.0 20.0 .2 / 102.3 10.0

Is this correct? Can anyone explain: Fmt Op, Factor and Offset and what impact changing these values would have? Thanks in advance for the help.

jfpilla
January 11th, 2005, 02:55 PM
I'm trying to figure out how to adjust the external wideband 02 calc for my wideband (AEM UEGO). I know you are supposed to go into the SAE_GENERIC.TXT file to adjust some of the calc. As close as I can tell this is the area that would be "tweaked":

#Units Low High Fmt Op Factor Offset
#------------ ------------- ------------- ---- - ------------- -------------
*UNM-16-901
V 0.0 5.0 .2 / 204.6 0.0
AFR 10.0 20.0 .2 / 102.3 10.0

Is this correct? Can anyone explain: Fmt Op, Factor and Offset and what impact changing these values would have? Thanks in advance for the help.
Hang in there Earl. I think a lot of us need the answer.

Steve Bryant
January 11th, 2005, 03:45 PM
Guys, I'll look into it in the next couple of days. I have out of town company, but this is on my to do list.

All my best,

Steve

GMPX
January 11th, 2005, 10:49 PM
Sorry Earl, I am not sure, when Paul gets a breather from shipping orders I'm sure he'll respond.

Cheers,
Ross

AllCammedUp
January 12th, 2005, 12:18 AM
I'm trying to figure out how to adjust the external wideband 02 calc for my wideband (AEM UEGO). I know you are supposed to go into the SAE_GENERIC.TXT file to adjust some of the calc. As close as I can tell this is the area that would be "tweaked":

#Units Low High Fmt Op Factor Offset
#------------ ------------- ------------- ---- - ------------- -------------
*UNM-16-901
V 0.0 5.0 .2 / 204.6 0.0
AFR 10.0 20.0 .2 / 102.3 10.0

Is this correct? Can anyone explain: Fmt Op, Factor and Offset and what impact changing these values would have? Thanks in advance for the help.
Hang in there Earl. I think a lot of us need the answer.

Earl,

Paul is definitely the best one to respond to this. What we do know is that you have to set the low/high in the V entry to correspond to the voltage your unit reports back to the interface. The fmt should stay the same. It's the scale, offset and operand that would control how EFILive reports the data (however, I think the operand would probably stay the same for all wide-bands, but that's going to depend on how it reports its data and correlates that to a number - see below).

Here's what we do know: The PLX reports stoichiometic (14.7:1) @ 2.35V. From data on the PLX website, the PLX reports it's AFR with the following formula: AFR=((2*Volts)+10). In the included SAE_GENERIC.txt, the V factor is equal to the AFR factor * 2, and the AFR offset is equal to 10. Based on that, you could probably come close to plugging in the values for the EUGO. Now - how does one go about determining the originating AFR and/or V factor- that's the real question, because I'm not sure where that number actually comes from.

Hopefully Paul can weigh in on this and give us the final part of the answer. Thanks.

Steve Bryant
January 12th, 2005, 04:58 AM
The crux of how the external 0 - 5 VDC output is converted to a wide band AFR for display and recording via FlashScan and EFILive V7 Scan is to be found in the file sae_generic.txt which is located in the Configurations Folder/subdirectory of your EFILive (see excerpts from this file below. The External PID's portion says that there is a parameter with the description of EXT.AD1 meaning the external analog to digital input number 1 which lies closest to the ALDL/OBD2 connector on the FlashScan unit. The middle input is ground or earth reference and the terminal nearest to the ALDL is high (or positive in this case). External input number 2 uses the same ground reference terminal and the high input is closest to the USB connector. Paul set up the EXT.AD1 function to parameter number F400 (which is a hex number set aside for this type of thing) and further assigned the definition of how this parameter is processed to Slot UNM-16-901 with the applicable engineering units of V (volts) and AFR (Air:Fuel Ratio).

Now look further to the Unsigned Numeric section and you will see how UNM-16-901 is calculated/displayed and eventually recorded. I don't fully understand why Paul did this portion the way he did. However, it says that the voltage input is set up for a range of 0 to 5 volts with a precision of 2 decimal points. This voltage value is divided (/ slash operator indicates that the voltage becomes the numerator and is divided by the factor which becomes the denominator) The Offset is algebraically added to the result (dividend). Then the dividend is divided 102.4 and added to an offset of 10 to yield an AFR in the range of 10 to 20. This confuses me pretty much right now and yet I know that it works correctly on my vehicle!

The PLX M-300 (which is the default WBO2 system set-up for FlashScan) uses an equation that says Voltage Output X 2 + 10 = AFR. therefore I would have set up the units as shown in the second example.

I'm sure that there's an easy answer to this puzzle.

Steve

jfpilla
January 12th, 2005, 10:26 AM
Steve,
This is not one of my strengths, but I was planning on this.
*UNM-16-901
V 0.0 5.0 .2 / 204.6 0.0
AFR 10.0 20.0 .2 / 102.3 9.0

I use a Tech Edge WB. Output voltage is linear and updated at least 20 times/sec. The conversion formula is: AFR=(Vlin*2)+9.
Am I close?

Steve Bryant
January 12th, 2005, 10:40 AM
Joe,
It looks good to me, but I still don't understand the 204.6 and 102.3 business except the first number is twice the magnitude of the second. However, your formula parallels Paul's in all the right ways and if the offset is 9 instead of 10 as with the PLX, you should be good to go. I'm waiting for Paul to get involved to resolve this for sure.

I looked up the AEM UEGO website earlier today to see what their voltage output formula is, but I couldn't find it on their web site. Do you know where this information is on the web? I can see from what you've put down that it is volts out times two plus nine equals AFR.

Steve

jfpilla
January 12th, 2005, 10:44 AM
Joe,
It looks good to me, but I still don't understand the 204.6 and 102.3 business except the first number is twice the magnitude of the second. However, your formula parallels Paul's in all the right ways and if the offset is 9 instead of 10 as with the PLX, you should be good to go. I'm waiting for Paul to get involved to resolve this for sure.

I looked up the AEM UEGO website earlier today to see what their voltage output formula is, but I couldn't find it on their web site. Do you know where this information is on the web? I can see from what you've put down that it is volts out times two plus nine equals AFR.

Steve

Be nice if the formula is that simple.

Steve Bryant
January 12th, 2005, 11:03 AM
Joe,
For some reason I was thinking about the AEM UEGO AFR meter rather than the TechEdge unit you built. I looked up the data on the web for TechEdge just now http://www.techedge.com.au/vehicle/wbo2/1v5/techo.htm and I do think that you have the formula right. However, soon we'll both have a better idea on this. You'll know right away once you hook the WBO2 output up to your FlashScan interface and log some data. They should agree and you'll be able to tell that right away.

All my best,

Steve

jfpilla
January 12th, 2005, 11:25 AM
Joe,
For some reason I was thinking about the AEM UEGO AFR meter rather than the TechEdge unit you built. I looked up the data on the web for TechEdge just now http://www.techedge.com.au/vehicle/wbo2/1v5/techo.htm and I do think that you have the formula right. However, soon we'll both have a better idea on this. You'll know right away once you hook the WBO2 output up to your FlashScan interface and log some data. They should agree and you'll be able to tell that right away.

All my best,

Steve

I have the prebuilt. Which formula? The conversion from V or the EFI output?
http://techedge.com.au/vehicle/wbo2/1v5/techo.htm

Steve Bryant
January 12th, 2005, 12:38 PM
Joe,
Use pins 4 and 5 out of the DB9 (CON 3) since it is a linear output. That's the one that uses the voltage formula that we've been discussing.

Steve

Earl H
January 12th, 2005, 12:54 PM
The voltage vs. AFR on my AEM controller (I have the non-guage version) isn't linear. I do have a table listing Voltage/Lambda/AFR(Gas). The only conversion formula listed in the manual is a Lambda Conversion, which is Lamda X 14.65 = AFR (Gas). I haven't been able to locate the Voltage to Lambda or Voltage to AFR(Gas) formula.


Another question might be, can the AFR external PID be set up for non-linear curves?
Btw, I have the AEM 30-2301 02 Sensor Controller.

Steve Bryant
January 12th, 2005, 01:02 PM
Another question might be, can the AFR external PID be set up for non-linear curves?
Btw, I have the AEM 30-2301 02 Sensor Controller.

Earl,
I believe that the AFR External PID can be set up for non-linear curves but it may not be quite as accurate as a linear equasion. Where can I look at the curve? As I mentioned earlier, I looked at the AEM site and I couldn't find anything that showed a graph or chart or anything like that with an output voltage versus AFR or Lambda. Maybe I just missed it.

Steve

Earl H
January 12th, 2005, 01:35 PM
Here are the values found for my W/B Unit

Voltage / AFR
0.00 / 8.41
0.156 / 8.52
0.312 / 8.64
0.468 / 8.81
0.624 / 8.98
0.780 / 9.09
0.936 / 9.26
1.092 / 9.44
1.248 / 9.61
1.404 / 9.78
1.560 / 9.95
1.716 / 10.12
1.872 / 10.29
2.028 / 10.47
2.184 / 10.69
2.340 / 10.92
2.496 / 11.15
2.652 / 11.38
2.808 / 11.67
2.964 / 11.95
3.120 / 12.24
3.276 / 12.58
3.432 / 12.92
3.588 / 13.27
3.744 / 13.67
3.900 / 14.13
4.056 / 14.64
4.212 / 15.21
4.368 / 15.84
4.524 / 16.53
4.680 / 17.27
4.836 / 18.19
4.992 / 19.44

I currently have my Boost Controller set up to log A/F. I have it set up to read between 10:1 and 12:1 (1.7Volts to 3.12Volts) extremely accurately. If you chart the numbers above, you'll see that values between 10:1 and 12:1 are almost linear. It will read above and below those values but it isn't extremely accurate. If I can set up my Flashscan to do the same, I'd be happy.

Blacky
January 12th, 2005, 05:11 PM
Does your wideband controller documentation show a mathematical fomula that defines the non-linear curve of your wideband?

Something like:

a*V^2+b*v+c (quadratic)
or
a*exp(v)+c (exponential)
or something else maybe?

Regards
Paul

Earl H
January 12th, 2005, 05:17 PM
No it doesn't...I've searched the manual and the AEM website forum boards.

Steve Bryant
January 12th, 2005, 06:09 PM
The plot of AFR looks pretty logarithmic to me, but I haven't figured it out yet.

Steve

EFILive
January 12th, 2005, 06:15 PM
This formula is pretty close:

(x^5)/700 + (x^4)/650 + (x^3)/650 + (x^2)/50 + x/1.06 + 8.41

The Excel image shows actual v's function. That's as close as I can get it.
If you want I can build a calcualted PID for that formula.

EFILive
January 12th, 2005, 06:17 PM
The plot of AFR looks pretty logarithmic to me, but I haven't figured it out yet.

Steve

I agree, it is probably a logarithm of some sort.
There's too many factors in the polynomial I proposed to be considered "nice".

Paul

Steve Bryant
January 12th, 2005, 06:21 PM
Paul,
Thats a good idea, because I don't quite know how to construct the formula. Also, if you would, look on the previous page at some of my questions on calculated PID's.

Thanks,

Steve

John Skiba
January 12th, 2005, 06:54 PM
Joe,
For some reason I was thinking about the AEM UEGO AFR meter rather than the TechEdge unit you built. I looked up the data on the web for TechEdge just now http://www.techedge.com.au/vehicle/wbo2/1v5/techo.htm and I do think that you have the formula right. However, soon we'll both have a better idea on this. You'll know right away once you hook the WBO2 output up to your FlashScan interface and log some data. They should agree and you'll be able to tell that right away.

All my best,

Steve

I have the prebuilt. Which formula? The conversion from V or the EFI output?
http://techedge.com.au/vehicle/wbo2/1v5/techo.htm

Joe, I have the same unit and did it as a kit last year. I'm sure we can figure it out and Paul can maybe workup a Tech-Edge V1.5 PID? Paul?
http://techedge.com.au/vehicle/wbo2/wblambda.htm

Blacky
January 12th, 2005, 08:14 PM
Here's a brief "tutorial" on creating calculated PIDs
http://efilive.com/forum/viewtopic.php?t=1142
Paul

Earl H
January 13th, 2005, 01:13 AM
This formula is pretty close:

(x^5)/700 + (x^4)/650 + (x^3)/650 + (x^2)/50 + x/1.06 + 8.41

The Excel image shows actual v's function. That's as close as I can get it.
If you want I can build a calcualted PID for that formula.

That would be greatly appreciated.

GMPX
January 13th, 2005, 01:25 AM
This formula is pretty close:

(x^5)/700 + (x^4)/650 + (x^3)/650 + (x^2)/50 + x/1.06 + 8.41


:shock: :shock: :shock:

Never was any good at Maths.

Earl H
January 13th, 2005, 02:49 AM
Would it easier to define a formula to get to line with a better fit by only using the points between 10:1 and 12.5:1 (approx.)? Yeah, I am math-challenged as well. :lol:

...based on the formula:

(x^5)/700 + (x^4)/650 + (x^3)/650 + (x^2)/50 + x/1.06 + 8.41

Here are the changes that I made in the Calc_Pids.txt file, using the Calc_pid construction thread referenced in this post:

# Add slot definitions here
# --------------------------------
# See sae_generic.txt for more information on "SLOT" formats
#
#Units Low High Fmt Expression
#------------ ------------- ------------- ---- --------------------------------------------------------------
*CLC-00-001
AFR 8.41 19.44 .1 "({EXT.AD1}*{EXT.AD1}*{EXT.AD1}*{EXT.AD1}*{EXT.AD1} )/700 + ({EXT.AD1}*{EXT.AD1}*{EXT.AD1}*{EXT.AD1})/650 + ({EXT.AD1}*{EXT.AD1}*{EXT.AD1})/650 + ({EXT.AD1}*{EXT.AD1})/50 + {EXT.AD1}/1.06 + 8.41"

(x^5)/700 + (x^4)/650 + (x^3)/650 + (x^2)/50 + x/1.06 + 8.41


# ================================================== ============================
*PRN - Parameter Reference Numbers
# --------------------------------
# See sae_generic.txt for more information on the *PRN section
#
#Code PRN SLOT Units System Description
#------------------------- ---- ------------ ---------------- ---------------- ------------------------------------------
CALC.ELH_AFR F001 CLC-00-001 V Fuel "Ext Wideband AFR"

Does this look correct?

Dirk Diggler
January 13th, 2005, 03:35 AM
What about a linear output like the LM1


LM1: result = volts / .5 + 10

Blacky
January 13th, 2005, 07:54 AM
What about a linear output like the LM1


LM1: result = volts / .5 + 10

That one is built in to EFILive, just display {EXT.AD1} using the AFR units.
You can see the "formula" in sae_generic.txt as this:


#Units Low High Fmt Op Factor Offset
#------------ ------------- ------------- ---- - ------------- -------------
*UNM-16-901
V 0.0 5.0 .2 / 204.6 0.0
AFR 10.0 20.0 .2 / 102.3 10.0

This is the basic definition for both {EXT.AD1} and {EXT.AD2} PIDs and it converts the raw A/D value into both voltage and AFR.

Note, the SLOT name of UNM-16-901 defines the raw data as
UNM=Unsigned numeric
16=16 bit data
901=unique sequence number

The raw A/D values comming in from the external A/D pins is a value between 0 and 1023 (using a 10 bit A/D converter) which represents 0 to 5.0 volts.
Due to voltage protection built into FlashScan the highest voltage that can be recorded is 4.8V, but that does not alter the fact that 1023=5.0V

The voltage is defined as:
V=N/204.6+0 where N is the raw digital value in the range 0..1023.

To convert to AFR using AFR=V*2+10, use:
AFR=N/102.3+10

For simple linear values, you can add PID definitions like this to the calc_pids.txt file. Just make sure you use a unique SLOT name and a unique PID name.
You may reference existing SLOTs in sae_generic.txt if one exists that is the same as what you need. Most standard SLOTs are already included in sae_generic.txt.


#Code PRN SLOT Units System Description
#------------------------- ---- ------------ ---------------- ---------------- ------------------------------------------
EXT.AD1 F400 UNM-16-901 "V,AFR" External "Wide band O2"


Note: to reference the RAW data values in your PID definition, use the following reserved PRNs:
F400 = {EXT.AD1}
F401 = {EXT.AD2}
F402 = {EXT.EGT}

Regards
Paul

Earl H
January 13th, 2005, 09:10 AM
Blacky,

Got everything to work...thanks!!!

....and thanks to everyone else that lent a hand.

Blacky
January 13th, 2005, 10:39 AM
I found a neater exponential based expression, but EFILive does not support exp() yet!

exp(x)/25 + (x^2)/30 + x/1.2 + 8.41

The next release will have the following functions added:
exp()
log()
log10()
pow()
sqrt()

Regards
Paul

ViciousKnid
September 6th, 2008, 10:50 AM
I'd like to see the final results. What was the final information that was put into the calc_pid file to get it to work?

mr.prick
September 8th, 2008, 01:30 PM
I found a neater exponential based expression, but EFILive does not support exp() yet!

exp(x)/25 + (x^2)/30 + x/1.2 + 8.41

The next release will have the following functions added:
exp()
log()
log10()
pow()
sqrt()

Regards
Paul

does this refer to the
AEM 30-2300 Dual Channel &
30-2301 Single Channel O2 Sensor Controller(s)?

have you noticed that they give this formula to convert AFR from Lambda
Gasoline AFR = Lambda * 14.65

and on they`re chart it is
1.00Lambda = 14.70AFR

0.05 difference http://smiliesftw.com/x/127fs4573872.gif (http://smiliesftw.com)

they also have
30-4100
Gauge-Type UEGO Controller
that is (V*2)+10

Dynotuner
November 5th, 2008, 01:53 AM
I have the AEM 30-2300 controller also and wired the 0-1v outputs to the GM PCM (in hopes of one day using some amount of CL control) and the 0-5v outputs to a connector for Analog 2 and 3 (hoping to create a calc to average bank 1+2 for a BEN factor). I used the expression Blacky outlined since the operators now exist, but it does not seem to precisely follow the curve. Has anyone else tried this? It returns a value, but it's not completely accurate to the AFR/voltage chart. I also searched for a math expression from the mfg, but found nothing.

# AEM WB bnk1+2
# ========================
*CLC-00-001
V 0.0 5.0 .1 "{EXT.AD2}"
AFR 9.0 19.0 .1 "exp({EXT.AD2})/25+pow({EXT.AD2},2)/30+({EXT.AD2}/1.2)+8.41"
*CLC-00-002
factor 0.0 2.0 .1 "{CALC.AFR_AEM1.AFR}/{GM.AFR}"

*CLC-00-003
V 0.0 5.0 .1 "{EXT.AD3}"
AFR 9.0 19.0 .1 "exp({EXT.AD3})/25+pow({EXT.AD3},2)/30+({EXT.AD3}/1.2)+8.41"
*CLC-00-004
factor 0.0 2.0 .1 "{CALC.AFR_AEM2.AFR}/{GM.AFR}"

*UNITS


Thanks guys,
Ed

Dynotuner
November 6th, 2008, 01:04 PM
Solved my own problem. My voltage to AFR chart is different for some reason (AEM part number 30-2300 Dual UEGO). I have a 7th order polynomial that fits reasonably well, but would like further input from someone with stronger math skills than my own.

X Y
0 8.5
0.156 8.71
0.312 8.94
0.468 9.15
0.624 9.39
0.78 9.6
0.936 9.79
1.092 10.01
1.248 10.23
1.404 10.46
1.56 10.68
1.716 10.9
1.872 11.13
2.028 11.35
2.184 11.57
2.34 11.8
2.496 12.02
2.652 12.24
2.808 12.46
2.964 12.69
3.12 12.91
3.276 13.19
3.432 13.47
3.588 13.75
3.744 14.03
3.9 14.31
4.056 14.7
4.212 15.14
4.368 15.87
4.524 16.54
4.68 17.49
4.836 18.83
4.992 20.67

joecar
November 6th, 2008, 02:51 PM
Dyno,

If you can post the polynomial equation I can write you a calc pid for it...

e.g. afr = a*v^7 + b*v^6 + c*v^5 + d*v^4 + e*v^3 + f*v^2 + g*v + h

joecar
November 6th, 2008, 02:59 PM
You or I can refactor this as (using Horner's method):

afr = ((((((a * v + b) * v + c) * v + d) * v + e) * v + f) * v + g) * v + h

joecar
November 6th, 2008, 03:08 PM
How do you get Excel to spit out a polynomial...? :redface: :doh:

Dynotuner
November 7th, 2008, 01:14 AM
Thanks joecar. I can write the calc PID - I was just looking for a better (more elegant) expression. I did not use Excel. I'll PM you later with more on topic and the project I'm on.

joecar
November 7th, 2008, 07:06 AM
Ok, thanks. :cheers:

mr.prick
May 17th, 2009, 01:35 PM
So has this mystery been solved?
Has anyone tried this:

AFR 8.50 20.70 0.3 "Lookup({EXT.AD1}, 0.00,8.50, 0.156,8.71, 0.312,8.94, 0.468,9.15, 0.624,9.39, 0.780,9.60, 0.936,9.79, 1.092,10.01, 1.248,10.23, 1.404,10.46, 1.560,10.68, 1.716,10.90, 1.872,11.13, 2.028,11.35, 2.184,11.57, 2.340,11.80, 2.496,12.02, 2.652,12.24, 2.808,12.46, 2.964,12.69, 3.120,12.91, 3.276,13.19, 3.432,13.47, 3.588,13.75, 3.744,14.70, 3.900,14.31, 4.056,14.70, 4.212,15.14, 4.368,15.87, 4.524,16.54, 4.680,17.49, 4.836,18.83, 4.992,20.67)"

joecar
May 17th, 2009, 05:47 PM
Lookup() interpolates linearly between points... so it will introduce a small error compared to the polynomial equation.

gmh308
May 25th, 2009, 09:29 AM
Lookup() interpolates linearly between points... so it will introduce a small error compared to the polynomial equation.

I saw something similar in the equation for calculating VE: displacement().

VEpcm
"{SAE.MAF.gps}*({SAE.IAT.C}+273.15)/((displacement()*61.024)*{SAE.RPM}*{SAE.MAP.kPa})* 6155274.24"

Where is the variable for displacement set? Anyone know?

And.....does the V2 support CALC pids?

Cheers! :cheers:

mr.prick
May 25th, 2009, 12:22 PM
Lookup() interpolates linearly between points... so it will introduce a small error compared to the polynomial equation.

What's the equation? :grin:



Where is the variable for displacement set? Anyone know?


The sae.generic.txt in C:\Program Files\EFILive\V7.5\Configuration



And.....does the V2 support CALC pids?


Is this a serious question? :confused:

gmh308
May 25th, 2009, 02:26 PM
What's the equation? :grin:



The sae.generic.txt in C:\Program Files\EFILive\V7.5\Configuration



Is this a serious question? :confused:


Yes in SAE_generic.txt there is a "displacement()" function that is listed in several VE calc PIDs, so does the variable returned by "displacement()" need to be defined in a define statement somewhere, or is it as simple as replacing "displacement()" with i.e. 6000 for 6 litres?

And yes it was a serious question re V2 and Calc PID's, but was poorly phrased.....

Trying again.....

Does V2 BBL directly support CALC PID's, or does the PID need to be defined and available for BBL to log, and then the CALC PID is selected once EFILive Scan is open?

My apologies for my poor phraseology Mr.P. :)

mr.prick
May 25th, 2009, 04:04 PM
Lookup() interpolates linearly between points... so it will introduce a small error compared to the polynomial equation.
I thought I read something about limiting the length of an equation. :blahblah:


Yes in SAE_generic.txt there is a "displacement()" function that is listed in several VE calc PIDs, so does the variable returned by "displacement()" need to be defined in a define statement somewhere, or is it as simple as replacing "displacement()" with i.e. 6000 for 6 litres?

And yes it was a serious question re V2 and Calc PID's, but was poorly phrased.....

Trying again.....

Does V2 BBL directly support CALC PID's, or does the PID need to be defined and available for BBL to log, and then the CALC PID is selected once EFILive Scan is open?

My apologies for my poor phraseology Mr.P. :)

My bad that one went over my head. :doh2:
For BBL no.
The only PIDs BBL can log are defined in the .txt files located in:
C:\Program Files\EFILive\V8\Documents\Pid Descriptions.

Log the prerequisite PIDs for your calc.pid then after your log is saved,
you can select the calc.pid and have it's data available.
I don't think most people know about this. :secret:

I imagine "displacement" = CI
I suppose you could make it CI or CC and create your PID around it.

gmh308
May 25th, 2009, 04:45 PM
I thought I read something about limiting the length of an equation. :blahblah:

My bad that one went over my head. :doh2:
For BBL no.
The only PIDs BBL can log are defined in the .txt files located in:
C:\Program Files\EFILive\V8\Documents\Pid Descriptions.

Log the prerequisite PIDs for your calc.pid then after your log is saved,
you can select the calc.pid and have it's data available.
I don't think most people know about this. :secret:

I imagine "displacement" = CI
I suppose you could make it CI or CC and create your PID around it.

No worries man.

Actually the displacement works out to be in litres. The input data which the "displacement()" should return, may be in the "customer" vehicle info, but that info is in cc's i.e. 7L = 7000cc, and it does not make it into the CALC PID expression via the "displacement()" function for some reason.

Anyway, in the case I am looking at, substituting "7" for "displacement()" in the sae_generic.txt file produces the right VE numbers.

Final challenge is that saving a .pid file with VE selected sees VE not stick, and/or drops out when the log is loaded. Needs to be re-selected after a log file is loaded. :doh:

Cheers.

mr.prick
May 25th, 2009, 05:31 PM
No worries man.

Actually the displacement works out to be in litres.

Nice work, I figured because B0104 is in cc/ci that "displacement" would
be defined that way. (my OS has no way to define volume in liters.)
I guess I should have done the math. :hihi:
Here's a spreadsheet for Cylinder Volume (http://www.marcintology.com/tuning/borestrokecylinder.xls)

joecar
May 26th, 2009, 03:55 AM
I don't remember how many characters long an equation is limited to...

but a calc pid using lookup() can also be quite long...

a calc pid polynomial equation can be "shortened" by rewriting it using Horner's Method...

write both out and see which is shorter.

mr.prick
May 26th, 2009, 06:39 AM
LOL
Yeah it will be shorter, but I'm talking about the math out put.
Would'nt it take longer to do long math than look up and interpolate between?

joecar
May 26th, 2009, 06:57 AM
Oh, yeah you may be right... the tradeoff is precision vs time... and polynomials do take time.

gmh308
May 26th, 2009, 07:56 AM
Hey Joe. Any idea where the "displacement()" function used in the VE calc is looking for its variable?

Thx, Ian

joecar
November 22nd, 2009, 04:54 PM
Hey Joe. Any idea where the "displacement()" function used in the VE calc is looking for its variable?

Thx, IanHas this ever been answered...?

I believe it gets it from the Displacement field in the File->Enter Vin window.

gmh308
November 22nd, 2009, 05:01 PM
Has this ever been answered...?

I believe it gets it from the Displacement field in the File->Enter Vin window.

Sorry I thought i posted. Displacement() returns zip. So wrote the displacement in as hard text. Just cant recall if it was 7000 or 7.0. :doh2:

mr.prick
November 22nd, 2009, 11:57 PM
Too bad we can't define the displacement of the engine.
The only options are stock CI/CC.

gmh308
November 23rd, 2009, 12:23 AM
Too bad we can't define the displacement of the engine.
The only options are stock CI/CC.

In sae_generic.txt whatever displacement is required can be assigned:

For example change:

# VEpcm is %VE*28.96 (28.96 = molar mass of air)

VEpcm 0.0 3000.0 .2 "{SAE.MAF.gps}*({SAE.IAT.C}+

273.15)/((displacement()*61.024)*{SAE.RPM}*{SAE.MAP.kPa})* 6155274.24"

To:

# VEpcm is %VE*28.96 (28.96 = molar mass of air)

VEpcm 0.0 3000.0 .2 "{SAE.MAF.gps}*({SAE.IAT.C}+

273.15)/(7015*61.024)*{SAE.RPM}*{SAE.MAP.kPa})*6155274.24"

IIRC it is in CC's, but maybe also in litres. :shock:

joecar
November 23rd, 2009, 04:28 AM
Sorry I thought i posted. Displacement() returns zip. So wrote the displacement in as hard text. Just cant recall if it was 7000 or 7.0. :doh2:If it returns zero then that is a bug.

Blacky
November 23rd, 2009, 08:16 AM
To make the displacement() function work, you need to set up a customer file for the vehicle.

1. Connect to the vehicle.
2. Click on the Customer icon in the toolbar.
3. Enter whatever info you like (especially the displacement). If your particular displacement is not listed, just type the 4 digit displacement in cubic cm. To convert from cubic inches to cubic centimeters, multiply CI by 16.387064.
4. Click [Save], customer details will be saved that match the VIN of the connected vehicle.
5. Log data - displacement will be available as liters. I.e. if your engine size was specified as 5669 CC in the customer details window, then the displacement() function will return 5.669 liters.
6. Stop logging, save log file. log file will now contain a copy of the customer details.
7. If those details need to be changed on a per log file basis, edit the details in the log file using Edit->Log file information.

Regards
Paul

Blacky
November 23rd, 2009, 08:18 AM
Here's an example calc_pids.txt file that has displacement in it.

Regards
Paul

gmh308
November 23rd, 2009, 10:07 AM
To make the displacement() function work, you need to set up a customer file for the vehicle.

1. Connect to the vehicle.
2. Click on the Customer icon in the toolbar.
3. Enter whatever info you like (especially the displacement). If your particular displacement is not listed, just type the 4 digit displacement in cubic cm. To convert from cubic inches to cubic centimeters, multiply CI by 16.387064.
4. Click [Save], customer details will be saved that match the VIN of the connected vehicle.
5. Log data - displacement will be available as liters. I.e. if your engine size was specified as 5669 CC in the customer details window, then the displacement() function will return 5.669 liters.
6. Stop logging, save log file. log file will now contain a copy of the customer details.
7. If those details need to be changed on a per log file basis, edit the details in the log file using Edit->Log file information.

Regards
Paul

From memory something like that was tried, though dont recall the save log/read log part. Thanks for the instructions. Will try again some time.

Did you write that from memory Paul?

Blacky
November 23rd, 2009, 10:59 AM
I think the only "restriction" is that you need to have the customer details set up before starting to log the data. That way the customer details are copied correctly into the start of the log file.

The "bug", is that if a log saved without any customer details then editing the log file information that was created with no customer details, then you can't easily add the missing details (i.e. gross vehicle mass and displacement).

Regards
Paul

mr.prick
November 23rd, 2009, 12:59 PM
LOL
I ever tried to manually input the displacement.
I saw the drop down arrow and assumed the only choice was stock. :doh: