MODE 4 Command Generator

Programs / Tools / Scripts
Post Reply
User avatar
DieselBob
Posts: 164
Joined: Sun Mar 28, 2010 5:43 pm
cars: Vr SII Ute
Location: Brisbane QLD

MODE 4 Command Generator

Post by DieselBob »

Heres an excel sheet I've built to help diagnose faults.
It will generate a MODE4 DataStream for different mask ECM's/PCM's.
It will import a text file as a template and generate a bit controlled output generator.
The top bit with TunerPro is an option to allow the DataStream build with "0x".
The Instruction page has an example of what the txt file needs to look like.
I've attached the Excel sheet and a $11 txt file as this one I've tested on my daily driver.

The long term plan is some sort of TunerPro Plugin/AddOn or a Stand Alone Program.
At this stage I dont have the time (other Projects) and figured I'd post this anyway, it's time consuming and not that user friendly but it works :).

Feel free to add any thoughts/suggestions.

Bob

EDIT
To explain what MODE4 is...
Mode 4 is a way of forcing(turning on) ECU outputs, and altering(slewing) Inputs.
Use this to force an idle speed, transmission range, a/c compressor or any other output. Or Modify/slew an input.
MODE 4 is similar to the normal tunerPro datastream however instead of being a passive listen, it is an active command string.
Using MODE 4 can cause damage to components if used incorrectly - BE CAREFULL.

The way it works is figure out the function needed, then look through the BYTE - BIT locations find the BITs required and flip to RED as required.
A RED bit will force/increment the command a GREEN BIT is ignored.
Some functions have an enable BIT and a ON/OFF BIT.
Other Functions eg IDLE SPEED and TIMING ADVANCE have enable BITs and MODIFIER BITs the enable turns the function ON and the modifier is a MULTIPLY VALUE or force VALUE.. (Calculations not done yet)
It can get complicated, so for a start try forcing a simple function eg CHECK ENGINE light, COOLING FAN or INJECTOR OFF these are harmless with an obvious OUTPUT.

EDIT
OK I've added the calculations for the Slew/Modify values.
I would appreciate feedback if anyone tests, I've only tested what i can.
There is a V2 of the text file as well as it required some massaging to get the lookup working :)....
To make another file work correctly it will need "SLW", "ABS" and "ALL" in the "INPUT CONTROL WORD" bits.
The calculation looks for a the "SLW" or other mnemonic then copies the equation to calculate the variation.
The "INPUT CONTROL VALUE - Calculation x" title is used to calc the result in real world values.
If the BIT title of the INPUT CONTROL VALUE doesn't ="VALUE" the calculation will not function.
If there is a SLEW ABSOLUTE bit in the BIT0 location this will change the value loaded into the calculation.

If you follow the format of the $11, the excel sheet looks for the byte structure and for the calculations key phrases.
A cheat would be to use the $11 as a start and change the BIT - BYTE labels and HEADER BYTEs to suit.
The load function looks for the "END" phrase for the Decimal Calculation, if its not there it'll error. - I'll fix this soon too-Fixed
If you've got a MODE4 command stream definition PM me and I'll set it up.
The calculation looks in the descriptor - ALTPS EQU BIT4 "from here" 1 = CONTROL TPS INPUT SLW *1 ABS *0.57451 "to Here" -
for "SLW", "ABS" or an "ALL" then takes the *1, *0.57451 or whatever equation and loads that into the VALUE Title.
Then uses that to generate the value. So if the equation is wrong the value will be.......
Doesn't effect the command stream just the real world number used to set the RPM/DEGREES.

23 Nov
Added an error trap for the END of txt file.

21 Jan
Added the extra x00 bytes to the command string to allow multiple send commands to clear previous MODE 4 commands.
Here are some formated txt files to use with the Excel sheet.
$11_VR_Mode4.txt
(5.01 KiB) Downloaded 429 times
$12_VR_Mode4.txt
(4.59 KiB) Downloaded 446 times
$51_VS_Mode4.txt
(7.32 KiB) Downloaded 412 times
$A5_VT_ Mode 4.txt
(11.85 KiB) Downloaded 431 times
VX-VY_Mode 4.txt
(8.55 KiB) Downloaded 468 times
Attachments
Delco_Mode4V2.xlsm
(60.64 KiB) Downloaded 489 times
Last edited by DieselBob on Sat Feb 02, 2013 10:02 am, edited 11 times in total.
VX L67 Getrag
Posts: 2882
Joined: Sun Aug 02, 2009 9:16 pm
Location: Bayside, Melbourne, Victoria
Contact:

Re: MODE 4 Command Generator

Post by VX L67 Getrag »

Looks like I might have to look into this!

Seeing the 3rd gear lock was s mode 4 command so guessing there's more in there that will be useful!!

Nice work Bob
User avatar
DieselBob
Posts: 164
Joined: Sun Mar 28, 2010 5:43 pm
cars: Vr SII Ute
Location: Brisbane QLD

Re: MODE 4 Command Generator

Post by DieselBob »

ok......
:think:
Been a few downloads was wondering how things are going?
VX L67 Getrag
Posts: 2882
Joined: Sun Aug 02, 2009 9:16 pm
Location: Bayside, Melbourne, Victoria
Contact:

Re: MODE 4 Command Generator

Post by VX L67 Getrag »

I'm guessing I downloaded it, but can't remember looking at it!

If I get a chance tomorrow I will & report back!

EDIT: had a look after I downloaded it today & it's over my head not even sure how to use it to help, I don't think I ever looked at it before!
User avatar
DieselBob
Posts: 164
Joined: Sun Mar 28, 2010 5:43 pm
cars: Vr SII Ute
Location: Brisbane QLD

Re: MODE 4 Command Generator

Post by DieselBob »

No worries I'll rewrite it :D
User avatar
DieselBob
Posts: 164
Joined: Sun Mar 28, 2010 5:43 pm
cars: Vr SII Ute
Location: Brisbane QLD

Re: MODE 4 Command Generator

Post by DieselBob »

Update to excel sheet and txt file.
VX L67 Getrag
Posts: 2882
Joined: Sun Aug 02, 2009 9:16 pm
Location: Bayside, Melbourne, Victoria
Contact:

Re: MODE 4 Command Generator

Post by VX L67 Getrag »

O.k. Sorry I should have made myself clearer not sure how to create the data stream file's to load in excel sheet & what test's would you like me to try?

Sorry for not being sensible?
User avatar
DieselBob
Posts: 164
Joined: Sun Mar 28, 2010 5:43 pm
cars: Vr SII Ute
Location: Brisbane QLD

Re: MODE 4 Command Generator

Post by DieselBob »

ok :D
Post Reply