-> V13R What has happend to VTC based on TP ? (Z32 ECU)

Discuss software bugs and related problems here.

Moderator: Matt

Torque
 

Posts: 639
Joined: Wed Jun 16, 2010 10:08 am

-> V13R What has happend to VTC based on TP ? (Z32 ECU)

Post by Torque »

Hi!
Something spooky is going on here ..

Since >= Version 13R the setting for VTC enabled by TP is gone!
:(

This line is missing from the address file ->
VTC_TP_CUT,&H79F7,1,1,1,1,VTC Solenoid ON > min TP

Any particular reason for this???

Also some labels for the VTC items have changed?
Why?
It was always cut/recover .. now it is 'cut' / 'enable' ?

If it ain't broken why fix it ?
Matt
Site Admin
 

Posts: 8961
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: -> V13R What has happend to VTC based on TP ? (Z32 ECU)

Post by Matt »

Further investigation was done on the VTC code following 0.10.13 and I found that the VTC on Z32 is not TP triggered. Subsequently for this vehicle it was corrected

Updates for the parameter naming from PL given that 'recover' isnt the proper term. It actually has an 'enable' point and then will 'cut'. There is no recovery as such
Torque
 

Posts: 639
Joined: Wed Jun 16, 2010 10:08 am

Re: -> V13R What has happend to VTC based on TP ? (Z32 ECU)

Post by Torque »

Hi Matt,

This can not be right ..

If the on point is after the off point TP is the trigger.

I am quite sure (judging from logs and the car) that it works that way.
(actually my car is set up this way)

Also, was this change (dropping a register) documented somewhere?

There should be a changes.txt in the address file directory (that's a request)
Matt
Site Admin
 

Posts: 8961
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: -> V13R What has happend to VTC based on TP ? (Z32 ECU)

Post by Matt »

Here is the change to the Z32 address file
was:
VTC_TP_CUT,&H79F7,1,1,1,1,VTC Solenoid ON > min TP
now:
VTC_TEMP_COLD_RPM_CUT,&H79F7,1,1,1,1,VTC Solenoid OFF > min RPM (RPM+14)
Here is the Z32 ECU code. There is no place where there you see TP being used to turn on the VTC solenoid
CEFB LCEFB: // VTC Check
CEFB : 7B 80 DD "{ " tim #$80X00DD // Internal flag
CEFE : 27 07 "' " beq LCF07
CF00 : 7D 16 76 "} v" tst X1676 // check set/clear VCT
CF03 : 27 71 "'q" beq LCF76 (VTC CUT)
CF05 : 20 6A " j" bra LCF71 (VTC RECOVER)
;
CF07 LCF07:
CF07 : 7B 08 56 "{ V" tim #$08X0056
CF0A : 27 6A "'j" beq LCF76 (VTC CUT)
CF0C : 7B 05 55 "{ U" tim #$05X0055
CF0F : 26 65 "&e" bne LCF76 (VTC CUT)
CF11 : B6 14 0C " " ldaa COOLANT_TEMP
CF14 : 7B 20 C1 "{ " tim #$20X00C1 (skip if not currently cut)
CF17 : 27 02 "' " beq LCF1B
CF19 : 8B 04 " " adda #$04
CF1B LCF1B:
CF1B : B1 F9 F2 " " cmpa VTC_TEMP_MAX_CUT
CF1E : 25 56 "%V" bcs LCF76 (VTC CUT) - cut on max temperature
CF20 : B6 14 0C " " ldaa COOLANT_TEMP
CF23 : 7B 20 C1 "{ " tim #$20X00C1 (skip if not currently cut)
CF26 : 27 05 "' " beq LCF2D
CF28 : 80 05 " " suba #$05
CF2A : 24 01 "$ " bcc LCF2D
CF2C : 4F "O" clra
CF2D LCF2D:
CF2D : B1 F9 F4 " " cmpa VTC_TEMP_MIN_CUT - cut on min temperature
CF30 : 24 44 "$D" bcc LCF76 (VTC CUT)
CF32 : B6 14 07 " " ldaa VEHCILE_SPEED
CF35 : 7B 20 C1 "{ " tim #$20X00C1 (skip if not currently cut)
CF38 : 27 02 "' " beq LCF3C
CF3A : 8B 02 " " adda #$02
CF3C LCF3C:
CF3C : B1 F9 F3 " " cmpa VTC_SPEED_CUT (speed+2 - 0)
CF3F : 25 35 "%5" bcs LCF76 (VTC CUT) - cut on under speed
CF41 : B6 14 6A " j" ldaa X146A //RPM_MSB
CF44 : FE 14 17 " " ldx X1417
CF47 : 16 " " tab (B=RPM_MSB)
CF48 : 7B 20 C1 "{ " tim #$20X00C1 (skip if not currently cut)
CF4B : 27 0B "' " beq LCF58
CF4D : 8B 04 " " adda #$04 (A RPM_MSB+4)
CF4F : 24 02 "$ " bcc LCF53 (Over RPM then set max)
CF51 : 86 FF " " ldaa #$FF

CF53
CF53 : C0 04 " " subb #$04 (B RPM_MSB-4)
CF55 : 24 01 "$ " bcc LCF58
CF57 : 5F "_" clrb
CF58 LCF58:
CF58 : F1 F9 F6 " " cmpb VTC_RPM_CUT (-4)
CF5B : 24 19 "$ " bcc LCF76 (VTC CUT)
CF5D : B1 F9 F5 " " cmpa VTC_RPM_RECOVER (+4)
CF60 : 25 02 "% " bcs LCF64
CF62 : 20 0D " " bra LCF71 (VTC RECOVER)
;
CF64 LCF64:
CF64 : 18 " " xgdx
CF65 : 7B 20 C1 "{ " tim #$20X00C1 (skip if not currently cut)
CF68 : 27 02 "' " beq LCF6C
CF6A : 8B 10 " " adda #$10 (RPM_MSB+10)
CF6C LCF6C:
CF6C : B1 F9 F7 " " cmpa VTC_RPM2_CUT
CF6F : 25 05 "% " bcs LCF76 (VTC CUT)
CF71 LCF71:
CF71 : 72 20 C1 "r " oim #$20X00C1 (set skip flag to now cut)
CF74 : 20 03 " " bra LCF79
;
CF76 (VTC CUT) LCF76 (VTC CUT):
CF76 : 71 DF C1 "q " aim #$DFX00C1 (clear skip flag)
CF79 LCF79:
CF79 : 0F " " sei
CF7A : 96 C1 " " ldaa X00C1
CF7C : B7 20 00 " " staa X2000 (apply VCT solenoid)
CF7F : 0E " " cli
CF80 : 39 "9" rts
Updates are captured in the buglist file which I maintain. VTC display enhancement work captured this problem and the address files were updated accordingly. Putting every change to address file seems like a good idea much may get a bit too much
Torque
 

Posts: 639
Joined: Wed Jun 16, 2010 10:08 am

Re: -> V13R What has happend to VTC based on TP ? (Z32 ECU)

Post by Torque »

Hi Matt,

I think changes to address files are most critical, therefore these changes should be highlighted in a separate file.
Also I have not the slightest clue where your release notes are.
It would help if you could just add an icon to the Nistune Program Group.

Thanks for the code snippet, my VTC is operated by TP (I am quite sure of that)

I will do a few logs and double-double-check.
In the meantime I will use the old address files.


As for the cut/enable rename, why change it when it has become the term over the years?
It just adds another layer of confusion ;)
Matt
Site Admin
 

Posts: 8961
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: -> V13R What has happend to VTC based on TP ? (Z32 ECU)

Post by Matt »

- Will look at the code again but be sure its TP and not RPM affecting the switching

- After talking to several tuners and discussion with PL names were changed to make the operation less confusing

- Release notes are in C:\Program Files\Nistune\Release_notes.txt but I can put a link from the start menu folder
Torque
 

Posts: 639
Joined: Wed Jun 16, 2010 10:08 am

Re: -> V13R What has happend to VTC based on TP ? (Z32 ECU)

Post by Torque »

Hi!

I did send you a log ..
Specifically on VTC I did some research/tuning .. and the log always reflected the TP switch-point.


Yes, a link to release notes would help (and why not open these after the installer has finished?)

Still changes.txt for address files would also be good ..



Good nite :wink:
Eric
 

Posts: 227
Joined: Mon Jan 14, 2008 7:59 pm
Location: Holland
Contact:

Re: -> V13R What has happend to VTC based on TP ? (Z32 ECU)

Post by Eric »

Matt, these lines is where TP is fed into the VTC routine:

>> CF44 : FE 14 17 " " ldx X1417 (0x1417 is TP-value)

>> CF64 : 18 " " xgdx (D=X --> D=TP-val)

>>CF6C : B1 F9 F7 " " cmpa VTC_RPM2_CUT (this is actually a TP treshold value...not RPM)

-Eric
Torque
 

Posts: 639
Joined: Wed Jun 16, 2010 10:08 am

Re: -> V13R What has happend to VTC based on TP ? (Z32 ECU)

Post by Torque »

Thanks for the support Eric ..

That's what my logs confirmed and how I did set up my car.
Matt
Site Admin
 

Posts: 8961
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: -> V13R What has happend to VTC based on TP ? (Z32 ECU)

Post by Matt »

Okay thanks. I stuffed my disassembly. Will put the Z32 file back to previous revision
RomChip200
 

Posts: 426
Joined: Mon May 11, 2009 7:58 pm
Location: FRANCE

Re: -> V13R What has happend to VTC based on TP ? (Z32 ECU)

Post by RomChip200 »

F9F7 is really TP (default = 24)

For VTC management, something important to catch is when the ECU check if the conditions are met or not met anymore, some hysteresis is introduced in some conditions if the VTC is currently off or on.
Example reagarding rpm thresholds:
if VTC is on, 4900 becomes 4700 and 6100 becomes 6300
If VTC is off, 4900 and 6100 are used

Let's keep the known rpm values:
1) If rpm > 4900 ==> VTC is switched off
2) If rpm is < 4900 and < 6100 (this is the way the code is written)
2.1) VTC is off: if TP<24, VTC stays off, if TP>24, VTC is switched on
2.2) VTC is already on: if (TP+16)<24, VTC is switched off, otherwise keep it on

