Note that MegaTunix is the reference tuningsoftware (used by most developers). MegaTunix works on windows and Linux.
Megatune has serious problems, testing and debugging (mainly configuration) might be needed to get it work.
TODO
- megatune became much cleverer recently. It can be configured for several tables, and to log/display the WBO2 signal (AFR). DONE, but not documented ?
- post megatune.ini files and instructions that make it possible to utilize as much of the advanced features of GenBoard/VerThree as possible.
[megatune 2.25 with half-working ini files]
- VE, AFR and ignition advance works in the 2D mode
- after checking the tables in 2D mode, the 3D view works too (it does not work before the tables are queried in 2D mode)
- warmup wizard does not work (it worked in 2.16 and 2.20 megatune, likely a configuration issue).
Developer Section
Ini files:
- [complete release r007]
- 2 kpa k-table scaling
- swapped l-table and n-table fixed
- separate view for iac refpos added
- [r006]
- vemsv3.ini and config.xml for complete r003 package below
- Some corrections to warmup wizard
- MT requires names awc->aseCount, awev->asePct, cwl/cwh -> crankCold/Hot, primep->primePulse and floodClear
- Added missing hybrid_rpm_a, hybrid_rpm_m
- [r005]
- vemsv3.ini and config.xml for complete r003 package below
- digitalout channel selection corrected
- [r004]
- vemsv3.ini and config.xml for complete r003 package below
- updated scales for ign_dwell14+6, ign_crank_advance,engine_off_delay,ego_minrpm, ego_maxrpm ,awev_temp_scaling
- [r003]
- Complete package this time, both firmware and megatune ini
- EGT scaling done for both channels
- 12 bit raw inputs for 6 other 3208-channels, including FP and EBP
- [r002]
- Removed double idle settings
- [r001]
- Menu for miscout1 + 2
- Menu for some idle settings
- Menu for coolant fan+waterpump
- sparkTable scale changed to 0.25, range to 63.25
- [r000]
- complete firmware + unmodified megatune profile (does not work with included firmware)
- added extra adc channels to realtime variables
I need some help with firmware-support
- Megatune can't handle the maths needed for scaling l-table
- Megatune wants this format (scale and translate is part of megatune config)
- This is preferrably another page, only for megatune compat.
- l-table = lambda / scale - translate
- lambda = (l-table + translate) * scale
- Our current scaling is
- lambda = 256/(200+l)
- l = 256 / lambda - 200
- Make firmware keep k-table in 2kpa resolution in this tree (already done on other places)
- Support 12x12 tables (maybe later..not urgent)
mmtf - the way to configure other tables with old megatune that only knows about VE table
Often used with megatune 2.16 and 2.20.
mmtf (menu megatune fool) makes it possible to trick old VE-only megatune to think it talks to the VE table (j[]) while it is in fact talks to ignition advance (n[]) or lambdacorr (l[]) table.
We keep an internal pointer (called megatune_table), which default points to ve.ref_table (so default behaviour is consistent):
- mttn mmtf
- mttj mmtf
- mttl mmtf
Don't enter the space, only provided on command boundaries for easier reading.
The mtt. command switches to n(,j,l respectively) table and the mmtf fool megatune to see that table instead of the default j[].
You better only issue mtf command when the VE-tuning screen in megatune is closed. Otherwise you risk writing data into the ignition table that you read from the injection table previously, or the other way around, not good..
Most convenient to issue the table-switching command from a directly attached KeyBoard. Issuing it from TerminalProgram works, but more strokes:
- "close megatune"
- connect TerminalProgram
- go to "Man" mode
- issue the commands (wether the above, or any other from GenBoard/MenuSystem, see refcard)
- say "bye" from the TerminalProgram. The ECU says "Bye" if it was in "Man" mode earlier. Megatune will not communicate if you forget the ECM (RS232 menu) in "Man" mode ("Man" mode is for GenBoard/MenuSystem). ECM stays in "Man" mode even if you quit TerminalProgram. if you disconnect TerminalProgram before saying "bye", you have to connect back to say "bye"
- disconnect the TerminalProgram (or quit). Otherwise megatune says it cannot connect to ECM.
- start megatune
TODO: lambda info should live on a subpage of GenBoard/Manual/Tables
The ve.lambda is the fixing of megasquirt mix-multiple of two tables:
the VE and the lambda. Lambda is 1.0 for an AFR of 14.7 for gasoline.
Of course lambda can be left 0.8 all over the place initially if you like (but take care not to lean where you shouldn't). Some decimal values for l[] lamdacorr table (use numberformat=10 option or convert to hexa)
- 0=>1.28 (lean)
- 56=>1.0
- 120=>0.8
- 255=>0.56 (stupid rich, that rich not used for gasoline)
Lambda table is important when the system learns the VE, or when WideBand controls the AFR. The original, multiplied together, value is useless, since the ECM cannot figure out from that what AFR target the user wants. This was no issue for original Megasquirt, since it cannot learn, nor control for a (MAP, RPM) dependant WBO2 target.
Misc notes
- megatune 2.16 already support COM ports up to 8.
- If you want to make MStweak compatible log files with megatune, MS_COMPATIBILITY must be in your my_make file. If you do this your engine bits will be correct in the log.
We should propose to include the feature to record mono or stereo wav-s that are syncronized to engine logs. It is often useful. Eg. when
- checking the knock sensor freq
- recording front and rear wheel VSS to analyze wheelspin at race-start
- recording IonSense analog output
- recording ground noises for analysis
- Hexadecimal entries
- Binary Entries, checkbox for each bit or something like that..
- function to set the progressive_delay
[[Manual: Basics.Install.Software]]
- MS_COMPATIBILITY is needed in my_make for old mstweak otherwise it gets confused of idle state (or just does not use idle mode data for statistics?)
- MS_COMPATIBILITY must NOT be defined, and MSNS must be defined for megatuness (a similar program to megatune that lets set ignadv and VE without any tricks). defining MSNS seems like a good idea, it should NOT break anything, just add support for a few new (ignition related) commands