Arbitrary limits on functions

Testing and development of Megasquirt 3

Moderators: jsmcortina, muythaibxr

Post Reply
Reverant
Super MS/Extra'er
Posts: 1233
Joined: Sat Apr 15, 2006 12:39 am
Location: Athens, Greece

Arbitrary limits on functions

Post by Reverant »

There are several functions that have arbitrary limits to them:

1) Max load for EGO control: 300. I have several cars running up to 400 that want to do closed loop fueling. Yes, I can edit the ini file, but then when I upgrade the firmware, I will forget about it and run open loop again until I notice.
2) Max TPS and VSS for shutoff. Actually, I don't want any shutoff based on TPS or VSS.
3) Alternator shutoff. Again, I don't want it and I can't disable it. The maximum TPS I'm allowed to enter is 110, which means that if the TPS calibration is not precise 100% of the time, I'm in for a surprise.

Thoughts?
The man behind MS Labs
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost
dontz125
Super MS/Extra'er
Posts: 4221
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: Arbitrary limits on functions

Post by dontz125 »

For most functions that have a range of values, the devs had to enter SOMETHING in the max and min values. If that max or min value doesn't work for you, copy the definition line for that variable into a custom.ini, and change the range values to what works for you - 400 max EGO, 200% max TPS, etc. When you update the firmware and a new .ini is copied over the existing file, TS will still load the custom.ini AFTER the standard .ini, allowing your modified values to be kept as desired.
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Reverant
Super MS/Extra'er
Posts: 1233
Joined: Sat Apr 15, 2006 12:39 am
Location: Athens, Greece

Re: Arbitrary limits on functions

Post by Reverant »

