PDA

View Full Version : Knock Sum Application



Patryn999
21-07-2010, 10:56 AM
I got a little frustrated trying to look at the evoscan logs earlier, so I quickly wrote up an application in about two hours that does the following:

Has Load vs RPM table like EcuFlash, which you just select a Evoscan log file to open and it will populate the table with a sum of all the knock-count values in said log.

Currently I have it off-set, so it will sum between load 0-20, rpm 0-750 etc. and output that value in a cell. You can also change the ranges off of their default value (took straight from ROM defaults).


This should help considerably at where I need to target to reduce knock when trying to tune, and it occurred to me that other people might find it of use. Its not anything spectacular or colorful (yet), as I just whipped it up. I also don't know what the rules are about posting executables on the forum, as some douche could try to give someone a virus. Mods? (I'll post it when mods give the OK).


UPDATED:
V0.2.1
Added WBO2 and LC1_Wideband_o2 log entries to visible data.

V0.2
Added a few more views including:
Largest single knock value per cell.
Largest single knock value at highest octane rating (for that cell).

Also now you can double-click a cell and it will show you the entries that it was created from. (not all values in the log exist in the new view, as I've mapped the log file into a custom object, so if any necessary ones are missing I'll add them).

Now closes file after reading it...

Known "bug":
In the largest single knock value tab, if you double click sometimes it will show two results if they both have same KnockCount. Haven't bothered fixing this as the information is more useful as-is.

P.S. If it garners some interest I might put in a colour scale and make it a bit more user-friendly.

foxdie
21-07-2010, 11:37 AM
Seems like a useful utility, doubly so if you put colour highlighting in particular tables if they're above a certain threshold :)

Nick Mann
21-07-2010, 04:54 PM
I personally have no issues with you zipping the file and attaching it.

Fair play to you for sharing the knowledge! :D

Turbo_Steve
21-07-2010, 05:07 PM
I think a brief discussion may be required before you post it up, but brilliant idea and thank you for sharing with the community.

apeman69
22-07-2010, 12:26 AM
I'm with you on the frustration from analysing EvoScan logs. Checking through a file of comma delimited text (even when parsed into columns via a spreadsheet application) isn't ideal.
I, for one, would be interested to try your little executable as I am currently trying to identify the source of my strange knock sums. I could do something similar myself but I never seem to have the time and what's the point of reinventing the wheel? Nice work and thanks for thinking of us.

Patryn999
22-07-2010, 12:40 AM
I'm an electrical engineer, so software is one of my forte's. I'll be giving you guys the first release tonight (after work!), which I think will include cell colouring with auto/editiable knock range for colour.

Thinking about adding other features like max knock - i.e. only return the knock values where the octane rating was at its highest on an inividual cell basis.

If there's interest I don't mind adding a few features, it just wasn't worth too much further effort if I was the only one going to be using it.

Wodjno
22-07-2010, 12:40 AM
I personally have no issues with you zipping the file and attaching it.



Well that means nothing to me :stupid:

So i thinks it's great idea /yes

Well done that person :beerchug:

Patryn999
22-07-2010, 08:01 AM
As promised, I've uploaded V0.1, which now supports green->red colouring. (attached to original post)

Has two features in the extensive "options":
Auto coloring - takes highest value and scales colors linearly.
Set coloring - untick above and specify your own.


Doesn't really have any error handling yet, but loads logs for me. If you have any issues (I hope not!) drop the error and what you were doing and I can fix up asap.

Turbo_Steve
22-07-2010, 05:37 PM
Before you continue, can I STRONGLY reccomend you decide how you are licensing this software?

Free as in Beer? Open Source? GNU?

I'm really really glad that you're prepared to share it, but if you don't explicitly license it, someone will be along to rip you off sooner or later.

Patryn999
22-07-2010, 10:20 PM
Thanks, I re-released it with a note saying under the MS-PL (Microsoft Public License). So you can copy, distribute, alter and use it to your hearts content as long as original copyright is maintained.

I'll get around to posting the source code if anyone wants it, just have to tidy the comments up :P

scott.mohekey
22-07-2010, 11:02 PM
Comments? What are they?

Patryn999
22-07-2010, 11:31 PM
ಠ_ಠ

I'll KILL YOU! #!*(#@&(%

scott.mohekey
22-07-2010, 11:33 PM
Lol.. good code doesn't need comments ;)

apeman69
22-07-2010, 11:59 PM
Are there any particular data items that need to be logged with EvoScan for this to work? Obviously knock but anything else that is used specifically by your prog?

Patryn999
23-07-2010, 12:02 AM
I hate that saying with a passion :P Haha. Was valid for a while until we created IDE's... I like being able to mouse-over non library functions and getting a short description, parameter types and exceptions that function can throw.

Makes life considerably easier when reviewing other peoples code, so much so that I have enforced XML comments in our code at work :D

Also stops this happening: "Hmmm, thats a bit ugly, why didn't I write it *this* was previously? (spends hour refactoring code) Oh, thats why, the *insert PITA function here* has some wierd glitch."


