Pages: 1 2 [3] 4
Author Topic: Spark Retard and Enrich Launch Control for 2.7t ME7.1 8D0907551M  (Read 20183 times)
nyet
Administrator
Hero Member
*****

Karma: +604/-166
Offline Offline

Posts: 12233


WWW
« Reply #30 on: June 18, 2018, 01:22:08 PM »

I have never ever had issues with misfire detection on ME7 with my NLS and LC algorithm.
But maybe that's because I don't use copy-paste code? :p

Thanks. The question wasn't out of personal experience, just curiosity about which circumstances might cause misfire detection to be triggered and if they exist, what approach one should take to avoid it, or if detection has to be deliberately disabled during LC/NLS activation
Logged

ME7.1 tuning guide (READ FIRST)
ECUx Plot
ME7Sum checksum checker/corrrector for ME7.x

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your experience.
woj
Hero Member
*****

Karma: +41/-3
Offline Offline

Posts: 500


« Reply #31 on: June 18, 2018, 02:25:41 PM »

But maybe that's because I don't use copy-paste code? :p

C'mon, copy and paste is a good method, if you know what you are doing Wink Otherwise we would be nowhere anywhere where we are with software today. And don't tell me you've never done it Wink
Logged
woj
Hero Member
*****

Karma: +41/-3
Offline Offline

Posts: 500


« Reply #32 on: June 18, 2018, 02:31:01 PM »

Thanks. The question wasn't out of personal experience, just curiosity about which circumstances might cause misfire detection to be triggered and if they exist, what approach one should take to avoid it, or if detection has to be deliberately disabled during LC/NLS activation

Don't recall where it was, but that's the same thing gt-innovation said when I asked about this - ME7-s are not a problem, but some MED-s may or may not complain. I guess it all depends on the misfire detection algorithms which with sensitivity growing with sophistication will cause trouble.
Logged
Cadensdad14
Full Member
***

Karma: +8/-1
Offline Offline

Posts: 134


« Reply #33 on: June 19, 2018, 03:44:43 AM »

C'mon.  I feel like im doing halfway decent for someone whos never written a line of code or done disassembly ever before working without an assembler.  I at least am starting to be able to read code that i haven't been told what it is, and find variables and maps that are missing out of my definitions.  Like the system constant min and max values for timing. 
Logged
TijnCU
Hero Member
*****

Karma: +60/-4
Offline Offline

Posts: 690


flying brick


« Reply #34 on: June 19, 2018, 05:01:03 AM »

Yes its not bad what you have gathered, and also nice you try to do it out in the open. Ok, compliment mode off.
You can not log or view custom ignition angles in ZWIST (or any other variable for that matter) if you place them in ZWOUT. That is because they never passed through there. You change it right at the end of the chain. But if you log ZWOUT and see the number, you can be sure actual follows this.
That is what we have been telling you, but you seem to like the sightseeing tourist tour approach  Cheesy
let me help you:
Code:
ROM:008A4040 ; =============== S U B R O U T I N E =======================================
ROM:008A4040
ROM:008A4040
ROM:008A4040 als_zwoutset:                           ; CODE XREF: sub_89CD08:zwout_als1P
ROM:008A4040                                         ; sub_89CD08:loc_89CDA6P ...
ROM:008A4040                 extp    #0E0h, #1 ; 'a'
ROM:008A4044                 movb    rl6, B_alsflags
ROM:008A4048                 cmpb    rl6, #0
ROM:008A404C                 jmpr    cc_NZ, als_zwout
ROM:008A404E
ROM:008A404E stk_zwout:
ROM:008A404E                 movb    zwout, [r12]
ROM:008A4052                 jmpr    cc_UC, zwout_ret
Ok, all fine up to here. But then you totally screw things up!
Code:
ROM:008A4054 ; ---------------------------------------------------------------------------
ROM:008A4054
ROM:008A4054 als_zwout:                              ; CODE XREF: als_zwoutset+Cj
ROM:008A4054                 movb    rl4, #0E4h ; 'S' ------------------>this is your hardcoded value? (E4 translates to -21*)
ROM:008A4058                 movb    rl4, zwout  ; ---------------------> ok, so whatever you just did, you erased it and placed zwout over it...
ROM:008A405C                 jmpr    cc_UC, zwout_ret ; --------------> so now you jump back to the original code with zwout in rl4, but nothing new in zwout?  

