# Thread: V8 Scan - Calculated Pids

1. ## V8 Scan - Calculated Pids

Can we get an official break down or explanation on creating calculated pids for V8 or let me know if your happy with my explanation?

I've created a few Ben's tonight so i can start playing with the AEM CAN Wideband so thought i'd let everyone else know what i did.

1) Just like adding calculated pids for V7.5, get your self a good text editor. I recommend Notepad++
2) Browse to your My Documents\EFILive\V8\Config folder and open up the UserCalculatedPids.ini file
3) Copy in the sample data below

Sample Pids for AEM Can Wideband:

[Groups]
WO2CAN=Wide Band O2 Sensors - Canbus

[WO2CAN]
CANBEN_1="Base Efficiency Numerator 1 - Canbus",factor,3
CANBEN_2="Base Efficiency Numerator 2 - Canbus",factor,3
CANBEN_1_E40="Base Efficiency Numerator 1 E40 - Canbus",factor,3
CANBEN_2_E40="Base Efficiency Numerator 2 E40 - Canbus",factor,3

[WO2CAN.BEN_1]
0=|-- WO2CAN.BEN_1
1=|return pid("WO2S11")/pid("EQ_RAT")

[WO2CAN.BEN_2]
0=|-- WO2CAN.BEN_2
1=|return pid("WO2S12")/pid("EQ_RAT")

[WO2CAN.BEN_1_E40]
0=|-- WO2CAN.BEN_1
1=|return pid("WO2S11")*pid("EQ_RAT")

[WO2CAN.BEN_2_E40]
0=|-- WO2CAN.BEN_2
1=|return pid("WO2S12")*pid("EQ_RAT")

My understanding of the pid break downs is it's all similar to the old way doing things, except now you set them up via groups.

For each group, you have your old "PRN" or Description information, but you also set the formatting info here.

CANBEN_1="Base Efficiency Numerator 1 - Canbus",factor,3

In the old V7.5 format it would look like this:
CALC.Lambda-WO2BENS F110 CLC-00-115 factor "W02-Ben" "BEN from External Lambda"

Now the math or calculating part is defined for each one of those in the next break down:
[WO2CAN.BEN_1]
0=|-- WO2CAN.BEN_1
1=|return pid("WO2S11")/pid("EQ_RAT")

Obviously the first line in brackets is the header for your pid as such will be listed in your master group.

The next few lines I'm guessing tell the scanner what to do with the data. I'm not sure why the first 0 line is required, but it seems obvious what the 1 line does.

That's our "work" part where all the magic happens. we are telling it to use the data from the W02S11 pid & then divide or multiple by another pid etc, Just like we would set up in the old V7.5 slot definition area.
factor 0.5 1.5 .3 "{EXT.WO2LAM1}/{SAE.LAMBDA}"

Now looking at the above and some of the efilive defined pids, I'm actually thinking it might be possible to setup/define something like below to have all the CAN wb's.

[WO2CAN.BEN_1]
0=|-- WO2CAN.BEN_1
1=|return pid("WO2S11,WO2S12,WO2S21,WO2S22")/pid("EQ_RAT")

EFi Guys?

3. Yes, that is my understanding...

but the following won't define BEN's for all your widebands... it selects whichever of the mentioned pids is available, and from it it calculates this particular BEN.
[WO2CAN.BEN_1]
0=|-- WO2CAN.BEN_1
1=|return pid("WO2S11,WO2S12,WO2S21,WO2S22")/pid("EQ_RAT")

I'm not sure, but see my corrections (based on your definitions above) below:
( and further corrections to correct my omission )
[WO2CAN]
CANBEN_1="Base Efficiency Numerator 1 - Canbus",factor,3
CANBEN_2="Base Efficiency Numerator 2 - Canbus",factor,3
CANBEN_1_E40="Base Efficiency Numerator 1 E40 - Canbus",factor,3
CANBEN_2_E40="Base Efficiency Numerator 2 E40 - Canbus",factor,3

[WO2CAN.CANBEN_1]
0=|-- WO2CAN.CANBEN_1
1=|return pid("WO2S11")/pid("EQ_RAT")

[WO2CAN.CANBEN_2]
0=|-- WO2CAN.CANBEN_2
1=|return pid("WO2S12")/pid("EQ_RAT")

[WO2CAN.CANBEN_1_E40]
0=|-- WO2CAN.CANBEN_1_40
1=|return pid("WO2S11")*pid("EQ_RAT")

[WO2CAN.CANBEN_2_E40]
0=|-- WO2CAN.CANBEN_2_E40
1=|return pid("WO2S12")*pid("EQ_RAT")

4. I'm trying to do this:

Combining my AEM CAN pid into my serial pid would be this:

[Groups]
WO2SER=Wide Band O2 Sensors (Serial Comms)
WO2CAN=Wide Band O2 Sensors (CAN bus)

[WO2SER]
WO2BEN="Base Efficiency Numerator (Serial Comms)(Dynamically Leanest)",factor,3

[WO2CAN]
WO2BEN="Base Efficiency Numerator (CAN bus)(Dynamically Leanest)",factor,3

[WO2SER.WO2BEN]
0=|-- WO2SER.WO2BEN
1=|return iff(pid("WO2LAM1")>pid("WO2LAM2"),pid("WO2LAM1"),p id("WO2LAM2"))*pid("EQIVRATIO")

[WO2CAN.WO2BEN]
0=|-- WO2CAN.WO2BEN
1=|return iff(pid("WO2S11")>pid("WO2S21"),pid("WO2S11"),pid( "WO2S21"))/pid("LAMBDA")
I need the iff() to be defined.

5. I ended up defining my own iff(), but I'm wanting iff() to be a function not a calc pid...

0=|-- CALC.IFF
1=|function iff(x,y,z)
2=| if (x) then
3=| return y
4=| else
5=| return z
6=| end
7=|end

6. I understand that EQ_RAT is LAMBDA or 1/LAMBDA.

7. Paul, also see this:

8. Originally Posted by joecar
Yes, that is my understanding...

but the following won't define BEN's for all your widebands... it selects whichever of the mentioned pids is available, and from it it calculates this particular BEN.

I'm not sure, but see my corrections (based on your definitions above) below:

Yeah the inversion thing for e40 is easy to fix on the pid, If only we could sweet talk the guys into fixing the editor scales to match all the other ls1/e38 scales. (i.e transpose the axis around).

I'll test out the canbus AEM further on the weekend as i just did a quick and dirty wire up of the guage to see if i could get it working. Biggest change is getting used to the V8 scanner. I still havent worked out how to set the data parameter in the maps yet either. I set the axis, but don't see anything obvious about what data it's using.

9. Yeah, V8 scantool is a major change in way of thinking vs V7 scantool.

Even tho we log the AEM via CAN bus using FSV2, we should still be able to view the log in V7 scantool, is that not true...?

lol, looking at my corrections, I see I omitted something.

10. I haven't been able to open any v8 logs in 7.

V7 also wont allow you to log 2 different controllers either I believe. So to use the AEM, we have to use the V8 scanner or setup BBX.

Page 1 of 4 123 ... Last

#### Posting Permissions

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