Note: 16 is the TP hysteresis.
It means, once VTC is on, you need to reach a very low TP =8 to get if off (basically when you release the throttle).
This is a good example of side effects when you change injectors: 370cc ==> 740cc, you change the TP scales but people should correct accordingly all the TP related values in the code itself (here 24 becomes 12 and 16 becomes 8 )
Torque
 

Posts: 639
Joined: Wed Jun 16, 2010 10:08 am

Re: -> V13R What has happend to VTC based on TP ? (Z32 ECU)

Post by Torque »

Hi there,

Interesting!

And I think I can confirm the hysteresis with regards to RPM.
But (from memory) I can not recall any hysteresis with regards to the (TP)off-point.

I will double check my Nistune-Logs.

Back in the days I did lots of testing with VTC and found the trigger via TP quite useful.
It's a Z32 speciality I guess ..
RomChip200
 

Posts: 426
Joined: Mon May 11, 2009 7:58 pm
Location: FRANCE

Re: -> V13R What has happend to VTC based on TP ? (Z32 ECU)

Post by RomChip200 »

Here are some locations that are TP dependent (and so injector size dependent):
In my case 370cc ==> 740 but I'm running ethanol so 740cc = ~550cc in reality (550/370= ~1.5 factor) K=288 ... 200 (288/200= 1.44)
B871 corrected against tp (8...5)
CB8A corrected against tp (8...5)
CD10 corrected against tp (8...5)
CE54 corrected against tp (8...5)
D114 already corrected against tp (16...10)
D1C5 corrected against tp (16...11)
RomChip200
 