Read it, think about it and understand where the error is.

Advanced version of this:
To make the function more flexible, you can change the hardcoded number and place either a flash location (extp #8Ah, movb rl4, byte_8A1234 for example and place your editable angle there). Benefit of this is you place the value somewhere safe, where people dont accidentally write the wrong parts of the code.
You can also make a seperate lookup function for 2D or 3D and have the result end in custom ram adress 0x381234. Then you can use this ram adress in your code (extp 0E0h, movb rl4, byte_381234). Benefit of this approach is you have a variable that will be calculated from a map, conditions etc.
« Last Edit: June 19, 2018, 05:44:49 AM by TijnCU » Logged

Cadensdad14
Full Member
***

Karma: +8/-1
Offline Offline

Posts: 134


« Reply #35 on: June 19, 2018, 05:39:42 AM »

I caught that after my first test and felt stupid..  I had made the instruction F3 instead of F7.  I rewrote it, went out and tested it, still got a epc light.
Logged
Cadensdad14
Full Member
***

Karma: +8/-1
Offline Offline

Posts: 134


« Reply #36 on: June 19, 2018, 05:47:31 AM »

On my original, everything worked when I tested it.  zwgru dropped, zmnms also dropped.  Zwopt was high and zwist and zwout followed each other.  Im thinking if I drop zwist, zwout would follow.  A lot like how the overrun fueling stuff needs a change to zwopt to retard the timing. That said a simplification over the original seems like a good idea.

I also understand the ram location write, I just did the constant because all the maps i did were the same throughout, so a constant was fine.  And the constant can be addressed through an xdf.
« Last Edit: June 19, 2018, 05:56:32 AM by Cadensdad14 » Logged
TijnCU
Hero Member
*****

Karma: +60/-4
Offline Offline

Posts: 690


flying brick


« Reply #37 on: June 19, 2018, 05:53:44 AM »

Try to do 1 thing at a time.
Remove all other extra's, add just your revised zwout custom code part to ALL zwouts. Done.
It works? ok, then try to do the next part. This way you will know what part of the code messes things up.
Logged

prj
Hero Member
*****

Karma: +915/-425
Offline Offline

Posts: 5833


« Reply #38 on: June 19, 2018, 06:16:52 AM »

-20 degrees is ridiculous too, there will be no combustion with that amount of timing retard at all.
So what you'll end up with is timing oscillating rapidly between -20 and whatever comes in from the maps if you do it smart (RPM hysteresis lockout), and if you do it stupid, then the engine will just die the moment you enter LC mode.

Play with a standalone ECU with ALS/LC on an actual car to understand how it is implemented and what sane values are.
At least write the specification of the algorithm down of what you're trying to do before starting to mess with code.
Logged

PM's will not be answered, so don't even try.
Log your car properly.
Cadensdad14
Full Member
***

Karma: +8/-1
Offline Offline

Posts: 134


« Reply #39 on: June 19, 2018, 09:28:04 AM »

I was speaking with a subaru tuner at a race a couple weeks ago.  Last week he sent me the common subaru and Mitsubishi antilag files.  Think those would be of any use?
Logged
Cadensdad14
Full Member
***

Karma: +8/-1
Offline Offline

Posts: 134


« Reply #40 on: June 19, 2018, 06:20:16 PM »

Ok, so after everyones suggestions, this seems to be what Im after.  Change zwgru to -10 (will need revisions and maybe a map) and disable kr.  Nothing else. 

ROM:008A4000 als_kr_disable:                         ; CODE XREF: sub_872D1C+90P
ROM:008A4000                 extp    #0E0h, #1 ; 'a'
ROM:008A4004                 movb    rl4, B_alsflags
ROM:008A4008                 cmpb    rl4, #0
ROM:008A400C                 jmpr    cc_NZ, kr_disabled
ROM:008A400E                 bset    b_kr.14
ROM:008A4010                 jmps    87h, loc_872DB2
ROM:008A4014 ; ---------------------------------------------------------------------------
ROM:008A4014
ROM:008A4014 kr_disabled:                            ; CODE XREF: ROM:008A400Cj
ROM:008A4014                 jmps    87h, loc_872DB0
ROM:008A4018 ; ---------------------------------------------------------------------------
ROM:008A4018
ROM:008A4018 als_zwgruset:                           ; CODE XREF: sub_89DA90+E6P
ROM:008A4018                                         ; sub_89DA90+F6P ...
ROM:008A4018                 extp    #0E0h, #1 ; 'a'
ROM:008A401C                 movb    rl6, B_alsflags
ROM:008A4020                 cmpb    rl6, #0
ROM:008A4024                 jmpr    cc_NZ, als_zwgru
ROM:008A4026
ROM:008A4026 stk_zwgru:
ROM:008A4026                 movb    zwgru, rl4
ROM:008A402A                 jmpr    cc_UC, zwgru_ret
ROM:008A402C ; ---------------------------------------------------------------------------
ROM:008A402C                 movb    rl4, #0F2h ; '='
ROM:008A4030
ROM:008A4030 als_zwgru:                              ; CODE XREF: ROM:008A4024j
ROM:008A4030                 movb    zwgru, rl4
ROM:008A4034                 jmpr    cc_UC, zwgru_ret
ROM:008A4036 ; ---------------------------------------------------------------------------
ROM:008A4036
ROM:008A4036 zwgru_ret:                              ; CODE XREF: ROM:008A402Aj
ROM:008A4036                                         ; ROM:008A4034j
ROM:008A4036                 rets

This good?
Logged
woj
Hero Member
*****

Karma: +41/-3
Offline Offline

Posts: 500


« Reply #41 on: June 19, 2018, 10:28:57 PM »

No, movb rl4, #0F2h is unreachable in your code Wink
Logged
Cadensdad14
Full Member
***

Karma: +8/-1
Offline Offline

Posts: 134


« Reply #42 on: June 20, 2018, 02:57:49 AM »

I need to quit working on this code when I'm tired... Stupid mistake. 
Logged
prj
Hero Member
*****

Karma: +915/-425
Offline Offline

Posts: 5833


« Reply #43 on: June 20, 2018, 03:01:39 AM »

and IDK why you want so late ignition, there will be no combustion with that ignition, the engine will just die.
You need like 10-15 deg spark retard from the normal ignition angle to already have a reasonable amount of boost.

Also not too much point posting this code, get a car and test it, and post when it works or doesn't work.
« Last Edit: June 20, 2018, 03:03:28 AM by prj » Logged

PM's will not be answered, so don't even try.
Log your car properly.
Cadensdad14
Full Member
***

Karma: +8/-1
Offline Offline

Posts: 134


« Reply #44 on: June 28, 2018, 10:12:29 AM »

I am after late ignition timing for a rally style bang bang antilag instead of a spark cut antilag.  Everyone keeps saying that using an ignition angle of -10* is too much but the typical rally style antilag runs timing in the -35* to -45* range.  They also employ a throttle kick to maintain airflow and enrich the mixture to cut down on egts.  (This would be in a system active, vehicle in motion, no input on throttle situation)  As far as timing that negative shutting the engine down, it doesnt make sense.  If you fire the spark when the piston has begun its down stroke it minimizes torque input but keeps the primary combustion event in the cylinder, valve, manifold area.  The spark cut versions dont fire any spark and they dont stall the engine.  They push the fuel to wherever it can find an ignition source, be it manifold, turbo, or exhaust from an alternate cylinder.  The goal is to have bang bang antilag as an option when I put the turbo restrictor in. 
Logged
Pages: 1 2 [3] 4
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.023 seconds with 17 queries. (Pretty URLs adds 0s, 0q)