It is currently Wed Jul 18, 2018 9:59 pm



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 72 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: User Configurable outputs
PostPosted: Mon May 20, 2013 12:46 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
I picked this back out as part of the boost control project.

I don't know who's stupid idea it was to make a generic output that users could link to whatever they want....but it's HARD! (at least for me :oops: )


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Mon May 20, 2013 6:21 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
I made good (for me) progress on sorting out how to do the optional switched outputs. I realized pretty quick that just haven't the ability to link up to 4 variables to the output and being able to set on above/below and off below/above wasn't enough, I also needed to have OR/AND selection for each link so it's pretty good now but all those choices means I've nearly cornered the market in if/else if/ else statements :?

I'll test what I have tomorrow then move on to additional problem like the stuff you'd want to link to and set action points all have different bin values and I'll need something to convert.

Then I still need to get the output pins to configure right.....for now they are just # defines which will get Jack up and running but won't really do as a final offering.

This a big job.


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Tue May 21, 2013 3:12 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
I didn't get a lot of time today and decide I didn't like a couple things about the way I had setup up the switch logic and TS display for it......it's better now I think.


Next up is the bin point conversion. I think as part of that I'm going to kill the English units option....it just seems like WAY too much bother. Let me know if you disagree and are willing to do the work to keep them.


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Tue May 21, 2013 10:20 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
I made some progress on the bin shifting. I decide to just use a table....it's not a prefect solution because it means everything gets stored as bin 0 so the only way to get decimal places is to do something like say "V_bat x 10" and make the user enter 137 for 13.7.....it's really rpm that is the issue so I guess I could also say rpm/100 or even 1000 which might be better.

Either way it's a bit confusing.


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Wed May 22, 2013 2:28 am 
Offline
User avatar

Joined: Sat May 11, 2013 9:52 am
Posts: 304
Location: Over here, doing 'over here' things.
mk e wrote:
...
Next up is the bin point conversion. I think as part of that I'm going to kill the English units option....it just seems like WAY too much bother. Let me know if you disagree and are willing to do the work to keep them.

Kill 'English' units? What do you mean by that... Imperial, metric?
Are you talking about mm/HG versus PSI versus kPa, or what?
:D

I suggest use whatever works best for the calculations, as in minimal conversions from one unit of measure to the other. If 80% of the calcs are metric or SI, re-cast things to metric SI and calc.

_________________
/me goes off to the corner feeling like Jerry Springer with a mullet.

My O5E candidate: 1982 Honda CX500TC motorcycle.


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Wed May 22, 2013 6:56 am 
Offline
User avatar

Joined: Mon May 13, 2013 7:26 am
Posts: 18
I have used both, so its not a problem but if you ask which one I prefer, it English units. As far as boost control I can live without if for now I will be limited to 5.5 psi but thats OK for testing this unit.


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Wed May 22, 2013 7:42 am 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
abecedarian wrote:

I suggest use whatever works best for the calculations, as in minimal conversions from one unit of measure to the other. If 80% of the calcs are metric or SI, re-cast things to metric SI and calc.


The FW is SI based, not exactly SI though. In TS it is possible to let the user see one thing but send something else to the ECU and that is what I do. Temps and pressures for example are stored in the ecu as a % STP so the ecu doesn't need to do anything but take it and multiply. I can do that with SI or English or whatever but it requires me to do all the work twice.

Originally I set it up for both but as I continue to add I've just lot interest in all the extra work....the TS config file is now 4000 lines with just SI, adding English to everything properly is another 1000ish lines......and a project for someone else I think.


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Wed May 22, 2013 7:47 am 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
p2164 wrote:
I have used both, so its not a problem but if you ask which one I prefer, it English units. As far as boost control I can live without if for now I will be limited to 5.5 psi but thats OK for testing this unit.


I'll have the switch stuff working by the end of the week I think......the holdup is that I"m trying to do it correctly the 1st time instead of just throwing in what you need which is much easier but means I'd have to do it over again later.

On the units, about 2/3 of the stuff had English options loaded so 1/3 was missing and NONE of it's been tested......it just seemed way to time intensive to try to get that up and working......and it does't really add anything very useful so I just don't want to invest the time.


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Wed May 22, 2013 2:10 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
mk e wrote:
I made some progress on the bin shifting. I decide to just use a table....it's not a prefect solution because it means everything gets stored as bin 0 so the only way to get decimal places is to do something like say "V_bat x 10" and make the user enter 137 for 13.7.....it's really rpm that is the issue so I guess I could also say rpm/100 or even 1000 which might be better.