Posts: 426
Joined: Mon May 11, 2009 7:58 pm
Location: FRANCE

Re: -> V13R What has happend to VTC based on TP ? (Z32 ECU)

Post by RomChip200 »

Some other locations that need to be corrected according to new TP range (typically when injector size changes):

TP related values in the code are corrected according to the injector value:
FF70 corrected against tp (23...16) ==> related to ignition
Related to the embedded diag (so, the ECU may throw out some codes if not corrected):
F79D 0D
F7AA 14
F790 02
F789 21
F7AD 21
F782 09
F783 1E
F7A2 0C
F7A3 1C
Matt
Site Admin
 

Posts: 8961
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: -> V13R What has happend to VTC based on TP ? (Z32 ECU)

Post by Matt »

Put code into this thread from here:
viewtopic.php?f=12&t=2406&p=17616#p17616

Code: Select all

DATA:F9F2 vtc_const1:         fcb 5                         ; ... -45°C checked against engine_temp
DATA:F9F3 vtc_const3:         fcb 0                         ; ... 0kmh, checked against speed
DATA:F9F4 vtc_const2:         fcb 160                       ; ... 110°C checked against engine_temp
DATA:F9F5 vtc_const4:         fcb 122                       ; ... recover 6100
DATA:F9F6 vtc_release:        fcb 118                        ; ... cut
DATA:F9F6                                                   ; 118*50=5900 rpm
DATA:F9F7 vtc_const5:         fcb 24                        ; ... checked against TP, if TP<24, no VTC

