Latest Code Updates

A forum for discussing applications and implementations of the MegaShift transmission controller code for the GPIO from B&G. This can control up to 8-speeds and 6 shift solenoids (plus a 16x9 table for controlling a PWM line pressure valve). It has manual and fully automatic modes (16x9 load x speed table), with under and over rev-limit protection, and full data logging of all inputs and outputs (among many other abilities). A TransStim to test your completed board is also available.
Locked
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

I have put the latest beta 2.122 code (and matching INI) here: http://www.msgpio.com/manuals/mshift/V4code.html

This code has a number of small changes that don't affect the user, and one that does: the masking on the input capture for the VSS and ISS has been made optional. In previous codes, it was always in effect, and the user could only set the masking value. Very high mask values resulted in computational issues, and made the speedo jumpy - exactly what the masking is supposed to avoid.

In the new code, the masking can be completely disabled by setting the 'General Settings/VSS Setup/VSS Input Masking' value to zero (0).

Anyone who is having difficulty with a jittery or spastic speedo should try setting this value to zero. It seems to help a lot with somewhat noisy signals. Note that the new default in the code is to disable masking ( = 0 ), but this value will be overwritten by older MSQs, so you have to set it manually.

I have briefly tested the over-rev protection and the spare port PWM%, they appear to work as planned.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

I have put new 2.123 MShift beta code on the beta page here: http://www.msgpio.com/manuals/mshift/V4code.html

This code:
- disables the input signal masking at very slow speeds (even if it is otherwise enabled),
- VSS/ISS averaging calculations are improved,
- the VSS/ISS masking logic is cleaned up and simplified.

It appears to work well on my bench with all input capture masking values from 0 to 200.

This is a beta code, so use with caution!

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

Just a heads up, I am preparing new 2.124 version code for beta release (I am testing now). When it is ready (a few days, with luck) it will be released on the beta code page: http://www.msgpio.com/manuals/mshift/V4code.html

2.124 has some small fixes, and two big changes:

- an independent second shift table (with its own speed and load bins), activate by the 2wd/4wd switch (GPI5/Amp5). This addition was suggested by tobmag (viewtopic.php?f=4&t=295&p=2377#p2373), and it made sense and was easy to implement, so it was done. The table can be used for 4 wheel drive (where the effective final ratio changes and as a result the rpms at any given speed changes as well, and a second shift table is handy), but could also be used for a race mode versus street mode, etc.,

AND

- the shift tables have changed 'shape' from 12x12 to 16x9 (16 speeds by 9 loads). This was done after private consultation with a number of users who demonstrated that they could use more speed bins but didn't need as many load bins (some rows were duplicates). This is especially true if the number of forward gears is greater than 4. Since the code now handles up to 8 speeds, this makes the table more useful. The loss of the load bins is not especially significant - recall that not too long ago, automatic transmissions effectively only had 2 load bins (normal and 'kick-down'). Fewer loads bins also mean there is less likely to be 'hunting' between gears. In fact, when I was first setting up the code, I considered having only 4 load bins, but decided to err on the 'big' side.

These are fairly big changes, and I don't know how well TS will handle the import of old 12x12 shift tables (but I will test this at some point). It might be that people have to redo their shift tables to use the new code. But because this code is effectively 4.xxx code, I wanted to get this change in while the code is still an early beta (so not only will you be able to create and save a new primary shift table, but you can fill in the alternate shift table if you like and have it carried forward to all future releases).

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

I have put 2.124 beta code up on the beta page: http://www.msgpio.com/manuals/mshift/V4code.html

In addition to the 2nd shift table mentioned above all tables have changed shape (to 16 speeds by 9 loads from 12x12), and all three tables (shift1, shift2, and the PC table) have their own bin values. While you can import 12x12 tables, they will be a mess when they are stuffed into the 16x9 tables (square peg in a rectangular hole doesn't go so well!), so you are better off recreating your tables (a screen shot of the 12x12 table can really help make this easier.

This code addresses some of the issues with CAN comms. However, I have not been able to make the latest beta TunerStudio work properly. Earlier TunerStudio versions work fine. I have been testing with 1.002 and 1.004 (and I suspect later release versions work fine too - and will test this soon), and there have been no issues with the serial connection or CAN pass-through. Version 1.31 of TunerStudio causes all sorts of issues. You an install both the beta and release version on the same computer (I do), just install them in separate directories. Get TunerStudio release version 1.007 here: http://tunerstudio.com/index.php/downloads

BTW, those looking for info on how to set up the CAN pass-through should see this page: http://www.msgpio.com/manuals/mshift/cpt.html and especially the video that is linked about 2/3 of the way down the page.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

I have put 2.126 beta code and INI on the beta page: http://www.msgpio.com/manuals/mshift/V4code.html

This code:

- Fixes an error in the maximum shift pressure algorithm. The problem was that there are two 'scales' for the pressure control (PC) PWM% used in the code (one for the input parameters and one for the reported outpc values), and they were not properly adjusted when testing if the current pressure was greater or less than the limit. As a result, the condition for testing whether to set the pressure to the maximum UP/DOWNshift pressure always evaluated to true, and the max pressure was always used even if the current pressure was lower. Thanks to gross_polluter for pointing this out and making me listen!
- The logic of the dither pulse, if enabled, could interfere with the PC shift pressure limiting. Dither pulses are now suspended while shifting.
- In the INI, code, and documentation, the use of the solA, solB, sol3/2, switchA, switchB, switchC terms has been eliminated. These applied mostly to the 4L60E and 4L80E, but were confusing to anyone else. Instead, all references are now to Input1, Input2, ...., Ouptut1, Ouput2, ..., etc. References to specific transmissions will be in their respective build docs. Unfortunately, changing names in the INI means users will have to re-enter the input and output patterns (and a few other values) manually. We promise we won't change these values again unless absolutely necessary.
- Some binary outpc variables were merged, saving space in the outpc structure (making the CAN comms faster and more efficient).
- The manual gear lever position is now reported as -99 if the controller cannot determine the manual gear lever position. This will help users identify a problem, especially since the controller won't shift or do much else unless it knows the gear lever position. In older codes, the manual gear value simply was not updated if it was not determined, and this left no immediate indication as to why the controller appeared not to be working.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

I have put new 2.128 beta code on the beta page: http://www.msgpio.com/manuals/mshift/V4code.html

This code has a major fix, and a new feature:

- The fix was to the non-CAN tach calculations, which didn't work and had multiple but somewhat subtle issues. These are fixed, and the non-CAN (i.e. standalone) tach works fine on my bench. Thanks to bravo685 for pointing out the issues. To set the standalone tach up, you must set enable the Tach input (http://www.msgpio.com/manuals/mshift/V4tune.html#gn) and disable CAN Usage (http://www.msgpio.com/manuals/mshift/V4tune.html#oa), then cycle the power before it takes effect (then it will work every time the controller is powered up). While fixing this, the option to disable ISS/tach masking was added (set the mask to 0 to disable), similar to the VSS masking disable option added earlier.

- The addition to the code is a table for speedometer correction. This is a 16 element table (with its own speed bins) of adjustments to the measured 'raw' speedometer from the VSS to adjust the reported speed to account for noise in the VSS signal, tire growth, tire slippage, etc. Values can be up to ±100%. (http://www.msgpio.com/manuals/mshift/V4tune.html#te). This appears to work fine in brief testing on my bench, though obviously more extensive testing is required.

Hopefully I haven't screwed anything else up while making these changes!

This code is getting close to 'release status'. I don't expect to add anymore features, I only foresee making bug fixes (if necessary) over the next few weeks, then this code will become the last of the 2.xxx series of releases and we will will move to 4.xxx code for future releases.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

I have put 2.129 beta code here: http://www.msgpio.com/manuals/mshift/V4code.html

This code:
- fixes a major functional problem with the spare port PWM mode in which the PWM% was only updated during a shift (thanks to gross polluter). All spare port modes have now been tested in 2.129 and appear to work.
- adds a new setting to the INI. The LOAD_KPA setting will display kpa units for load if it is activated, otherwise % units will be used (useful if using a TPS as the load input).

There is a remaining problem (also identified in gross polluter's configuration): setting the 4th input for the lever position causes speedometer issues on my bench (which it obviously shouldn't, they have no apparent connection) so there may be an INI offset issue. I will work on the fix and release it as 2.130 soon.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

After initial testing, it looks like the 4th input issue may be due to a floating input on my set-up. Correcting that appears to have solved the speedo issue (and explains why I was seeing it but other users were not). More testing is needed, though.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

BTW, 2.130 is the getting to the end of the 2.1xx transitional codes. It is now 'feature frozen' and only bug fixes will be done (and even those for a limited time). A release code based on 2.130 will be posted in a few weeks if there are no more unresolved beta code bug reports.

The new beta code will be the 4.1xx series of codes (4.100 will be first). This will be the development branch for new features. The first of these new features will be a user configurable 16x9 PWM table on the speedo output. The user will be able to select the axis parameters (load, speed, temperature, gear, engine rpm, etc. etc.), and fill in the table with whatever PWM percentages they like. This is much like the current spare ports (sp1 & sp2) in PWM mode, but with a large 144 element table rather than a single 16x curve.

Because the speedo output is on a timer output pin (PT5), the PWM is easy to implement, very accurate, and flexible with respect to frequencies, etc..

The speedo output (aka. 'spare port 0' in the new code) is on the PWM1 circuit of the GPIO board by default, and is capable of sinking up to 5 Amps. With a pull-up (typical for a speedo output) the circuit can signal other devices with a PWM'd voltage signal.

This table could be used for all sorts of things (like a secondary pressure control output), including non-transmission device control uses (servo motors, shock control, electronic differential control, and many others).

SPI functions, for inter-chip communications, is also slated for inclusion in the 4.1xx series of codes.

The help page for the 4.1xx series of codes will be at http://www.msgpio.com/manuals/mshift/V41tune.html (not in place yet).

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Latest Code Updates

Post by Bernard Fife »

I have put 2.131 beta code on the beta page here: http://www.msgpio.com/manuals/mshift/V4code.html

This code adds no new features or user parameters, and fixes no reported bugs. Nevertheless, some of the logic was cleaned up and extended to be logically consistent with the overall plan as we prepare the code for full release. Some internal variables names were also changed. Since some code was changed (a half dozen lines or so out of 20,000+ lines), and the point of beta testing is to test changes, this code is being released for users to try out.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Locked