Either way it's a bit confusing.


I settled on making the set points a bin 8 so +/- 128 with 2 decent decimal places. That will work well with everything except rpm which will need to be entered as rpm/1000.....I thing this is the best compromise.

Then about 30 seconds later I realized if i just use a 32bit variable I don't have to compromise......sometimes I'm not the sharpest tool in the shed.

32 bit is a bit of a problem for the tables though, I'll need to have a look at what to do about that.


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Thu May 23, 2013 8:46 am 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
The optional output project has made me realize that we probably made a pretty big mistake way way back by not taking advantage of the 32 bit architecture to allow use to standardize bin points. With the current setup there is basically no F'in way to link a table to user selectable outputs...well not no way, but its a lot of ugly code and leads to an ugly user display.

The SIU and config.h stuff is also probably unworkable as is....which is why I kept saying we really should start with a clear list of requirements.....I'm not happy :(


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Thu May 23, 2013 10:18 am 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
I’m now pondering 2 options….both with downsides.

Option 1 – Specific functions
I can create a set of specific functions like “Coolant Fan Control” that are liked to specific variables and work in a specific way. This eliminates my bin point and display issues because everything is fixed. The down side is everything is fixed so it’s a take it or leave it list and list can get quite long.

Option 2- Generic Function
This is the path I was on which lets the user create the function using up to 4 variables and or/and logic to link them. This is the most flexible but I’m guessing more confusing to newer users and means I need to solve the bin point issue which probably means standardizing on a something like int32 bin 13 that will handle everything well and that means a lot of reworking existing code.


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Thu May 23, 2013 9:24 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
I'm still not sure what to do here. My gut is telling me to just bite the bullet and convert to 32 bit but its not truly necessary and will most likely delay us a bit and will slow down data logging.......I guess I'll stay the course on 16 bit and see how bad the conversions look.


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Fri May 24, 2013 6:35 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
My fight continues. I got something that should work figured out but I hate it. We just did not plan well for this......

I have another idea about what I might be about to do in TS to make it easier in the ecu.....more to come.


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Sat May 25, 2013 7:00 am 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
Well......I'm going to cobble up a working generic switch function as that will get the beta testing going and stop there.

Then the project will be more standardized code.

Then I will come back back to the generic outputs once there is a way to do them properly.....nobody plans to fail but failure is what you get when you fail to plan it seems.


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Tue May 28, 2013 11:31 am 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
mk e wrote:
Well......I'm going to cobble up a working generic switch function as that will get the beta testing going and stop there..


Fan control
Water injection

Seem to be working correctly and in up in the master and development_5634 branches.

Now on to the math standardization issue.


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Mon Jul 29, 2013 1:29 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
mk e wrote:
mk e wrote:
Well......I'm going to cobble up a working generic switch function as that will get the beta testing going and stop there..


Fan control
Water injection

Seem to be working correctly and in up in the master and development_5634 branches.

Now on to the math standardization issue.


I think the math standardization is sorted so back to configurable outputs....it's been so long I can't remember exactly what I was thinking I should do. :?


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Tue Aug 06, 2013 7:31 am 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
I've been bust and sick but hopefully can start sorting this out this week. Paul S has also offered to pump in and help so that means I've got a way better chance of succeeding :)


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Tue Aug 06, 2013 3:15 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
I'm second guessing myself a little.

It would probably be easiest to simply have the user set each output channel. I can have TS display the possible choices so say spark 1 your choices are off/spark_1 becaue every engine needs 1 spark. On spark 2 your choices are off/spark_2, optional out if your setup doesn't require more than 1 spark or just off/spark_2 if it does and so on.

The optional out menu can be a simple on/ff linked to up to say 4 channels (rpm, temp, whatever) or pwm that is fixed or linked to 1 channel. Very powerful and lets you do almost anything you please output wise.

This shouldn't be too bad to code and is similar ot what I had originally started when I realized the binary math using all different bin points was going to make it pretty hard, but that's fixed now.


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Wed Aug 07, 2013 7:32 am 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
Paul and I chatted yesterday and I think we have a good plan .....now we just need to actually do it :)


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Wed Aug 07, 2013 10:46 am 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
I may have asked this before but on a table controlled PWM output...how big of a table would you guys want?

