Software ignoring PE1 as fourth lever input?

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.
Addicted
Posts: 188
Joined: Mon Oct 14, 2013 7:14 am
Location: Winchester, England

Software ignoring PE1 as fourth lever input?

Post by Addicted »

I've come to the conclusion that the software is ignoring my fourth lever input (PE1)

This is based on the following points:

The manual gear gauge indicates 1 when the lever is in 3 (indicates correctly in all other gears)

The only difference between the input patterns for 1 and 3 is the state of PE1.

Datalogs show that PE1 does correctly change state between 1, 2 and 3


Are there any other users using 4 digital inputs from thier gearlever? Are you having similar problems?
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Software ignoring PE1 as fourth lever input?

Post by Bernard Fife »

Addicted,

It is certainly possible. I will have a look in the code to see if there is anything weird going on (I'll assume this is with a recent 4.1xx code, if not let me know).

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Addicted
Posts: 188
Joined: Mon Oct 14, 2013 7:14 am
Location: Winchester, England

Re: Software ignoring PE1 as fourth lever input?

Post by Addicted »

Hi Lance, I believe the problem was there in released code also.. but yes I am now using the 4.1xxx code
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Software ignoring PE1 as fourth lever input?

Post by Bernard Fife »

Addicted,

I did find something in the code. The issue wasn't exactly a mistake, but it was an ambiguity that could lead to the sort of issues you are having depending on the sequence in which one might change parameters around (and this stems from adding additional meaning to pre-existing parameters as capabilities have expanded, so the logic is more than a bit convoluted). If you have time, give the attached 4.144m test code and INI a try - it should help (or narrow the issue down at very least).

Lance.
Attachments
Monitor_4144m.abs.s19
(73.32 KiB) Downloaded 443 times
GPIO_MShift_4144.ini
(220.19 KiB) Downloaded 442 times
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Addicted
Posts: 188
Joined: Mon Oct 14, 2013 7:14 am
Location: Winchester, England

Re: Software ignoring PE1 as fourth lever input?

Post by Addicted »

Hi Lance, sorry but that didn't help :( the problem remains
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Software ignoring PE1 as fourth lever input?

Post by Bernard Fife »

Okay, I will dig deeper. 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: Software ignoring PE1 as fourth lever input?

Post by Bernard Fife »

The manual gear gauge indicates 1 when the lever is in 3 (indicates correctly in all other gears)
Addicted,

The manual lever position doesn't have much to do with it. So I am not surprised.

I looked at the datalog in your other thread. Perhaps I am misunderstanding your posts, but we need to be really clear about this. Please pay close attention to what I am going to ask next:

In your log, the current gear (cGear) never moves higher than 1st. So of course the LEDs don't either, by design. In the other thread, I said, "As Guillaume mentioned above, the LEDs follow the currently selected gear (cGear in the datalog), NOT the manual lever position (mGear). I could easily make that an option in the code, though."

So, do the LEDs not work as they are designed WHEN THE *CURRENT* GEAR (cGear in the log) IS GREATER THAN 1?


The current gear is NOT necessarily the same as the manual gear shift position (it is the gear selected by the trans at the moment, which can be up to or equal to the manual lever position). Shifting the manual lever is not the same as a manual shift, either (which is done using the shift buttons). The trans will only shift from 1st if the speed is high enough (your log never exceeds 0.4 mph), etc., or if you shift it manually with the shift buttons. Ideally, if you would post a datalog of showing the current gear in 3rd but the LEDs indicating 1st (and include an MSQ) we could figure out the problem at that point.

If you like, I could post some test code that shows the manual lever position on the LEDs instead of the currently selected gear. Let me know if you would find that useful.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Addicted
Posts: 188
Joined: Mon Oct 14, 2013 7:14 am
Location: Winchester, England

Re: Software ignoring PE1 as fourth lever input?

Post by Addicted »

Morning Lance,

I started this fresh thread as I hoped to get away from that slightly confused LED thread. This is nothing to do with Current Gear or the LED outputs, like I said in the previous posts the LED's and Current Gear now works perfectly as expected. :D Something to do with the 4.1xxx code you gave me I think.

This thread is purely regarding the Manual Gear gauge in Tunerstudio (and, of course, mGear in the datalogs).
This is the point I am at:
Check the manual gear shift lever function. Select 'Manual Gear' as one of the gauges on your front page. Without starting the vehicle, shift the manual gear selector lever through each of its gears. Verify that the Manual Gear gauge shows the actual position of the gear selector lever at all times. If it does not, then you may have a wiring problem with one of the gear inputs (AD0/EGT4/Amp26; AD1/GPI2/Amp6; AD3/EGT3/Amp25; and possibly PE1/GPI1/Amp5), or you may have misconfigured one or more of the input patterns.
I have two manual lever positions that the software cannot distinguish between. The only difference between the two being PE1 being ON or OFF. Lets call them Manual Lever Positions A & B. The patterns are:

Position A: ON OFF ON OFF
Position B: ON OFF ON ON

If I allocate Position A to First and Position B to Third, mGear reads both positions as First.
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Software ignoring PE1 as fourth lever input?

Post by Bernard Fife »

Okay, I just wanted to be 100% clear. I will make some more test code shortly. 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: Software ignoring PE1 as fourth lever input?

Post by Bernard Fife »

Addicted,

Here is some 4.144p test code:
Monitor_4144p.abs.s19
(73.35 KiB) Downloaded 473 times
(See improved code in a following post though.)
GPIO_MShift_4144.ini
(220.48 KiB) Downloaded 497 times
It won't help (or at least it shouldn't). I haven't fixed anything. But what this code does is poll the state of the PE1 pin, and count an output channel up if it is high, and count down if it is low. The value is returned as dbug, and can be found as a gauge ("Debug") and the datalog ("dbug") when you use the attached INI. If you could run this and let us know if the gauge (and datalog) is responding to the physical input you are supply. I will do the same here so we can compare notes (my test bench is in a bit of a state, so I have to reconfigure things and this might take a little while).

If the gauge does respond, then the problem is in the logic that deduces the lever position from the inputs. If the gauge doesn't respond, then either the port is not set up properly (though I did check) or the pin is burned out (it's unlikely that both of ours would be).

Sorry for the hassle, because I wasn't reading carefully I didn't understand the issue properly until your last post.

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