Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 43

Thread: Designing a New Custom PE Mode PID..I need help..

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

    Default

    Same with this aproach (SELBEN)... the SELBEN iff() uses pids delayed by one frame.

    Look closely, you will see that SELBEN is delayed by one frame compared to WO2BEN1.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	VET SELBEN pid is calculated using delayed pids in the iff.png 
Views:	152 
Size:	90.4 KB 
ID:	9766  
    Attached Files Attached Files
    Last edited by joecar; January 25th, 2011 at 09:48 AM.

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

    Default

    Shawn, so this approach seems the best:

    Quote Originally Posted by joecar View Post
    Shawn,

    Look closely at iff() syntax: iff(cond, then, else)


    *CLC-00-002
    factor 0.5 1.0 .2 "({GM.EQIVRATIO} > 1.00) && ({SAE.RPM} > 2000)"

    *CLC-00-003

    % 0.0 100.0 .2 "iff(!{CALC.PEMODE}, {SAE.MAF.gps}*({GM.DYNAIRTMP_DMA. C}+273.15)*3445.2/(5.669*{SAE.RPM}*{SAE.MAP.kPa})*{CALC.LTFTBEN}, 0)"
    VE 0.0 3.0 .4 "iff(!{CALC.PEMODE}, {SAE.MAF.gps}*({GM.DYNAIRTMP_DMA. C}+273.15)*15/({SAE.RPM}*{SAE.MAP.kPa})*{CALC.LTFTBEN}, 0)"

    *CLC-00-004

    % 0.0 100.0 .2 "iff({CALC.PEMODE}, {SAE.MAF.gps}*({GM.DYNAIRTMP_DMA.C}+273.15)*3445. 2/(5.669*{SAE.RPM}*{SAE.MAP.kPa})*{CALC.BEN1}, 0)"
    VE 0.0 3.0 .4 "
    iff({CALC.PEMODE}, {SAE.MAF.gps}*({GM.DYNAIRTMP_DMA.C}+273.15)*1 5/({SAE.RPM}*{SAE.MAP.kPa})*{CALC.BEN1}, 0)"


    Also note these things:

    The ! operator does a NOT which inverts the logical sense,
    i.e. !true = false and !false = true.

    & is a bit AND, && is a logical AND, you need &&.


    Is that what you're trying to say...?

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

    Default

    What about this:


    *CLC-00-003
    % 0.0 100.0 .2 "iff({CALC.PEMODE},
    ({SAE.MAF.gps}*({GM.DYNAIRTMP_DMA.C}+273.15)*3445. 2/(5.669*{SAE.RPM}*{SAE.MAP.kPa})*{CALC.BEN1}), ({SAE.MAF.gps}*({GM.DYNAIRTMP_DMA. C}+273.15)*3445.2/(5.669*{SAE.RPM}*{SAE.MAP.kPa})*{CALC.LTFTBEN}))"
    VE 0.0 3.0 .4 "iff({CALC.PEMODE},
    ({SAE.MAF.gps}*({GM.DYNAIRTMP_DMA.C}+273.15)*1 5/({SAE.RPM}*{SAE.MAP.kPa})*{CALC.BEN1}), ({SAE.MAF.gps}*({GM.DYNAIRTMP_DMA. C}+273.15)*15/({SAE.RPM}*{SAE.MAP.kPa})*{CALC.LTFTBEN}))"


    I haven't tried that and I'm wondering if it fits (upto how many characters can a calc pid be...?)
    Last edited by joecar; January 25th, 2011 at 10:02 AM.

  4. #24
    R.I.P Shawn, 1956-2011 WeathermanShawn's Avatar
    Join Date
    Jul 2008
    Posts
    1,807

    Default

    Joe:

    Interesting on the delay..I'm assuming that would be a 'fatal flaw'..

    I must be doing too much copying and pasting..I can never seem to get the CALC.VET Table to produce a value. If I can straighten out my calc_pids.txt file to look like yours that would help.

    I'll also do a short log with GM.STATE03 PID selected and see how that goes.

    Thanks for the help. Do you think it is doable or are we just going to have to live with filtering in lieu of this concept?
    2002 Black Camaro Z-28 M6 Hardtop 11.0:1CR 425HP/410TQ SAE (400TQ@3500RPM)
    200cc Heads, 228/232 110+2 Cam, 1 3/4" LT's w/catts, GMMG, Koni Shocks, Hotchkis Springs, 35/21 Sways, 17" ZR1's, 3.90 Gears Roadrunner PCM LM-2 Serial Wideband
    EFILive Closed-Loop MAF/SD Hybrid Tune..


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

    Default

    Quote Originally Posted by joecar View Post
    What about this:


    *CLC-00-003
    % 0.0 100.0 .2 "iff({CALC.PEMODE},
    ({SAE.MAF.gps}*({GM.DYNAIRTMP_DMA.C}+273.15)*3445. 2/(5.669*{SAE.RPM}*{SAE.MAP.kPa})*{CALC.BEN1}), ({SAE.MAF.gps}*({GM.DYNAIRTMP_DMA. C}+273.15)*3445.2/(5.669*{SAE.RPM}*{SAE.MAP.kPa})*{CALC.LTFTBEN}))"
    VE 0.0 3.0 .4 "iff({CALC.PEMODE},
    ({SAE.MAF.gps}*({GM.DYNAIRTMP_DMA.C}+273.15)*1 5/({SAE.RPM}*{SAE.MAP.kPa})*{CALC.BEN1}), ({SAE.MAF.gps}*({GM.DYNAIRTMP_DMA. C}+273.15)*15/({SAE.RPM}*{SAE.MAP.kPa})*{CALC.LTFTBEN}))"


    I haven't tried that and I'm wondering if it fits (upto how many characters can a calc pid be...?)
    This approach also has the delay...

    The only way I see to go is take this approach and make the following changes:
    - replace {CALC.BEN1} with ({GM.EQIVRATIO} * {EXT.WO2LAM1})
    - replace {CALC.LTFTBEN} with (({SAE.LONGFT1} + {SAE.LONGFT2})/200+1)

    i.e. replace all calc pids with their base definition, i.e. avoiding all calc pids in the iff(), this should eliminate the one frame delay.
    Last edited by joecar; January 25th, 2011 at 09:49 AM.

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

    Default

    i.e.

    *CLC-00-003
    % 0.0 100.0 .2 "iff({CALC.PEMODE},
    ({SAE.MAF.gps}*({GM.DYNAIRTMP_DMA.C}+273.15)*3445. 2/(5.669*{SAE.RPM}*{SAE.MAP.kPa})*({GM.EQIVRATIO}*{EXT.WO2LAM1})), ({SAE.MAF.gps}*({GM.DYNAIRTMP_DMA. C}+273.15)*3445.2/(5.669*{SAE.RPM}*{SAE.MAP.kPa})*(({SAE.LONGFT1}+{SAE.LONGFT2})/200+1)))"
    VE 0.0 3.0 .4 "iff({CALC.PEMODE},
    ({SAE.MAF.gps}*({GM.DYNAIRTMP_DMA.C}+273.15)*1 5/({SAE.RPM}*{SAE.MAP.kPa})*({GM.EQIVRATIO}*{EXT.WO2LAM1})), ({SAE.MAF.gps}*({GM.DYNAIRTMP_DMA. C}+273.15)*15/({SAE.RPM}*{SAE.MAP.kPa})*(({SAE.LONGFT1}+{SAE.LONGFT2})/200+1)))"

    Shawn, copy/paste this, I believe I have all the parentheses balanced and accounted for.
    Last edited by joecar; January 25th, 2011 at 09:51 AM.

  7. #27
    R.I.P Shawn, 1956-2011 WeathermanShawn's Avatar
    Join Date
    Jul 2008
    Posts
    1,807

    Default

    Yea, that makes sense.

    For some reason on my last log I neglected to log EXT.WO2LAM1 so one of my BEN PIDS is different than yours and creating confusion in my mind.

    So, I am going to take a short drive and re-do a decent PE Mode log. Perhaps when you are comfortable with it, you can re-post your calc_pids.txt file. I'll sync up with it here so it makes more sense. I.E., copying and pasting leads to errors..
    2002 Black Camaro Z-28 M6 Hardtop 11.0:1CR 425HP/410TQ SAE (400TQ@3500RPM)
    200cc Heads, 228/232 110+2 Cam, 1 3/4" LT's w/catts, GMMG, Koni Shocks, Hotchkis Springs, 35/21 Sways, 17" ZR1's, 3.90 Gears Roadrunner PCM LM-2 Serial Wideband
    EFILive Closed-Loop MAF/SD Hybrid Tune..


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

    Default

    Another idea: if wideband is present, then use this for both PE and non-PE calculations of VE...

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

    Default

    ({GM.EQIVRATIO}*{EXT.WO2LAM1}) can be replaced with ({GM.EQIVRATIO}/{EXT.WO2EQR1})

    i.e.

    *CLC-00-003
    % 0.0 100.0 .2 "iff({CALC.PEMODE},
    ({SAE.MAF.gps}*({GM.DYNAIRTMP_DMA.C}+273.15)*3445. 2/(5.669*{SAE.RPM}*{SAE.MAP.kPa})*({GM.EQIVRATIO}/{EXT.WO2EQR1})), ({SAE.MAF.gps}*({GM.DYNAIRTMP_DMA. C}+273.15)*3445.2/(5.669*{SAE.RPM}*{SAE.MAP.kPa})*(({SAE.LONGFT1}+{SAE.LONGFT2})/200+1)))"
    VE 0.0 3.0 .4 "iff({CALC.PEMODE},
    ({SAE.MAF.gps}*({GM.DYNAIRTMP_DMA.C}+273.15)*1 5/({SAE.RPM}*{SAE.MAP.kPa})*({GM.EQIVRATIO}/{EXT.WO2EQR1})), ({SAE.MAF.gps}*({GM.DYNAIRTMP_DMA. C}+273.15)*15/({SAE.RPM}*{SAE.MAP.kPa})*(({SAE.LONGFT1}+{SAE.LONGFT2})/200+1)))"


    I'll re-edit my calc_pids.txt and try it out when I get home tonite.
    Last edited by joecar; January 25th, 2011 at 09:51 AM.

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

    Default

    Yes, please excuse the abuse of colour, I was trying to use it to make sure I had balanced the parentheses.

Page 3 of 5 FirstFirst 12345 LastLast

Similar Threads

  1. PID Availablity problems in passthrough logging mode.
    By XLR8NSS in forum FlashScan V2 BB Logging
    Replies: 2
    Last Post: November 29th, 2007, 01:45 PM
  2. How do you make a custom PID???
    By WiseGuyZ06 in forum General (Petrol, Gas, Ethanol)
    Replies: 2
    Last Post: October 10th, 2007, 11:20 AM
  3. Custom PID: What functions can you use?
    By 2002_z28_six_speed in forum General
    Replies: 2
    Last Post: September 3rd, 2007, 06:05 PM
  4. Why LM-1 Custom PID???????
    By 2002_z28_six_speed in forum General
    Replies: 3
    Last Post: June 4th, 2007, 12:52 AM
  5. Anyone made a custom mpg (or km/L) PID?
    By thunder550 in forum General
    Replies: 3
    Last Post: May 17th, 2006, 04:38 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
  •