KManager API

K-Series Programmable ECU installation questions / support issues
Post Reply
Friendly
Posts: 15
Joined: Sun Sep 07, 2014 8:30 pm

KManager API

Post by Friendly »

I was wondering if KManager had some sort of API available so I can use some of the sensor data in a custom script.

Or if KManager somehow allows custom scripting for displays.

Reason being is that I would like to display MPG. I found a way to make the calculations using the INJ(ms), VSS(mph), and RPM.
Is it possible to perform these calculations within KManager and display it to the the display?
User avatar
Hondata
Site Admin
Posts: 10616
Joined: Thu Aug 15, 2002 12:13 pm
Location: Torrance, CA
Contact:

Re: KManager API

Post by Hondata »

Hondata
Friendly
Posts: 15
Joined: Sun Sep 07, 2014 8:30 pm

Re: KManager API

Post by Friendly »

Thank you for the reply.

I was able to read the page and modify the excel sheet to accept incoming data from KManager instead of SManager and make the calculations for MPG, however I am unsure how your example DDE server works.

I noticed the example one was made for SManager. I was trying to modify the exampleDDE.exe to read from KManager but I wasn't sure how to make the modifications or how I would recompile it.

Do you by any chance have an exampleDDEserver for KManager or can you provide me with a link to help me modify the one you provided?

Thank you very much again!
User avatar
Hondata
Site Admin
Posts: 10616
Joined: Thu Aug 15, 2002 12:13 pm
Location: Torrance, CA
Contact:

Re: KManager API

Post by Hondata »

What language are you going to use for your display? Almost every language should have a DDE example.
The example in google code compils using Dev-C++ http://orwelldevcpp.blogspot.com/, but should compile with MicroSoft or other compilers.
For a really quick change get the example exe and hexedit smanager to kmanager in the binary.
Hondata
Friendly
Posts: 15
Joined: Sun Sep 07, 2014 8:30 pm

Re: KManager API

Post by Friendly »

Thank you for the reply.

I was planning on using VB for the visplay.
As for the example. I was able to open it up in IDA and change the SManager to KManager which seems to let it start up without any errors. However during my testing I noticed that it was not updating the values.
I was using a datalog to do this and letting the cursor run through the entire log. Does it work using this method or does it only work from a live stream?
User avatar
Hondata
Site Admin
Posts: 10616
Joined: Thu Aug 15, 2002 12:13 pm
Location: Torrance, CA
Contact:

Re: KManager API

Post by Hondata »

It updates from a live stream only.
Hondata
Friendly
Posts: 15
Joined: Sun Sep 07, 2014 8:30 pm

Re: KManager API

Post by Friendly »

Thank you so much,

I was able to get it working and now my MPG seems to be working just fine.
Here is the formula I am using to calculate MPG if you are curious:

=ROUND((B18 / (((60 * (4 * (310 * ((CONVERT(IF(A13 = 0, 0.001, A13),"sec","mn") * B17) / 2)))) / 1000) / 3.78541)), 2)

A13 is the Injector Pulse Width (INJ) in seconds.
B17 is RPM
B18 is MPH

I am using INJ because my car does not have a MAF sensor.
This formula wont be accurate for boosted vehicles as it assumes constant fuel pressure (1:1).
Would it possible to see a MPG option in a future release of KPRO? I would love to see it on my display especially for long drives.
Post Reply