PDA

View Full Version : Pid division in V8 working



vzsv8
August 22nd, 2018, 09:05 PM
I have been trying to calculate fuel economy custom PIDs in V8 in Litres per Hour and Litres per 100 kM. Each time I performed a division using a PID all I got was a full trace of zeros. eg / pid("VSS") or /pid("ECM.VSS"). The problem appears to be that as soon as an error is generated (ie divide by zero, such as when VSS = 0) the 'return' value remains at zero from then on.
I ended up using an if, then, else statement to trap the error and no more error.
I have included a Chart screenshot and UserCalculatedPids.ini for your enjoyment.
The vehicle is a 2007 Holden Calais 6.0 Litre L98. The LPH and LPer100kM figures match well with the DIC and manually calculated figures.
Cheers Steve.

ps UserCalculatedPids.ini has a .txt extension.

joecar
August 23rd, 2018, 05:28 AM
vzsv8, thanks for posting that.



I'm calculating miles/gallon using this: "{SAE.VSS.mph}/{GM.INJFLOW.lbpm}/{CALC.INJDC1}*100/60/8*6.073"

vzsv8
August 23rd, 2018, 12:11 PM
Hi Joecar, I used basically the inverse of your equation in version 7.5 ( '{}' is the clue to version) and LS2's do not have GM.INJFLOW or an equivalent.
My attempt works with my new ride and displays correctly in version 8. Perhaps I am expecting too much but maybe one day version 8 will be the only one, or the only supported one.
Interestingly ECM.INJPDELTA, the effective fuel pressure between the fuel rail and manifold seems to be allowed for by the ECU and does not need to be included in the economy equation.

Cheers Steve

joecar
August 23rd, 2018, 07:25 PM
Ok, I see, GM.INJFLOW is not available in LS2/E40.