Or maybe my souls been half mauled by having to review poorly documented (and poorly written) code... sigh.

PaddyB
23-07-2010, 12:48 AM
It's the poorly designed stuff that gets me - & it's too late to fix that when reviewing code. Luckily I'm a one man band now so everything I do is purrrrrfect :smash:

Patryn999
23-07-2010, 02:11 AM
Are there any particular data items that need to be logged with EvoScan for this to work? Obviously knock but anything else that is used specifically by your prog?

RPM, KnockSum and LoadCalc.

scott.mohekey
23-07-2010, 03:16 AM
I hate that saying with a passion :P Haha. Was valid for a while until we created IDE's... I like being able to mouse-over non library functions and getting a short description, parameter types and exceptions that function can throw.

Makes life considerably easier when reviewing other peoples code, so much so that I have enforced XML comments in our code at work :D

Also stops this happening: "Hmmm, thats a bit ugly, why didn't I write it *this* was previously? (spends hour refactoring code) Oh, thats why, the *insert PITA function here* has some wierd glitch."


Or maybe my souls been half mauled by having to review poorly documented (and poorly written) code... sigh.

I agree with all your points. I should have been more clear. I don't agree with comments littered within code. Some people take it too far and comment each and every line, which is ridiculous. The programming languages are meant to be self documenting at that level.

Complex pieces of code should either be refactored at time of writing to be more clear, or should be commented.

The problem I have at work is that we have a bunch of people that just don't get it and comment everything, and then don't understand my code because it doesn't have a comment on every line. If they were to just read what the code was doing, they would understand and there would be no problem..

End rant.

Patryn999
23-07-2010, 03:56 AM
Lol, that sounds like the shizen I had to put up with through uni... Part of it is bad teachers, as the first lecturer encouraged this. If is see every line commented I'd probably cry tears of rage :P

I was quite lucky in that a good friend and I started working at the current (small) company that we're with today, and as we where set to start a nice large new project we got to set the language and create coding standards (companies first time with C#), So I didn't have to put up with that sort of thing. That and being a small company (6 engineers), we haven't seemed to have hired any incompetents yet...

scott.mohekey
23-07-2010, 03:59 AM
We started out as a group of three developers, but are now close to 40 strong. Add to that the fact that we also have three or four major products, each with its own team, but with a large amount of code shared between all products, and it gets very messy. We're in the process at the moment of consolidating everything, and moving from Subversion to Mercurial while we're at it.

Turbo_Steve
23-07-2010, 08:03 AM
It's been a long time since I did any coding, but it always used to be that you'd comment functions and exceptions rather than the entire body of code

When you read what others have written, this always seems sufficient.

scott.mohekey
23-07-2010, 08:08 AM
Yep Steve, that's how it should be.

PaddyB
23-07-2010, 10:50 AM
My particular faves are:

// Increment i by 1
Usually in the middle of some utter garbage or blackmagic & there isn't another comment for 400 lines either way

& ...

// This seems to make it work
usually follwed by a printf() or some sleep function.

Grrrrrr

kinkyafro
17-08-2010, 01:33 AM
Just had a play with this I like it...

If you were going to tweak it further my big want would be a couple of extra views. One returning a count of the number of entries in each cell and another showing total knocksum divided by the count of entries.

Have some rep sir!

Patryn999
17-08-2010, 05:36 AM
I was already half-way through adding a peak-octane view that only showed the knock count in each cell from when the car's octane rating was at its highest (for that cell), so I can add your options in at the same time (not too difficult).

Probably sometime this weekend, assuming that it doesn't go the way of the last change and end up being distracted by the missus/work.

Thanks for the feedback.

Beastlee
17-08-2010, 08:02 AM
Is there any way to get it to point out the line reference where the peak is? I have 6500 lines of data to look through and this would make it much easier.
Loving this app already and it has so much potential. A couple of sugestions if you decide to develop it further :

1. Selectable fields to be displayed as a comment box when hovering over or selcting the cell.
2. Once the file is loaded close the imput handle. At the moment the file remains open so Excel sees it as read-only whilst knocksum is still open.

This makes life much easier for me already. Here's a screenshot of how mine looks so peeps can see the colour system too. I need to look at that red(Blue because I highlighted it) cell!
EDIT: Seems IMG2 objects are no longer clickable, have attached instead

EDIT2: Had a look at the csv used and I can't find a knock sum of 4 anywhere, how is the value in the table calculated? No sure how the knock sum is calculated in the ECU but there was apparently no count or other issues on the same line...odd.

Patryn999
17-08-2010, 11:45 PM
Currently its just a sum-of-sums (total count of all knock sums). So you may have something like a knock of 3 and another of 1 somewhere. The feature of peak knock hasn't been implemented yet (aimed for this weekend).

Woe be unto me for missing the file handle. Noob mistake putting it in the destructor, (on account of the object being in scope for the duration of the program).

And i'm thinking of having cells being interactive, so that double-clicking will bring up a table view of the entries that said cell is created from. If you were to have hover-over values, what would be useful for you?