I would like a solution that doesn't force me to do this on each new project, and that won't screw things if the customer decides to change an irrelevant setting or map (because he probably won't be using the modified ini or the custom.ini).
The man behind MS Labs
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost
jsmcortina
Site Admin
Posts: 39615
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Arbitrary limits on functions

Post by jsmcortina »

Some limits need to be in place to help customers set sensible values. MS2/BG originally had wide open limits for many settings and newbie customers picked wildly silly values at times causing themselves problems.

Sounds like the EGO limit needs adjusting to respect the max load internal variable though.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Reverant
Super MS/Extra'er
Posts: 1233
Joined: Sat Apr 15, 2006 12:39 am
Location: Athens, Greece

Re: Arbitrary limits on functions

Post by Reverant »

Can we at least switch off features that are not wanted and might actually be dangerous, like the fan and alternator shutoff?
The man behind MS Labs
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost
kaeman
Master MS/Extra'er
Posts: 643
Joined: Sun Nov 06, 2005 12:31 am
Location: NORTHERN CALIFORNIA

Re: Arbitrary limits on functions

Post by kaeman »

if you are not using the fan or alternator functions, you simply don't hook them up and don't enable the functions, how could something you don't hook up be dangerous?
64 el camino, 383 SBC, 11.7 to1 CR, accufab tb/rhs intake, 44lb injectors, trick flow heads, xr292r solid roller cam, belt drive camshaft, dry sump oil system, 2400 stall, turbo 350, spooled 9 inch, strange axles, 3.89 gears, dual wideband, full sequential fuel/cop, MS3x using 1.4.1 code.
dontz125
Super MS/Extra'er
Posts: 4221
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: Arbitrary limits on functions

Post by dontz125 »

He *IS* using the fan and alternator functions, but doesn't want them to shut off at an inopportune moment.
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Reverant
Super MS/Extra'er
Posts: 1233
Joined: Sat Apr 15, 2006 12:39 am
Location: Athens, Greece

Re: Arbitrary limits on functions

Post by Reverant »

dontz125 wrote:He *IS* using the fan and alternator functions, but doesn't want them to shut off at an inopportune moment.
This. For example, having to shut off my cooling fan at an arbitrary speed has already caused damage on a customer's car, as his speedo was giving off false readings, usually over 200Km/h (harcoded limit for fan shutoff). I had the same issue with a dragster car last weekend, where the billet throttle body had issues and the TPS reading would change enough to pass over the hardcoded max 110% reading for alternator shutoff...argh.
The man behind MS Labs
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost
jsmcortina
Site Admin
Posts: 39615
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Arbitrary limits on functions

Post by jsmcortina »

Your faulty sensors aren't necessarily a good reason for changing firmware.

Not sure I understand your alternator complaint either, where is alternator control being "turned off" ?

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
dontz125
Super MS/Extra'er
Posts: 4221
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: Arbitrary limits on functions

Post by dontz125 »

Looking through the 1.4.0 settings, the default limits for fan control TPS cut is 150%; VSS cut max setting is 200 mph / 320 kph. If your customer's fan cut out at 200kph, something is either wrong (besides the wonky speedo), or the TS setting had a LOT more head room.

The alternator WOT TPS settings, while maxing out at 110%, don't kill the alternator but rather switches to a different voltage to reduce the engine load from the alternator. The thing is, that 'different voltage' can be set to the same as the normal charging rate, and can be set as high as 15v. Not exactly a hard cut-off.
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Reverant
Super MS/Extra'er
Posts: 1233
Joined: Sat Apr 15, 2006 12:39 am
Location: Athens, Greece

Re: Arbitrary limits on functions

Post by Reverant »

I have KPH in my settings, and the ini limits me to 200KPH, not 200MPH.

I should be able to disable any functionality I don't want, not just hack around it.
The man behind MS Labs
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost
xrattiracer
Experienced MS/Extra'er
Posts: 301
Joined: Fri Aug 01, 2008 2:25 pm

Re: Arbitrary limits on functions

Post by xrattiracer »

a faulty *minor* sensor failing and causing a vast change in behavior is most definitely a reason to change the code. just because the situation *shouldn't* happen is not a reason to not have consideration for what will happen if it does and make the system react accordingly.
I agree that features like this should have a way to disable them completely.
dontz125
Super MS/Extra'er
Posts: 4221
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: Arbitrary limits on functions

Post by dontz125 »

Reverant wrote:I have KPH in my settings, and the ini limits me to 200KPH, not 200MPH.

I should be able to disable any functionality I don't want, not just hack around it.
The .ini limits you to '200'; I just loaded 1.4.beta1, set the preferred units to MPH, and it allowed 200mph.
Reverant wrote:I would like a solution that doesn't force me to do this on each new project, and that won't screw things if the customer decides to change an irrelevant setting or map (because he probably won't be using the modified ini or the custom.ini).
The modified / custom .ini will be part of the software / firmware package that you the tuner / builder present to the customer. If he changes things and breaks it, how is this different from him changing the AFR map to 17.0 at WFO under boost? If the firmware had a clicky that said "Turn this function off!" and he un-sets that, he has made a change that screws things up.
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Reverant
Super MS/Extra'er
Posts: 1233
Joined: Sat Apr 15, 2006 12:39 am
Location: Athens, Greece

Re: Arbitrary limits on functions

Post by Reverant »

The VSS solution you said forces me to use MPH on all my settings, which I don't want to do.

Also, if a customer needs to datalog with this laptop, he will probably load the stock ini, at which point things will break.

I don't think I'm being unreasonable here; if there's a feature in the firmware, I need to be able to switch it off if I don't want to use it.
The man behind MS Labs
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost
jsmcortina
Site Admin
Posts: 39615
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Arbitrary limits on functions

Post by jsmcortina »

When first starting on MS2/Extra we (the developers) did have the concept of "no magic numbers" to disable features. For some features where a large proportion of customers do want to use it, it's probably ok to have settings such as below TPS% etc. but in general we should probably be sticking to the "no magic numbers" concept. I'll see if we can review these for 1.5.x

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Reverant
Super MS/Extra'er
Posts: 1233
Joined: Sat Apr 15, 2006 12:39 am
Location: Athens, Greece

Re: Arbitrary limits on functions

Post by Reverant »

Thank you!
The man behind MS Labs
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost
jsmcortina
Site Admin
Posts: 39615
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Arbitrary limits on functions

Post by jsmcortina »

A while back in 1.5.x I set "maxspeed" to 300mph or 400kph.

I've now added on/off settings for TPS, VSS shutdown on fan and a/c idleup.

On alternator, I don't see too much harm in the WOT setting. Just set the WOT voltage the same as the run voltage, it's only one box.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Reverant
Super MS/Extra'er
Posts: 1233
Joined: Sat Apr 15, 2006 12:39 am
Location: Athens, Greece

Re: Arbitrary limits on functions

Post by Reverant »

Thank you!
The man behind MS Labs
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost
Six_Shooter
Super MS/Extra'er
Posts: 1424
Joined: Mon Oct 17, 2011 7:28 pm
Location: South Western Ontario

Re: Arbitrary limits on functions

Post by Six_Shooter »

jsmcortina wrote:Your faulty sensors aren't necessarily a good reason for changing firmware.

Not sure I understand your alternator complaint either, where is alternator control being "turned off" ?

James
This I agree with. External faults are not a sign of improper coding.

That would be like wanting a TV manufacturer to change the way their TV works because to the Blueray player connected to it cuts out signal every now and then. Or a house builder changing the material that a house it's made of because someone ran into it with a vehicle...

I do agree that some of the listed limits might need some adjusting, like the speed limit, simply because Dunne people will actually travel faster than 200 kmh under the right conditions and being forced to use MPH to exceed that speed doesn't seem right.

110% TPS seems like a good number to me in reality TPS can never really exceed 100%. Doing so means that the throttle opening is actually increasing in size after the throttle is already all the way open. The fact that a faulty or flaky TPS sensor it's used is not something that should be dealt with by code developers, but by the installer. 110% throttle allows for some wander of reference voltage and/or signal without getting silly with the TPS value.
A better code way to deal with this would be to have the Check Engine Light be triggered above this limit, because there's something wrong if this happens and TPS was calibrated correctly.
Tha Toy: 1973 Datsun 240Z Turbocharged, and loads of fun, now MS'd
Tha Otha Toy: 1923 T-bucket Hot Rod, Currently Sniper'd
Tha Daily: 2005 Chevy Blazer
Tha Summer Daily: 1987 Buick Skyhawk hatchback
Tha Long Term Project: 1985 GMC S-10 Jimmy, hasn't been fun for a while
Post Reply