I was thinking a 1x16....but a 1x8 seems like it would handle most stuff just fine

...or do I really need to give you a 2d table option and if so how big?


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Wed Aug 07, 2013 3:01 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
mk e wrote:
I may have asked this before but on a table controlled PWM output...how big of a table would you guys want?

I was thinking a 1x16....but a 1x8 seems like it would handle most stuff just fine

...or do I really need to give you a 2d table option and if so how big?


Unless someone really screams I'm thinking of giving 1x8 or 8 x 8 options. This lets me fit all the stuff needed for 3 channels on 1 2048 byte page. We can make the tables bigger if we find a need but this seems like a good place to start.


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Wed Aug 07, 2013 5:57 pm 
Offline

Joined: Wed May 15, 2013 10:12 pm
Posts: 10
Mark, I agree with your logic. 1x8 should be fine. but you know me--Mr. Minimalist...

Paul


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Thu Aug 08, 2013 8:05 am 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
note to all - mark_5634 is now broken until you hear otherwise, so use development or master.

I think this rolling nicely now. The TS/ variable creation part is a lot of work so its going to be limited to the ignition channels until the basic concept/testing is done and we're clear it's working as planned, so don't panic when you notice it only working on the ignition channels.


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Sat Aug 10, 2013 10:46 am 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
Our first plan wasn't as good as I thought it was and we hit a couple bumps....but the NEW plan seem the address all the issues.

All the output will be treated exactly the same way and all the configure stuff done in arrays so both the setup and control or the outputs can be done in a simple loop with fuel and spark easily rejected from the loop. Now we need to get it done!


Top
 Profile  
 
 Post subject: Re: User Configurable outputs
PostPosted: Sun Aug 11, 2013 10:58 am 
Offline

Joined: Wed May 15, 2013 10:12 pm
Posts: 10
Overall Status of User Configurable Outputs:

I would love to take some credit for this idea and the present approach but it’s Mark’s baby. It took a week for him to get me up to speed (kicking and screaming every inch of the way, of course—me not Mark!) and this forum entry is to bring forum readers up to speed as well.

Mark is well along (he has a snippet of the .ini available) developing a Tuner Studio (TS) table covering 16 User Configurable Outputs ( called CONFIG_OUTPUTS in FW, for now). The selectable options for each will be several or all of the following:

0 = Off
1 = eTPU Spark Output with Cylinder ID'd
2 = eTPU Fuel Output with Cylinder ID'd
3 = Switched Output based on one of several selectable parameter ranges—potential for more than one parameter. An example is Fan control based on a range of CLT.
4 = PWM based on one of several selectable parameters. An example is Fuel Pump speed based on RPM and, perhaps, injection pulse length.

Mark has more goodies in mind for additional options (PID, etc.) for the future--which scares me and I'm FEARLESS!

The 16 CONFIG_OUTPUTS table entries will be oriented along 16 contiguous MPC5634 chip ‘pads’ (116 through131, at this writing). Note that the eTPU has access to each of those pads with one channel and in 10 cases, 2 (Note, 8 eTPU channels, 24-31, are not accessible via those pads). Of course, General Purpose I/O is available on each of the pads. It is, probably, not necessary that the pads of interest be contiguous or limited to 16 but this, seemingly, makes a good, somewhat easier starting place.

At startup, the FW will read the TS supplied CONFIG_OUTPUTS table (starting on page 13, for now) and configure the pads through SIU_OPS.c. Further, it will configure the single 32 channel eTPU for the Spark, Fuel and PWM outputs required based on the CONFIG_OUTPUTS table entries.

After startup and during normal engine and FW operation, the OS will call a ‘check limits and update parameters and output’ routine (call it “CONFIG_OUTPUTS_Check.c”, maybe) every 50-500msec, or so. By looping thorough all 16 configurable outputs, the routine will check and update On/Off status and PWM parameters per the CONFIG_OUTPUTS table. Of course, those entries that call for SPARK or FUEL outputs are updated in the normal course of events in the FW and will be ignored by “CONFIG_OUTPUTS_Check.c”.

The power of this idea is easy to underestimate. The flexibility it gives to the user is totally out of character for this sort of system, in my opinion.

Paul


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 72 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Theme designed by stylerbb.net © 2008
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All times are UTC - 5 hours [ DST ]