Patryn999
18-08-2010, 05:39 AM
P.S. Turned out to be a slow day at work so the application got updated a little. Any other features requested by weekend will still be done on weekend, time permitting.

Beastlee
18-08-2010, 08:05 AM
Currently its just a sum-of-sums (total count of all knock sums). So you may have something like a knock of 3 and another of 1 somewhere. The feature of peak knock hasn't been implemented yet (aimed for this weekend).

Woe be unto me for missing the file handle. Noob mistake putting it in the destructor, (on account of the object being in scope for the duration of the program).

And i'm thinking of having cells being interactive, so that double-clicking will bring up a table view of the entries that said cell is created from. If you were to have hover-over values, what would be useful for you?

Hehe, I've been coding a set of batch files to create new a standardised Active Directory, groups and user accounts (I have to repeat this for 40+ schools!). I had the exact same issue myself at one point so couldn't amend the csv template on the fly. :smash:

Someone like Turbo_Steve would probably be best to advise on the most useful fields but I'm guessing the following, in addition to the ones used to create the cell, would be obvious :

LogID, TPS, TimingAdjust, WidebandAF,knock_flag

If the cell is a sum-of-sums I;m not sure how you'd display them to make any use of them though.

Thanks again for making this.

PS. Could you add some kind of revision or date info to the attachement so it's easy to tell if we have the latest version? :)

Beastlee
18-08-2010, 08:13 AM
Just opened the new revision and loving what I'm seeing! I like the detail view and the way it displays all relevant lines and it has the most relevant data, although it needs WidebandAF to be included I would say.
The extra tabs work really well too, I like the way you can see exactly where the worst knock was.

Rep given for this, with this software I may actually get around to programming up my e-manage blue!

Patryn999
18-08-2010, 10:40 AM
Lol, when I get my openport cable back off Adam I might play around a little myself.

Anyway - changed version to 0.2.1, only change was adding WBO2 and LC1_Wideband_o2 log entries to visible data.

Beastlee
18-08-2010, 10:51 AM
Lol, when I get my openport cable back off Adam I might play around a little myself.

Anyway - changed version to 0.2.1, only change was adding WBO2 and LC1_Wideband_o2 log entries to visible data.

Thanks for the update but it doesn't show the LC-1 input under those entries, the column in the original sheet is WideBandAF. Not sure why it's like that but it's the only one mine has ever logged the LC-1 against.

Patryn999
18-08-2010, 11:17 AM
Could be a different version of Evoscan? If you could attach a log of yours that'd satisfy my curiosity!

Otherwise I added in another field WideBandAF. Just hope you got capatilisation right :P

Beastlee
18-08-2010, 12:12 PM
Could be a different version of Evoscan? If you could attach a log of yours that'd satisfy my curiosity!

Otherwise I added in another field WideBandAF. Just hope you got capatilisation right :P

That's fixed it thanks. Have attached my logged run I was using. Scary as I now realise I have a knock sum of 5 just under 7000RPM!

twisted32
25-10-2010, 09:16 AM
Great app, very usefull.

Can this application be adjusted to utilise 2 byte load instead of load calc? If so how?
From what I have been told 2 byte load is more accurate, and when logging direct to sd card with openport 2.0 cable, I don't seem to have a load calc output.
Any help would be greatly appreciated.

taylor
25-10-2010, 12:53 PM
Great app, very usefull.

Can this application be adjusted to utilise 2 byte load instead of load calc? If so how?
From what I have been told 2 byte load is more accurate, and when logging direct to sd card with openport 2.0 cable, I don't seem to have a load calc output.
Any help would be greatly appreciated.

Hey mate this has pretty much been made redundant by maptracing in evoscan, as it auto scales and you can trace and edit your rom. Can use any of the knock logs, or AFR etc

twisted32
26-10-2010, 07:39 AM
I have been using the map tracer with my evoscan logs, but I have not been able to open the direct to sd openport 2.0 logs in evoscan, and since these logs are in general large (plug in and forget, and drive), I was hoping to use the app again.
I am still trying to get used to all this, so any help would be appreciated.

Kenneth
27-10-2010, 06:00 AM
I use the standalone logging on OP2.0 over evoscan because I find it easier to use and analyse afterwards.

I usually trigger off one of the following two conditions:

TPS > 50%
Knocksum > 0

These both reduce the amount of logging to the point where you can get what you want rather than mountains of useless data. Mostly I have it set on knocksum > 0 as this is really the thing I am interested in.

twisted32
27-10-2010, 09:57 AM
I use the standalone logging on OP2.0 over evoscan because I find it easier to use and analyse afterwards.

I usually trigger off one of the following two conditions:

TPS > 50%
Knocksum > 0

These both reduce the amount of logging to the point where you can get what you want rather than mountains of useless data. Mostly I have it set on knocksum > 0 as this is really the thing I am interested in.

Thanks for that, never thought of it that way, but it makes sense.

phosty
28-10-2010, 10:42 PM
Could somebody please post up the logcfg.txt they are using - I couldn't get it to work correctly on mine. /pan