CODE:D155 compute_vtc:                                      ; ...
CODE:D155                     tim #%10000000, act_mask2     ; Bit 0: Power balance
CODE:D155                                                   ; Bit 1: Fuel pump relay
CODE:D155                                                   ; Bit 2: PREG solenoid
CODE:D155                                                   ; Bit 3: Self learn control
CODE:D155                                                   ; Bit 4: AAC control
CODE:D155                                                   ; Bit 5: EGR control
CODE:D155                                                   ; Bit 6: AIV control
CODE:D155                                                   ; Bit 7: VTC control
CODE:D158                     beq cv_1
CODE:D158 
CODE:D15A                     tst act_vtc_solenoid          ; Activation code 8F: VTC solenoid
CODE:D15D                     beq cv_10
CODE:D15D 
CODE:D15F                     bra cv_9
CODE:D15F 
CODE:D161 
CODE:D161 cv_1:                                             ; ...
CODE:D161                     tim #%1000, flags3            ; Bit 0: PORT5 bit 4 inverted, if 0 then injection cut
CODE:D161                                                   ; Bit 2: Activated once every 2 IRQ2
CODE:D161                                                   ; Bit 3: Compute main maps
CODE:D161                                                   ; Bit 6: Activated once every 10 IRQ2
CODE:D161                                                   ; Bit 7: IRQ2 interrupt active
CODE:D164                     beq cv_10
CODE:D164 
CODE:D166                     tim #%101, flags6             ; Bit 0: throttle switch (1=idle)
CODE:D166                                                   ; Bit 1: high octane (if 1, becomes 0 when bit0 of flags5 is set to 1)
CODE:D166                                                   ; Bit 2: neutral switch(1=neutral)
CODE:D166                                                   ; Bit 3: power steering switch (1=on)
CODE:D166                                                   ; Bit 4: A/C switch (1=on)
CODE:D166                                                   ; Bit 7: gear engaged and high gear
CODE:D169                     bne cv_10
CODE:D169 
CODE:D16B                     ldaa engine_temp              ; Engine temp+50 (°C)
CODE:D16E                     tim #%100000, actuators_copy  ; Actuators copy in RAM
CODE:D16E                                                   ; Bit 2: Coolant fan low
CODE:D16E                                                   ; Bit 3: Coolant fan high
CODE:D16E                                                   ; Bit 4: PRVR solenoid
CODE:D16E                                                   ; Bit 5: VTC solenoid
CODE:D16E                                                   ; Bit 6: AIV solenoid
CODE:D171                     beq cv_2
CODE:D171 
CODE:D173                     adda #4
CODE:D175 
CODE:D175 cv_2:                                             ; ...
CODE:D175                     cmpa vtc_const1
CODE:D178                     bcs cv_10
CODE:D178 
CODE:D17A                     ldaa engine_temp              ; Engine temp+50 (°C)
CODE:D17D                     tim #%100000, actuators_copy  ; Actuators copy in RAM
CODE:D17D                                                   ; Bit 2: Coolant fan low
CODE:D17D                                                   ; Bit 3: Coolant fan high
CODE:D17D                                                   ; Bit 4: PRVR solenoid
CODE:D17D                                                   ; Bit 5: VTC solenoid
CODE:D17D                                                   ; Bit 6: AIV solenoid
CODE:D180                     beq cv_3
CODE:D180 
CODE:D182                     suba #5
CODE:D184                     bcc cv_3
CODE:D184 
CODE:D186                     clra
CODE:D187 
CODE:D187 cv_3:                                             ; ...
CODE:D187                     cmpa vtc_const2
CODE:D18A                     bcc cv_10
CODE:D18A 
CODE:D18C                     ldaa speed
CODE:D18F                     tim #%100000, actuators_copy  ; Actuators copy in RAM
CODE:D18F                                                   ; Bit 2: Coolant fan low
CODE:D18F                                                   ; Bit 3: Coolant fan high
CODE:D18F                                                   ; Bit 4: PRVR solenoid
CODE:D18F                                                   ; Bit 5: VTC solenoid
CODE:D18F                                                   ; Bit 6: AIV solenoid
CODE:D192                     beq cv_4
CODE:D192 
CODE:D194                     adda #2
CODE:D196 
CODE:D196 cv_4:                                             ; ...
CODE:D196                     cmpa vtc_const3
CODE:D199                     bcs cv_10
CODE:D199 
CODE:D19B                     ldaa rpm_d4_lo                ; rpm_div_4_lo=lo(Engine speed/50)
CODE:D19E                     ldx tp
CODE:D1A1                     tab
CODE:D1A2                     tim #%100000, actuators_copy  ; Actuators copy in RAM
CODE:D1A2                                                   ; Bit 2: Coolant fan low
CODE:D1A2                                                   ; Bit 3: Coolant fan high
CODE:D1A2                                                   ; Bit 4: PRVR solenoid
CODE:D1A2                                                   ; Bit 5: VTC solenoid
CODE:D1A2                                                   ; Bit 6: AIV solenoid
CODE:D1A5                     beq cv_6
CODE:D1A5 
CODE:D1A7                     adda #4
CODE:D1A9                     bcc cv_5
CODE:D1A9 
CODE:D1AB                     ldaa #255
CODE:D1AD 
CODE:D1AD cv_5:                                             ; ...
CODE:D1AD                     subb #4
CODE:D1AF                     bcc cv_6
CODE:D1AF 
CODE:D1B1                     clrb
CODE:D1B2 
CODE:D1B2 cv_6:                                             ; ...
CODE:D1B2                     cmpb vtc_release              ; 98*50=4900 rpm
CODE:D1B5                     bcc cv_10
CODE:D1B5 
CODE:D1B7                     cmpa vtc_const4
CODE:D1BA                     bcs cv_7
CODE:D1BA 
CODE:D1BC                     bra cv_9
CODE:D1BC 
CODE:D1BE 
CODE:D1BE cv_7:                                             ; ...
CODE:D1BE                     xgdx
CODE:D1BF                     tim #%100000, actuators_copy  ; Actuators copy in RAM
CODE:D1BF                                                   ; Bit 2: Coolant fan low
CODE:D1BF                                                   ; Bit 3: Coolant fan high
CODE:D1BF                                                   ; Bit 4: PRVR solenoid
CODE:D1BF                                                   ; Bit 5: VTC solenoid
CODE:D1BF                                                   ; Bit 6: AIV solenoid
CODE:D1C2                     beq cv_8
CODE:D1C2 
CODE:D1C4                     adda #16
CODE:D1C6 
CODE:D1C6 cv_8:                                             ; ...
CODE:D1C6                     cmpa vtc_const5
CODE:D1C9                     bcs cv_10
CODE:D1C9 
CODE:D1CB 
CODE:D1CB cv_9:                                             ; ...
CODE:D1CB                     oim #%100000, actuators_copy  ; Actuators copy in RAM
CODE:D1CB                                                   ; Bit 2: Coolant fan low
CODE:D1CB                                                   ; Bit 3: Coolant fan high
CODE:D1CB                                                   ; Bit 4: PRVR solenoid
CODE:D1CB                                                   ; Bit 5: VTC solenoid
CODE:D1CB                                                   ; Bit 6: AIV solenoid
CODE:D1CE                     bra cv_11
CODE:D1CE 
CODE:D1D0 
CODE:D1D0 cv_10:                                            ; ...
CODE:D1D0                     aim #%11011111, actuators_copy ; Actuators copy in RAM
CODE:D1D0                                                   ; Bit 2: Coolant fan low
CODE:D1D0                                                   ; Bit 3: Coolant fan high
CODE:D1D0                                                   ; Bit 4: PRVR solenoid
CODE:D1D0                                                   ; Bit 5: VTC solenoid
CODE:D1D0                                                   ; Bit 6: AIV solenoid
CODE:D1D3 
CODE:D1D3 cv_11:                                            ; ...
CODE:D1D3                     sei
CODE:D1D4                     ldaa actuators_copy           ; Actuators copy in RAM
CODE:D1D4                                                   ; Bit 2: Coolant fan low
CODE:D1D4                                                   ; Bit 3: Coolant fan high
CODE:D1D4                                                   ; Bit 4: PRVR solenoid
CODE:D1D4                                                   ; Bit 5: VTC solenoid
CODE:D1D4                                                   ; Bit 6: AIV solenoid
CODE:D1D6                     staa ACTUATORS                ; Write:
CODE:D1D6                                                   ;   Bit 2: Coolant fan low
CODE:D1D6                                                   ;   Bit 3: Coolant fan high
CODE:D1D6                                                   ;   Bit 4: PRVR solenoid
CODE:D1D6                                                   ;   Bit 5: VTC solenoid
CODE:D1D6                                                   ;   Bit 6: AIV solenoid
CODE:D1D6                                                   ; Read:
CODE:D1D6                                                   ;   Bit 2: Speed sensor
CODE:D1D6                                                   ;   Bit 3: Power steering switch
CODE:D1D6                                                   ;   Bit 4: Air conditioning switch
CODE:D1D9                     cli
CODE:D1DA                     rts
CODE:D1DA 
CODE:D1DA ; End of function compute_vtc
Post Reply